Changes between Initial Version and Version 1 of Ticket #28556


Ignore:
Timestamp:
Sep 1, 2017, 10:30:24 AM (7 years ago)
Author:
nielsole
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28556 – Description

    initial v1  
    22
    33### urls.py
     4
     5{{{
    46urlpatterns += i18n_patterns(
    5     url(r'^', include('main.urls', namespace="main")),
    6     prefix_default_language=False)
    7 ###
     7   url(r'^', include('main.urls', namespace="main")),
     8   prefix_default_language=False)
     9}}}
     10
    811
    912
    1013Now in a custom tag I try to resolve the URL(e.g. '/login/', '/en/login/'). This fails if the path is not prefixed(e.g. '/login/'):
    1114### my_custom_tag
     15
     16{{{
    1217path = context['request'].path
    1318url_parts = resolve(path) # raises 404
    14 ###
     19}}}
     20
     21The URL of course exists as it is the current URL directly from the context.
    1522
    1623
Back to Top