Hi,
I am learning django and building my own project.
I want to change the admin section to my own interface, I have added sub-directory to the templates names "admin".And started change the base.html
The problems are-
Yosy
Hi,
I am learning django and building my own project.
I want to change the admin section to my own interface, I have added sub-directory to the templates names "admin".And started change the base.html
The problems are-
Yosy
1) If "django.core.context_processors.media" is included in TEMPLATE_CONTEXT_PROCESSORS (which is by default) in your settings.py, you can add <link>
to {{ MEDIA_URL }}/your_stylesheet.css
in templates/admin/base.html
, like so (I'm using Django 1.2 admin templates):
...
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/your_stylesheet.css" />
...
2) You can use all tags everywhere, if you {%load%}
ed them before. There are admin specific tags, which could be found in Django source here - unfortunately I'm not aware of any docs about them, so seems like you have to read the source.
3) I haven't heard about such thing for Django admin, there is however project named Grappelli that improves Django admin looks and functionality, providing slightly friendlier templates as side effect.