On 2/27/07, va:patrick.kranzlmueller <[EMAIL PROTECTED]> wrote:
>
> from django.conf.urls.defaults import *
>
> urlpatterns = patterns('',
>       (r'^stars/', 'django.views.generic.simple.direct_to_template',
> {'template': 'site/stars/stars_overview.html'}, extra_context=
> {'category': 'stars', 'subcategory': 'none'}),
> )
>
> isnĀ“t that supposed to work? did I miss something?

Yeah. You're trying to treat extra_context like it's a keyword
argument to a function call, but you're not calling a function. You
probably mean something like this:

urlpatterns = patterns('',
    (r'^stars/', 'django.views.generic.simple.direct_to_template', {
        'template': 'site/stars/stars_overview.html',
        'extra_context': {
            'category': 'stars',
            'subcategory': 'none'
        }
    })
)

If you want to delve deeper into "why", check this out. Especially section 4.7.3
http://docs.python.org/tut/node6.html#SECTION006700000000000000000

Joseph

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to