Django: Static_url Adds Appname To The Url
I have configured my static settings like so: STATIC_ROOT = os.path.join(SITE_ROOT, 'static') STATIC_URL = '/static/' STATICFILES_DIRS = ( ('js', os.path.join(STATIC_ROOT, 'js'
Solution 1:
Since you're using the django built-in developement server, try to remove the following line from your urls.py
:
urlpatterns += staticfiles_urlpatterns()
In production, you'de better not serve static files with django, so use the collectstatic
command.
edit
If settings.py
, try something like this:
STATIC_ROOT = os.path.join(os.path.dirname(__file__), '../../static')
STATIC_URL = '/static/'
Post a Comment for "Django: Static_url Adds Appname To The Url"