Use grappelli to add a template for the django admin background, grappelease Jango

Source: Internet
Author: User
Tags install django pip install django

Use grappelli to add a template for the django admin background, grappelease Jango

Grappelli is the most star django template System on github.
Http://django-grappelli.readthedocs.org/en/latest/quickstart.html#installation

Copy codeThe Code is as follows:
Pip install django-grappelli
Settings. py

INSTALLED_APPS = (
'Grappelli ',
'Django. contrib. admin ',
)

Add url entry

Copy codeThe Code is as follows:
Urlpatterns = patterns ('',
(R' ^ grappelli/', include ('grappelli. urls'), # grappelli urls
(R '^ admin/', include (admin. site. urls), # admin site
)

STATICFILES_FINDER is defined in the official installation instructions.

Define template context processors

Copy codeThe Code is as follows:
TEMPLATE_CONTEXT_PROCESSORS = (
"Django. contrib. auth. context_processors.auth ",
"Django. core. context_processors.debug ",
"Django. core. context_processors.i18n ",
"Django. core. context_processors.media ",
"Django. core. context_processors.static ",
"Django. core. context_processors.tz ",
"Django. contrib. messages. context_processors.messages"
)

The default value of django1.7 has been added for convenience.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.