On 12/30/05, Michael Hipp <[EMAIL PROTECTED]> wrote:
> The tracebacks I'm getting seem to be alternately complaining about my
> templates and urlpatterns.  So, 2 questions:
>
> 1) What do I put in urls.py that is a basic "catch all" pattern?
>     I tried:
>       urlpatterns = patterns('',)
>       urlpatterns = patterns('', (r'*', ''),)
>
> 2) How do I tell it to find my base.html in the mysite/templates directory?

Hey Michael,

You'll want to use the "direct to template" generic view, documented here:
http://www.djangoproject.com/documentation/generic_views/#using-simple-generic-views

Here's the URLconf you'd use:

urlpatterns = patterns('',
    (r'.*', 'django.views.generic.simple.direct_to_template',
{'template': 'base'}),
)

And you'd create a template "base.html" in the directory pointed-to by
your TEMPLATE_DIRS setting.

Let us know how it goes, and happy new year!

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to