Changes between Initial Version and Version 1 of Ticket #28556
- Timestamp:
- Sep 1, 2017, 10:30:24 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28556 – Description
initial v1 2 2 3 3 ### urls.py 4 5 {{{ 4 6 urlpatterns += 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 8 11 9 12 10 13 Now 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/'): 11 14 ### my_custom_tag 15 16 {{{ 12 17 path = context['request'].path 13 18 url_parts = resolve(path) # raises 404 14 ### 19 }}} 20 21 The URL of course exists as it is the current URL directly from the context. 15 22 16 23