#17716: include(arg, namespace=None, app_name=None) replace app_name with 
namespace
-------------------------------------+------------------------------------
     Reporter:  blackip@…            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core (URLs)          |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:  include reverse url  |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+------------------------------------
Changes (by apollo13):

 * cc: apollo13 (added)
 * version:  1.4-alpha-1 => master


Comment:

 The behaviour is as documented in:
 https://docs.djangoproject.com/en/1.7/topics/http/urls/#url-namespaces --
 we might wanna raise an error though if `app_name` is used without a
 `namespace`.

 To explain why this behaviour is as documented:

 {{{  {% url app_name:view_name %}  }}}
 does not work, cause in step 4 of the referenced docs, there is no
 application instance (you didn't specify `namespace`)

 {{{  {% url namespace:view_name %}  }}}
 does work, cause it finds it as instance namespace in step 5.

 To fix the broken example above use:

 {{{ url(r'^cart/', include('cart.urls',app_name='cart',namespace='cart')),
 }}} -- This way reverse will terminate at step 3.

--
Ticket URL: <https://code.djangoproject.com/ticket/17716#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/075.6e094edfc4fd0d58c8bb90beb5634b72%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to