Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9003123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:40:23+00:00 2026-06-16T00:40:23+00:00

In my last question I asked how to get urls working for parameter before

  • 0

In my last question I asked how to get urls working for parameter before included urls.py and it worked.
Django {% url %} when urls with parameters like: url(r'^foo/<parameter>/$', include(some.urls))

Now I want to use the same included urls.py with namespaces.

urls.py

urlpatterns = patterns('',
    url(r'^/foo/(?P<parameter_1>\d+)/', include('bar.urls', namespace='foo', app_name='foo')),
    )

bar.urls.py

urlpatterns = patterns('',
    url(r'^/bar/$', 'bar.views.index', name='bar'),
    url(r'^/bar/(?P<parameter_2>\d+)/$', 'bar.views.detail', name='bar_detail'),
    )

To get the url in template I use:

1. {% url foo:bar parameter_1=1 %} or {% url for:bar 1 %}
2. {% url foo:bar_detail parameter_1=1 parameter_2=1 %} or {% url foo:bar_detail 1 1 %}

I expect to get the url: 1. /foo/1/bar/ and 2. /foo/1/bar/1 but it does not work.

Interesting: if I call:

1. {% url foo:bar %}
2. {% url foo:bar_detail parameter_2=1 %} or {% url foo:bar_detail 1 %}

I get the urls:
1. /foo/(?P<parameter_1>%5Cd+)/bar/ and
2. /foo/(?P<parameter_1>%5d+)/bar/1

My question: Did i have a fault in my code or is the code not useful for, what i want to do.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:40:24+00:00Added an answer on June 16, 2026 at 12:40 am

    I searched again and found the fault. There’s a bug in the /django/core/urlresolvers.py.

    I found the ticket at https://code.djangoproject.com/ticket/11559#no1.

    To fix the problem you have to replace the /django/core/urlresolvers.py with the changed file from https://github.com/django/django/commit/02dcbe3317.

    After restarting the def-server with python manage.py runserver the url-tags are resolved correct. I get /foo/1/bar/ from {% url foo:bar 1 %} instead of /foo/(?P<parameter_1>%5Cd+)/bar/.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I asked a similar question last week but did not get an answer that
I asked a similar question last week and didn't get a very good response,
I previously asked a similar question, but still didn't get a working answer. So
Last night I asked a question like this, I'm not sure what's happening and
I asked this question earlier, but am still unable to get it working. I
Variations of this question have been asked before, but it seems like the issue
So I've seen this question asked before and in fact I asked it last
I guess this is a continuation of the last question I asked: bulk insert
This is similar to this question I asked last week. My dataGrid is populated
I previously asked a question about fetching the last 100 mentions for a person

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.