Changes between Initial Version and Version 1 of Ticket #10268


Ignore:
Timestamp:
Feb 15, 2009, 9:58:21 AM (15 years ago)
Author:
Karen Tracey
Comment:

[Fixed formatting. (Please use preview, also {{{ }}} is for preformatted text, not quoting, so I italicized the quote from the doc instead of just fixing the {{{ }}} placement, since with the triple curly brackets you just got a long quote that you had to scroll right to read.)]

This proposal does not have enough specifics to be a viable ticket. You say you are sure Django knows the context of which app is currently running, but that is not true. When servicing a request, code from many apps may be called. When rendering a template, code from many apps may be called. The only things strongly tied to an app in Django are models, and perhaps (given how django.contrib.admin.autodiscover() operates) admin definitions.

There is no notion of a "current app" when url patterns are being evaluated, nor when a template is rendered. So it isn't at all clear to me how you expect Django to auto-determine an appropriately unique app-specific prefix for named url patterns, neither when they are evaluated/named nor when they are referenced via {% url %} tags. Without such specifics, I don't see how this ticket is going to make any progress, so for now at least I'm closing it as invalid.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10268

    • Property Resolutioninvalid
    • Property Status newclosed
  • Ticket #10268 – Description

    initial v1  
    1 {{{When you name your URL patterns, make sure you use names that are unlikely to clash with any other application's choice of names. If you call your URL pattern comment, and another application does the same thing, there's no guarantee which URL will be inserted into your template when you use this name.
     1''When you name your URL patterns, make sure you use names that are unlikely to clash with any other application's choice of names. If you call your URL pattern comment, and another application does the same thing, there's no guarantee which URL will be inserted into your template when you use this name.
    22
    3 Putting a prefix on your URL names, perhaps derived from the application name, will decrease the chances of collision. We recommend something like myapp-comment instead of comment.}}}
     3''Putting a prefix on your URL names, perhaps derived from the application name, will decrease the chances of collision. We recommend something like myapp-comment instead of comment.''
     4
    45Taken from here: http://docs.djangoproject.com/en/dev/topics/http/urls/
    56
Back to Top