thefekete.net

$> :(){ :|:& };:

Enabling AdminDocs in Django

In order to make a handy Documentation link available in the upper right portion of the Django admin site, simply add the admindocs app to your settings.py and the admindocs urls to your urls.py

# In your settings.py:
INSTALLED_APPS = (
    ...
    'django.contrib.admindocs',
    ...
)

# In your urls.py:
urlpatterns = patterns('',
    ...
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^admin/', include(admin.site.urls)),
    ...
)

NOTE: The admindocs urlconf must precede the admin site urlconf to work properly.

Leave a Reply

HTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting