Add a template for Django 1.7 admin background (use Django suit)


There seems to be a problem with using inline in Django Grappelli. Change the skin:

Django suit is the second admin skin recommended by 2scoops
Supports: Django 1.4-1.7. Python: 2.6-3.
The environment of this article is Django 1.7.1

Django suit official website
Installation guide link
Set strategy

The translation is as follows:


pip install django-suit

from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP




python makemigrations
python migrate
python collectstatic

congratulations! Basic installation is complete!

There are many detailed settings in the official strategy. I found that this plug-in is not only for background services, but also comes with many form widgets, which can also be used well in the foreground:
Examples are as follows:

datetime widget

SuitDateWidget, SuitTimeWidget and SuitSplitDateTimeWidget extends original admin widgets by adding some additional output styling only. Widgets still uses same original JavaScript for calendar and time. You can see example in Demo app: User changeform:

from django.forms import ModelForm
from suit.widgets import SuitDateWidget, SuitTimeWidget, SuitSplitDateTimeWidget

class UserChangeForm(UserChangeForm):
    class Meta:
        model = User
        widgets = {
            'last_login': SuitSplitDateTimeWidget,
            'date_joined': SuitSplitDateTimeWidget,

Add a template for Django 1.7 admin background (use Django suit)

Recommended Today

Summary of basic knowledge points of react

Contents of this document: 1. React entrance 2. JSX syntax 3. Components 4. Use setstate correctly 5. Life cycle 6. Component composition 7.redux 8.react-redux 9.react-router 10.PureComponent 11. Know hook 12. Customize hook and hook usage rules 13. Usememo and usecallback of hook API Reference website: 1. React entrance start Create project: NPX create react app […]