Commit 7a87fc87 by Tom Christie

Merge pull request #138 from mjumbewu/feature/admin_static_files

Support both staticfiles and ADMIN_MEDIA_PREFIX styles.
parents bf8fe66f 26c1558e
<html> <html>
<head> <head>
<link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/base.css'/> {% if ADMIN_MEDIA_PREFIX %}
<link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/forms.css'/> <link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/base.css'/>
<link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/login.css' /> <link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/forms.css'/>
<link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/login.css' />
{% else %}
<link rel="stylesheet" type="text/css" href='{{STATIC_URL}}admin/css/base.css'/>
<link rel="stylesheet" type="text/css" href='{{STATIC_URL}}admin/css/forms.css'/>
<link rel="stylesheet" type="text/css" href='{{STATIC_URL}}admin/css/login.css' />
{% endif %}
<style> <style>
.form-row {border-bottom: 0.25em !important}</style> .form-row {border-bottom: 0.25em !important}</style>
</head> </head>
...@@ -11,12 +17,12 @@ ...@@ -11,12 +17,12 @@
<div id="header"> <div id="header">
<div id="branding"> <div id="branding">
<h1 id="site-name">Django REST framework</h1> <h1 id="site-name">Django REST framework</h1>
</div> </div>
</div> </div>
<div id="content" class="colM"> <div id="content" class="colM">
<div id="content-main"> <div id="content-main">
<form method="post" action="{% url djangorestframework.utils.staticviews.api_login %}" id="login-form"> <form method="post" action="{% url djangorestframework.utils.staticviews.api_login %}" id="login-form">
{% csrf_token %} {% csrf_token %}
...@@ -37,12 +43,12 @@ document.getElementById('id_username').focus() ...@@ -37,12 +43,12 @@ document.getElementById('id_username').focus()
</script> </script>
</div> </div>
<br class="clear"> <br class="clear">
</div> </div>
<div id="footer"></div> <div id="footer"></div>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -11,8 +11,13 @@ ...@@ -11,8 +11,13 @@
/* Custom styles */ /* Custom styles */
.version{font-size:8px;} .version{font-size:8px;}
</style> </style>
<link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/base.css'/> {% if ADMIN_MEDIA_PREFIX %}
<link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/forms.css'/> <link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/base.css'/>
<link rel="stylesheet" type="text/css" href='{{ADMIN_MEDIA_PREFIX}}css/forms.css'/>
{% else %}
<link rel="stylesheet" type="text/css" href='{{STATIC_URL}}admin/css/base.css'/>
<link rel="stylesheet" type="text/css" href='{{STATIC_URL}}admin/css/forms.css'/>
{% endif %}
<title>Django REST framework - {{ name }}</title> <title>Django REST framework - {{ name }}</title>
</head> </head>
<body> <body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment