Hi, your dpaste snippet has expired so i can't see exactly what it was
trying to achieve but i'm wondering why you can't use a template tag
to pull in featured articles.

If your using the same template in multiple context maybe using child
templates for each context.  Or adding the view name into the context
in the view function.

I did see a blog post about getting the view function which used the
python inspect module to pull the stack trace which seems like a heavy
weight solution to the problem.

Also this is not really satchmo specific and would be better asked in
the django-users group.


On Dec 4, 11:14 pm, cmo <[email protected]> wrote:
> Hello,
>
> I need the featured articles list (display_featured()) to be available
> in the Context of "category_view".
>
> For the sake of performance, I don't want to inject it in all views.
>
> So I created the following signal listener :http://dpaste.org/VQzM/
>
> It runs perfectly.
>
> My question is : Is there a more elegant / lighter way to retrieve the
> view than using django resolve() ?
>
> Thanks,
>
> Cyril

--

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


Reply via email to