Opened 14 years ago
Last modified 12 years ago
#14829 closed
Documentation for url() with class-based generic views — at Initial Version
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | 1.3-alpha |
Severity: | Normal | Keywords: | url |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It would be nice to update the url() documentation here
http://docs.djangoproject.com/en/dev/topics/http/urls/#url
to reflect that using class-based generic views means you pass the class object instead of view='some_view' and that class-based views must be imported as opposed to included in the patterns arguments.
example:
from myapp.views import *
urlpatterns += patterns(,
url(GenericViewClass.as_view(), name='the_url_name'),
)
Note:
See TracTickets
for help on using tickets.