Maybe I read badly, bu I understood that you needed to modify EVERY VIEW to add something to the context of the template, the link I gave you show how to use a Processor, that is "some function called before rendering a template" more or less like an "intermediate view"

Look at the example carefully:
In myapp/context_processors.py
1def media_url(request): 
2    from  django.conf import settings 
3    return {'media_url' : settings.MEDIA_URL} 

And in settings.py
TEMPLATE_CONTEXT_PROCESSORS = ('myapp.context_processors.media_url ',)

On your case you would maybe want to return 'user': request.user

> As far as I can tell the way to do this is to modify *every* *view* *in* *my* *project* to pass
> either the user or a RequestContext.

The link I gave you is to not do that, but add a processor that will add the user to the context.

On 9/12/06, Joeboy < [EMAIL PROTECTED]> wrote:

> On the linked thread have you checked:
> http://www.b-list.org/weblog/2006/06/14/django-tips-template-context-processors?
> You can use a context processor to make {{ user }} available on all
> templates.

Unless I'm missing something, that link says the same as what I'm
saying, namely that you need to use RequestContext everywhere if you
want your apps to be pluggable.

Now, this seems to me to be a rather crucial and earth-shattering,
given that

a) It means basically abandoning the principle of keeping data nicely
partitioned and making stuff available 'everywhere'.

b) I don't think the django tutorials even mention RequestContext once;

I don't really understand why no-one apart from me seems to think this
is important. Now, I'm a huge django fan, but frankly this seems like
the kind of skank that repelled me from all the php frameworks I tried
(and yes, I'm trolling in the hope of getting some kind of response...)

Joe







--
The probability of failure of a (computer) system is exponentially proportional to the physical distance between it and the one who could fix it. -- Martin F. Krafft
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to