From 0e3f1dd1f27d4dcfc73f585be46a16f0a4048c7b Mon Sep 17 00:00:00 2001 From: pendletongp Date: Thu, 2 Feb 2012 22:19:11 -0500 Subject: [PATCH] support new admin static files layout introduced in django 1.4 --- djangorestframework/utils/staticviews.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/djangorestframework/utils/staticviews.py b/djangorestframework/utils/staticviews.py index 12a36f6c2..a13160a2e 100644 --- a/djangorestframework/utils/staticviews.py +++ b/djangorestframework/utils/staticviews.py @@ -62,7 +62,8 @@ def api_login(request, template_name='api_login.html', redirect_field_name: redirect_to, #'site': current_site, #'site_name': current_site.name, - 'ADMIN_MEDIA_PREFIX': settings.ADMIN_MEDIA_PREFIX, + 'ADMIN_MEDIA_PREFIX': "%sadmin/" % settings.STATIC_URL if hasattr(settings,"STATIC_URL") + else settings.ADMIN_MEDIA_PREFIX, }, context_instance=RequestContext(request))