Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#18383 closed Uncategorized (invalid)

Path in url tag must not be in quotes

Reported by: alexander996@… Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi in documentation the path is specified like this

{% url 'path.to.some_view' v1 v2 %}

in fact there should be no quotes

{% url path.to.some_view v1 v2 %}

Change History (4)

comment:1 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Either you're reading the documentation for Django 1.5, or you forgot the {% load url from future %} statement in the template.

comment:2 Changed 3 years ago by alexander996@…

my version is

print django.VERSION

(1, 4, 0, 'final', 0)

I use this documentation

https://docs.djangoproject.com/en/dev/ref/templates/builtins/#url

is something wrong?

comment:3 Changed 3 years ago by aaugustin

Yes, you're reading the docs for the in-development version, where the syntax of the url tag was changed, but you're using the 1.4 version.

Use the version switcher at the bottom right to select "1.4" instead of "dev".

comment:4 Changed 3 years ago by anonymous

ok thanks :)

Note: See TracTickets for help on using tickets.
Back to Top