diff options
| author | Timo Graham <timograham@gmail.com> | 2010-12-29 21:50:40 +0000 |
|---|---|---|
| committer | Timo Graham <timograham@gmail.com> | 2010-12-29 21:50:40 +0000 |
| commit | 7902a89cedfeb37713158b85c109cac830c4e68d (patch) | |
| tree | 57dd43f1ecfcff0e783e17064b86266fe50869fe /docs/ref/contrib/admin | |
| parent | 8219a13092e05a85a7d5b6abf9c878f44de3444c (diff) | |
Fixed #12469 - Add a few clarifications to the ModelAdmin.get_urls() docs. Thanks benc for the suggestions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/contrib/admin')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 20a79d1b8d..d76d61f0b3 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -847,6 +847,10 @@ templates used by the :class:`ModelAdmin` views: ) return my_urls + urls + def my_view(self, request): + # custom view which should return an HttpResponse + pass + .. note:: Notice that the custom patterns are included *before* the regular admin @@ -854,6 +858,10 @@ templates used by the :class:`ModelAdmin` views: anything, so you'll usually want to prepend your custom URLs to the built-in ones. + In this example, ``my_view`` will be accessed at + ``/admin/myapp/mymodel/my_view/`` (assuming the admin URLs are included + at ``/admin/``.) + However, the ``self.my_view`` function registered above suffers from two problems: |
