Admin: Local and Heroku

Hi,

I did once again the tutorial from the start but this time with django 1.4. My app is now working in Heroku but I have 2 problems:

-"Hello World" is ok but /admin is not working.

-Also when running locally, I have troubles with the static files (admin working but no css)

Thanks for your help.

Here is the heroku log:

013-04-11T05:41:33.795922+00:00 app[web.1]: [11/Apr/2013 00:41:33] "GET /admin/ HTTP/1.1" 500 0 2013-04-11T05:41:33.995662+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=gentle-cliffs-1221.herokuapp.com fwd="186.106.226.85" dyno=web.1 connect=0ms service=8ms status=500 bytes=0 (venv)vagrant@precise64:/vagrant/projects/shakesharp$

And also what my urls.py looks like:

from django.conf import settings from django.conf.urls import patterns, include, url

from django.contrib import admin admin.autodiscover()

from django.views.generic import TemplateView

urlpatterns = patterns('', url(r"$", TemplateView.as_view(template_name="index.html")), url(r'admin/', include(admin.site.urls)), )

urlpatterns += patterns('', (r'static/(.*)$', 'django.views.static.serve', { 'document_root': settings.STATIC_ROOT }), )

Sorry You must be a logged in, registered user to answer a question.

Answers

If you go into your shell on the VM (where you normally do runserver), and run python manage.py shell and then:

>>> from django.conf import settings
>>> getattr(settings, "STATIC_ROOT")

does it print out the path that you expect?