I'm just getting started in Django and I'm stuck.

I have defined in settings a variable called STATIC_ROOT that contains
the root URL where static assets are served. In development it's
something like static.example.com.local and in production it would be
static.example.com

How do I pass this along to views that are implemented in in Django
contrib?

The documentation seems to imply you can do this:

urlpatterns = patterns('',
    (r'^foo/$', views.foobar_view, {'template_name':
'template1.html'}),
)

but when I try it with code like this

    ...
    (r'accounts/login/$', 'django.contrib.auth.views.login' ,
{'staticroot' : settings.STATIC_ROOT}),
   ...

 I get this error:

login() got an unexpected keyword argument 'staticroot'

Is there any way to pass more dictionary values to
django.contrib.auth.views.login?


--~--~---------~--~----~------------~-------~--~----~
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