mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Refs #23276 -- Added missing url() in some places.
This commit is contained in:
committed by
Collin Anderson
parent
468236889f
commit
e5376999fa
@@ -15,7 +15,7 @@ MultipleObjectMixin
|
||||
* Use the ``page`` parameter in the URLconf. For example, this is what
|
||||
your URLconf might look like::
|
||||
|
||||
(r'^objects/page(?P<page>[0-9]+)/$', PaginatedView.as_view())
|
||||
url(r'^objects/page(?P<page>[0-9]+)/$', PaginatedView.as_view()),
|
||||
|
||||
* Pass the page number via the ``page`` query-string parameter. For
|
||||
example, a URL would look like this::
|
||||
|
||||
@@ -1456,7 +1456,7 @@ templates used by the :class:`ModelAdmin` views:
|
||||
|
||||
Notice the wrapped view in the fifth line above::
|
||||
|
||||
(r'^my_view/$', self.admin_site.admin_view(self.my_view))
|
||||
url(r'^my_view/$', self.admin_site.admin_view(self.my_view))
|
||||
|
||||
This wrapping will protect ``self.my_view`` from unauthorized access and
|
||||
will apply the ``django.views.decorators.cache.never_cache`` decorator to
|
||||
@@ -1466,7 +1466,7 @@ templates used by the :class:`ModelAdmin` views:
|
||||
performed, you can pass a ``cacheable=True`` argument to
|
||||
``AdminSite.admin_view()``::
|
||||
|
||||
(r'^my_view/$', self.admin_site.admin_view(self.my_view, cacheable=True))
|
||||
url(r'^my_view/$', self.admin_site.admin_view(self.my_view, cacheable=True))
|
||||
|
||||
.. method:: ModelAdmin.get_form(request, obj=None, **kwargs)
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ How to use ``FormPreview``
|
||||
|
||||
...and add the following line to the appropriate model in your URLconf::
|
||||
|
||||
(r'^post/$', SomeModelFormPreview(SomeModelForm)),
|
||||
url(r'^post/$', SomeModelFormPreview(SomeModelForm)),
|
||||
|
||||
where ``SomeModelForm`` is a Form or ModelForm class for the model.
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ The police beat feeds could be accessible via URLs like this:
|
||||
|
||||
These can be matched with a :doc:`URLconf </topics/http/urls>` line such as::
|
||||
|
||||
(r'^beats/(?P<beat_id>[0-9]+)/rss/$', BeatFeed()),
|
||||
url(r'^beats/(?P<beat_id>[0-9]+)/rss/$', BeatFeed()),
|
||||
|
||||
Like a view, the arguments in the URL are passed to the ``get_object()``
|
||||
method along with the request object.
|
||||
|
||||
Reference in New Issue
Block a user