#35616: "url" template tag works with a context variable only if left unquoted -----------------------+------------------------------------------- Reporter: Pzdrs | Type: Uncategorized Status: new | Component: Template system Version: 5.0 | Severity: Normal Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------+------------------------------------------- I tried passing a context variable as the url_name parameter like so:
{{{ {% url 'url' %} }}} Django raises a NoReverseMatch exception - Reverse for 'url' not found. 'url' is not a valid view function or pattern name. When left unquoted like so: {{{ {% url url %} }}} PyCharm gives me a warning (View names should be in quotes since Django 1.5 and should have no quotes before 1.5) despite Django apparently accepting this and resolving to the correct URI. Using Django 5.0.7 -- Ticket URL: <https://code.djangoproject.com/ticket/35616> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/01070190c783775a-e1fafb3c-b5ff-43c9-a3fa-14e2b6ada684-000000%40eu-central-1.amazonses.com.