Questions tagged [urlconf]

116 questions
4
votes
3 answers

Django: variable parameters in URLconf

I've been looking for this question and couldn't find any, sorry if it's duplicated. I'm building some kind of ecommerce site, similar to ebay. The problem i have arise when i'm trying to browse through "categories" and "filters". For example. You…
santiagobasulto
  • 11,320
  • 11
  • 64
  • 88
4
votes
4 answers

Reg Ex Django Url Conf

These is my django URLconf: urlpatterns = patterns('', ('^hello/$', hello), (r'^polls/$', 'mysite.polls.views.index'), (r'^polls/(?P\d+)/$', 'mysite.polls.views.detail'), (r'^polls/(?P\d+)/results/$',…
MacPython
  • 17,901
  • 10
  • 42
  • 48
4
votes
2 answers

how to match an url with django urlconf?

Im implementing a payment module called mercadopago (like paypal) and I need to handle a http request that is send to my site when someone make a payment(IPN) with information in in an url of this type: POST…
DrCachetes
  • 954
  • 1
  • 9
  • 30
4
votes
1 answer

Django urls giving 404 error

Django is giving me a 404 error whenever I try to access "blog/" on my site, but I've defined the URLs I want and they should be matching that. Main urls.py: from django.conf.urls import patterns, include, url from django.contrib import…
LuaWeaver
  • 316
  • 2
  • 8
4
votes
2 answers

Django reusable app url namespace issue

I have a Django project, training and an app inside this project, tests. The folder structure looks like this: django-training tests urls.py training urls.py Inside training/urls.py I have this pattern…
linkyndy
  • 17,038
  • 20
  • 114
  • 194
4
votes
2 answers

How to provide initial data to django form wizard?

According to the form wizard docs, the initial data should be a static dict. But is it possible to provide initial data dynamically? Here is my situation: def get_context_data(self, form, **kwargs): context = super(debugRegistrationWizard,…
paynestrike
  • 4,348
  • 14
  • 46
  • 70
3
votes
1 answer

URL pattern matching in django

I am getting a Page Not Found when I try to access http://127.0.0.7:8000/edit-paragraph/6/edit/, with the following error: Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this…
katherine
  • 261
  • 4
  • 15
3
votes
1 answer

Why is Django DRF urlconf not resolving url with query param

I have a urlconf with some standard paths and where the paths may optionally have a get paramerter in the form "?format=xlsx". As I read the DRF documentation, query parameters are ignored by the URLConf resolver. But , when I add a query…
3
votes
1 answer

Django urlpatterns frustrating problem with trailing slashes

All of the examples I can find of urlpatterns for django sites have a separate entry for incoming urls that have no leading slash, or the root folder. Then they handle subfolders on each individual line. I don't understand why a simple /? regular…
sansjoe
  • 262
  • 3
  • 14
2
votes
1 answer

Django urlconf performance: will nested pattern groups help or hurt?

I'm wondering if restructuring my apps' urlconfs with several nested pattern groups will provide a performance boost for when Django looks for a request-matching pattern. I'm not sure on how to test the performance, but I've tried it out and the new…
wizpig64
  • 416
  • 4
  • 9
2
votes
5 answers

How to fix "Page not found (404)" error ("Django tried these URL patterns... The empty path didn't match any of these.")

As a newbie to Django, I encountered the same problem as many before me. I would appreciate if you didn't mark my question as a double immediately because I checked the fixes those old posts suggested but to no avail. I was following this tutorial…
Zaff
  • 137
  • 3
  • 15
2
votes
1 answer

Django - redirecting to home page if no url matched

Basically, my goal is to redirect the user to the view that renders index.html if nothing from URLConf matched the requested url. Then, on the clientside, I would manage routing as appropriate or show 404 page. So basically, the question is, how…
Edgar Navasardyan
  • 4,261
  • 8
  • 58
  • 121
2
votes
2 answers

Django Tinymce js not loading

hi all Im tryng to integrate a tinymce in a django admin page. I've installed the django-tinymce module (http://code.google.com/p/django-tinymce/) I followed the instructions so these are my files: settings.py INSTALLED_APPS = ( ... …
Ghenna
  • 21
  • 1
  • 2
2
votes
1 answer

In Django 1.11 getting Circular Import Errors When including app URLconf files in project URLconf File

I'm new to Django, have been doing several tutorials to get really comfortable with the structuring, and am now running through the official tutorial. I've created an polls App, which has a polls/views.py file as follows: from django.shortcuts…
alphazwest
  • 3,483
  • 1
  • 27
  • 39
2
votes
1 answer

Tango with Django : URLconf defined in tango_with_django_project.urls. Page not found

Started learning Django a few days ago, came across this book "Tango with django" and started following it. But I am stuck here..might be a silly error with the pattern matching.. When I click a category, the relevant Category pages should be shown…