> Hi Tom if you read my original post you will realise that the error is
> being caused by setting of context processors to media_url (see
> original post).
> When context processors are active the {media_url} tag works
> perfectly, but breaks the admin.
>
> If I comment out :
> settings.py
> #TEMPLATE_CONTEXT_PROCESSORS =
> ('portfolio.context_processors.media_url',)
> and
> urls.py
> #from django.template import RequestContext
>
> the admin then works.
You have completely overridden the default template context
processors. All the functionality that the admin depends on -
authentication, csrf protection, internationalisation, messages - has
all now gone thanks to this setting.
You should just *add* your processor to the existing list. However, I
don't understand why you want to do this at all, given that the
default list already includes the
"django.core.context_processors.media" processor which does exactly
the same as your version.
--
DR.
--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment