#7714 closed (fixed)
corrected documentation for {% url %} resolver
Reported by: | V | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | url resolver | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
there were two errors:
('^client/(\d+)/$', 'app_name.app_views.client')
originally('^client/(\d+)/$', 'app_views.client')
gives you an ImportError (ViewDoesNotExist)
{% url app_name.app_views.client client.id %}
originally{% url app_views.client client.id %}
simply doesn't work
to check I did:
- startapp app_name
- add urls.py to the main urls.py as in the docs
- add urls.py to app_name/urls.py as shown above
- creates app_views.py with view client that gives back
{% url app_views.client client.id %}
Attachments (2)
Change History (7)
by , 16 years ago
comment:1 by , 16 years ago
Description: | modified (diff) |
---|
comment:2 by , 16 years ago
milestone: | → 1.0 |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
I agree on that, but I think that to correct it isn't enough to add the application name, it's also needed to add the project name.
So app_views.client should be project_name.app_name.app_views.client
by , 16 years ago
Attachment: | 7714.url_tag_doc.diff added |
---|
Revised Viktor's patch, adding 'project_name' to the paths
comment:3 by , 16 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Unbroke description.