Questions tagged [urlconf]

116 questions
2
votes
2 answers

Django TemplateView searching in wrong place

My Django structure is: testing contacts __init__.py templates contacts index.html (additional modules) testing __init__.py templates testing …
inthenameofmusik
  • 617
  • 1
  • 4
  • 16
2
votes
1 answer

How Do I Properly Set Up URLConf in Django (RegEx?)

I've recently completed the Django Tutorial and am now working on my own web app. The problem I am having is setting up the URLConf for this application. I still don't fully understand the RegEx matching in order to link different pages to each…
freddiev4
  • 2,501
  • 2
  • 26
  • 46
2
votes
3 answers

Django change url programmatically

I have to page in my django powered website. index.html and books.html I have this link to the books.html in my first page books and this one is in books.html for getting back to the first page.
Ghasem
  • 14,455
  • 21
  • 138
  • 171
2
votes
2 answers

Remove a part of url address in Django

I'm developing a multilingual web page. url.py urlpatterns = patterns('', url(r'^$', 'mysite.views.home', name='home'), url(r'^(?P\w{2})/$', 'mysite.views.home') url(r'^admin/', include(admin.site.urls)), ) views.py def…
Ghasem
  • 14,455
  • 21
  • 138
  • 171
2
votes
1 answer

Django URLconf: How to use captured params in include's RedirectView?

I have a parent URLconf: from django.conf.urls import include, patterns, url urlpatterns = patterns('', (r'^main/(?P[^/]+)/(?P[^/]+)/(?P[^/]+)/', include('foo')), ) And a child URLconf (included in the parent) that includes a…
jawns317
  • 1,726
  • 2
  • 17
  • 26
2
votes
1 answer

The included urlconf doesn't have any patterns in it + django

I have been trying out the django tutorial and stuck with this error. I am in the 3rd page of the tutorial and everything was going good until i encountered this error Django Tutorial. I was following the exact steps in the tutorial. This is the…
rv_k
  • 2,383
  • 7
  • 39
  • 52
2
votes
1 answer

Django URLConf - url() function - can it be omitted?

I just found out that the following code gives the same result: urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), ) as this one: urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), ) So, what is the…
dowjones123
  • 3,695
  • 5
  • 40
  • 83
2
votes
1 answer

The Urlconf doesn't have any patterns in it when using {% url %} tags on production server

I'm having trouble understanding why my url tags in my base.html: Login generate an exception when working on the heroku production server. When loading the page, I receive an error stating that "The included urlconf xxxxx.urls doesn't have any…
2
votes
1 answer

Non-capturing optional URL elements in Django

I'm using Django and would like to match the URLs domain.com/w and domain.com/words. I have a configuration line of the form: url(r'^w(ords)?$', 'app_name.views.view_words') view_words takes only one parameter (request), but it seems that Django…
Andrew Buss
  • 1,532
  • 2
  • 14
  • 23
2
votes
1 answer

Django: Issue with url conf

I'm trying to change my project to use class based views, and I'm running into a strange error with my url conf I have a classed based view: class GroupOrTeamCreate(AjaxableResponseMixin, CreateView): model = GroupOrTeam fields = ['name',…
ptr
  • 3,292
  • 2
  • 24
  • 48
2
votes
2 answers

URL config error Django

I have a link a href="editYou/{{costumer.slug}}" and URL parttern (r'editYou/.*)/$', 'editYou'), that points to method def editYou(request, costumerSlug): but Django shows an error: The current URL, profile/editYou/es, didn't…
hln
  • 1,071
  • 4
  • 21
  • 37
2
votes
2 answers

Django: GET css returns 404?

I am developing a Django site and after a series of edits I ran my server again when suddenly - no css! The server still displays the html site, of course, but the css all across the site is throwing a 404 error. My static files information in my…
fildred13
  • 2,280
  • 8
  • 28
  • 52
2
votes
1 answer

Django root site in virtual directory

The following is the setup: I have a virtual directory in IIS 6 in which my Django app lives, IIS is configured to pass every request on that virtual directory to the Django WSGI handler Let's say this is domain.com/virtual/ In my Django dev URL…
A.J.Rouvoet
  • 1,203
  • 1
  • 14
  • 29
2
votes
1 answer

Django: avoid passing common url param to each view

Possible Duplicate: Django: How to access URL regex parameters inside a middleware class? I am using django in google appengine. Each url in my app has a company code in the format: http://localhost:8080/[company]/blah/blah What I want to do is…
2
votes
2 answers

How can I write the regex for those urls

I'm trying to build a small wiki, but I'm having problems writing the regex rules for them. What I'm trying to do is that every page should have an edit page of its own, and when I press submit on the edit page, it should redirect me to the wiki…
Mahmoud Hanafy
  • 7,958
  • 12
  • 47
  • 62