Re: Configuring URLs for different views

2010-10-04 Thread simon_saffer
Thanks a lot for all your answers. It turned out that what I'd done above worked but in the template I was trying to load there was a typo. I had written: {% extends base.html %} instead of {% extends "base.html" %} Anyway it was a good thing I posted my question so that I could get your ideas on

Re: Configuring URLs for different views

2010-10-02 Thread Carles Barrobés
I sometimes use the direct_to_template generic view for a different purpose than yours (test a template), but the same URL pattern might be useful to you: # test a template (r'^direct/(?P.*)$', 'django.views.generic.simple.direct_to_template'), Although you'd better use a better regex to

Re: Configuring URLs for different views

2010-10-01 Thread bruno desthuilliers
On 1 oct, 16:07, simon_saffer wrote: (snip) > My attempt at doing > this was to put the following in > urls.py in urlpatterns > > (r'^(?P[a-zA-Z0-9]*?\.html?)$', 'mysite.views.showPage') hint : named urls are cool > and then have a views.py in the mysite 'root' with the function is 'mysite' an

Re: Configuring URLs for different views

2010-10-01 Thread Carlton Gibson
On 1 Oct 2010, at 15:07, simon_saffer wrote: > In the web site I'm creating many of the pages will not be database > driven. > I am trying to set up my urls.py so that all pages that all extend the > base.html template > can be rendered in the same way. I'm sure that I shouldn't need a > unique p

Configuring URLs for different views

2010-10-01 Thread simon_saffer
Hi, I'm completely new to Django so forgive me if this is a dumb question. In the web site I'm creating many of the pages will not be database driven. I am trying to set up my urls.py so that all pages that all extend the base.html template can be rendered in the same way. I'm sure that I should