I am very new to Python and Django, and I am sorry if this is a really stupid question. I couldn't find a solution in the forum or Google.
I followed the tutorial on: http://tutorial.pythonanywhere.com/django
Everything went fine until I modified urls.py. Enabling the two lines
20 from django.contrib.staticfiles.urls import staticfiles_urlpattern
21 urlpatterns += staticfiles_urlpatterns()
gives me an Exception: ImproperlyConfigured, Empty static prefix not permitted
Disabling the two lines things work, but I dont get the admin css.
This is how my urls.py looks like:
1 from django.conf.urls.defaults import patterns, include, url
2
3 # Uncomment the next two lines to enable the admin:
4 from django.contrib import admin
5 admin.autodiscover()
6
7 urlpatterns = patterns('',
8 # Examples:
9 # url(r'^$', 'HIT.views.home', name='home'),
10 # url(r'^HIT/', include('HIT.foo.urls')),
11
12 # Uncomment the admin/doc line below to enable admin documentation:
13 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
14
15 # Uncomment the next line to enable the admin:
16 url(r'^admin/', include(admin.site.urls)),
17 )
18
19 # Uncomment these two lines to enable your static files on PythonAnywhere
20 from django.contrib.staticfiles.urls import staticfiles_urlpatterns
21 urlpatterns += staticfiles_urlpatterns()
What am I doing wrong?