>From what I now understand, this is indeed impossible. But I would
appreciate it if someone could confirm this.

And so what is the best way to lookup a table entry based on the page
viewed? I have a table called Page and it contains things like page
title, meta tags, which menu section each page is in etc. Currently
most of my pages use direct_to_template, so I can't do it by view.

Go on, please help me!

Thanks,
Tom

On Aug 21, 8:06 pm, 7timesTom <[EMAIL PROTECTED]> wrote:
> I have general processing to do in my context processor based on which
> url was used.
>
> How can find out the name of the url used eg in my middleware. I feel
> like I want to do:
>
> def process_view(self, request, view_func, view_args, view_kwargs):
>         request.url_name = view_kwargs.get('name', None)
>
> then get it from request.url_name after that? But something similar
> should work right?
>
> I can't use reverse() on the view name because I use
> direct_to_template quite a bit.
>
> Is it impossible?
>
> Thanks,
> Tom

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