Note that there are some explanatory texts on larger screens.

plurals
  1. POdjango admin static serves in wrong url
    primarykey
    data
    text
    <p>I have a weird issue - my dev server trying to serve admin static by using a wrong url.</p> <p>using django 1.6</p> <p>my main urlconf</p> <pre><code>from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^$', include('dash.urls')), ) urlpatterns += staticfiles_urlpatterns() </code></pre> <p>and settings are like</p> <pre><code>BASE_DIR = os.path.dirname(os.path.dirname(__file__)) locale = lambda path: os.path.join(BASE_DIR, path) STATIC_URL = "static/" MEDIA_URL = "media/" STATIC_ROOT = locale("static") MEDIA_ROOT = locale("media") </code></pre> <p>apps</p> <pre><code>INSTALLED_APPS = ( 'django.contrib.staticfiles', 'django.contrib.admin', ) </code></pre> <p>the weird thing is that my custom apps serves static normaly by urls like localhost:8000/static/css/blah</p> <p>but the admin one uses</p> <p>[24/Nov/2013 18:47:41] "GET /admin/static/admin/css/base.css HTTP/1.1" 404 4316</p> <p>Guys, seriously, what is the origin of prefix /admin/static? 0_o I am nat using deprecated stuff like ADMIN_MEDIA_PREFIX.</p> <p>Base admin template uses {% static "admin/css/base.css" %} tag, which code is</p> <pre><code>from django.conf import settings from django.template import Library register = Library() if 'django.contrib.staticfiles' in settings.INSTALLED_APPS: from django.contrib.staticfiles.templatetags.staticfiles import static else: from django.templatetags.static import static static = register.simple_tag(static) </code></pre> <p>which seams ok;</p> <p>I am confused, help me)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload