Questions tagged [urlconf]
116 questions
0
votes
1 answer
Django - Ajax: sending url params in data
I am trying to send a "GET" and "POST" requests to Django server via Ajax.
First, I provide the URLConf:
url(r'^write_to_file/(?P.*)/(?P.*)/$',generalFunctions.write_to_file, name ='write_to_file'),
Now, the AJAX part.…

Edgar Navasardyan
- 4,261
- 8
- 58
- 121
0
votes
0 answers
Regular expression for matching any number of whitespaces, latin characters and figures in Python
I am looking for a way to pass a string (an sql query) to Django view from JQuery. As such, I want my string to include any number of alphabetic characters, underlines and whitespaces ordered in arbitrary sequence. [\s_a-zA-Z0-9]+ seems to be the…

Edgar Navasardyan
- 4,261
- 8
- 58
- 121
0
votes
2 answers
Django Error passing URL argument from Template to View: NoReverseMatch Reverse not found. 1 pattern(s) tried
I am trying to pass configure a URL like so:
/details/12345
Template HTML:
{% if article_list %}
{% for article in article_list %}
{{ article.title }}
{{ article.body }}
…
nikjohn
- 20,026
- 14
- 50
- 86
0
votes
1 answer
Tango With Django - Fun With Forms URLconf Error
I am currently doing the latest tango with django course and have just about finished '8. Fun with Forms', I however cannot solve an error I am getting. The course tells us to make an add_page form and supplies us with the view and the form, all we…

eZ_Harry
- 816
- 9
- 25
0
votes
1 answer
Django Url NoReverseMatch
I'm trying to create an url that has both the slug and the pk of a given model. However, I'm running into the NoReverseMatch error when I try this.
The url:
urlpatterns = patterns('',
# Blah Blah
…

user3084860
- 421
- 5
- 19
0
votes
1 answer
Django URLconf error
I am trying to build a website with Django. I am new to Django and have followed the Tango with Django tutorial.
I keep getting an URlconf error I do not understand.
I have a domain (www.example.com), an app (mainApp) and two views in mainApp…

user4422
- 278
- 3
- 11
0
votes
1 answer
URL Conf - Serving views at the root URL and non root URLs within one app
I've run into a problem configuring the url.py files in a new project. I have one app, which contains two views. The first view should appear at myurl.com, while the other should appear at myurl.com/foo. myurl.com appears without trouble but…

user3501855
- 131
- 1
- 1
- 7
0
votes
2 answers
Django Url Conf Dynamic Url Conflict
So I have two models in the same app that have pretty much identical url structures:
urlpatterns = patterns('',
#....
url(r'^prizes/', include(patterns('prizes.views',
url(r'^$', 'PrizeStore_Index', name="prizestore"),
…

user3084860
- 421
- 5
- 19
0
votes
1 answer
Django url patterns having reverse lookup issues with optional parameters
I am having some weird issues with reverse lookups. Here is my url scheme.
url(r'^overview/', 'ledger.views.overview', name='overview'),
url(r'^overview/(?P\w+)$', 'ledger.views.overview', name='overview_tutorial'),
When I call return…

Chase Roberts
- 9,082
- 13
- 73
- 131
0
votes
1 answer
Django Urlconf Named Groups String Matching
I'm trying to match two strings in an url, but it's not working out likely due to my poor knowledge of regex. I want urls like the following:
testserver/username/
testserver/username/1234/
testserver/username/rewards/
Username would be passed in…

user3084860
- 421
- 5
- 19
0
votes
1 answer
URLConf that works on development server but not on GAE
I am using Django non-rel in Google App Engine, and my URLConf seems not to work and generate a 500 Server Error.
This is my urls.py file at the root of my app :
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
…

Hicham
- 17
- 3
0
votes
2 answers
Urlconf redirecting to an unexpected url
I had earlier deleted this question as the problem suddenly disappeared while working on other parts of the code, but reappears and persists now.
I have a url that should go to /ask/ but instead is giving me a login view because it is linking to…

yayu
- 7,758
- 17
- 54
- 86
0
votes
2 answers
Django URLconf: getting a 404 error
urls.py in project root
url(r'^people/',include('profiles.urls'))
profiles/urls.py
urlpatterns =…

yayu
- 7,758
- 17
- 54
- 86
0
votes
1 answer
Django Url Not Finding Model
I'm having trouble with my urlconf. I get the following error when trying to visit a page:
NoReverseMatch at /admin/r/17/1/
Reverse for 'reward' with arguments '()' and keyword arguments '{'slug': u'yummy-cake'}' not found. 1 pattern(s) tried:…

user3084860
- 421
- 5
- 19
0
votes
1 answer
Django Admin Urls Not Working
Some of my django urls will not work. I can visit my index page and the django admin page just fine. I can log in and create objects no problem. For example, I can create a site, like below, but when I try to visit the collection of sites, I get hit…

user3084860
- 421
- 5
- 19