Code

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#8130 closed (invalid)

url pattern resolving doesn't work for urls that have groups (ex: admin)

Reported by: alperkanat Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

this is the line in urls.py for admin app:

url(r'admin/(.*)', admin.site.root, name='admin_page'),

i'm calling this within the template like this:

{% url admin_page %} - django can't resolve and match the part.. it says:

TemplateSyntaxError at /tr/blog/
Could not parse the remainder: ' from '

If I write any word I want (instead of part) in {% url admin_page %} then it would work fine....

Attachments (2)

urls.py (772 bytes) - added by alperkanat 6 years ago.
root urls.py file
sidebar.html (4.3 KB) - added by alperkanat 6 years ago.
sidebar.html which calles admin_page named url

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by alperkanat

root urls.py file

Changed 6 years ago by alperkanat

sidebar.html which calles admin_page named url

comment:1 Changed 6 years ago by ubernostrum

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

This is a usage/coding error question, not a bug report, and as such should go to the django-users mailing list of the #django IRC channel.

comment:2 Changed 5 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.