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)) diff --git a/setup.py b/setup.py index 690a7e0fd..e04215948 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup( 'djangorestframework.runtests', 'djangorestframework.utils'], package_dir={'djangorestframework': 'djangorestframework'}, - package_data = {'djangorestframework': ['templates/*', 'static/*']}, + package_data = {'djangorestframework': ['templates/*', 'static/*.*', 'static/css/*']}, test_suite = 'djangorestframework.runtests.runcoverage.main', install_requires=['URLObject>=0.6.0'], classifiers = [