Maybe it is just me, but I feel like writing out the view functions
like that is a beating. I just name[1] all the urls. Then the url tag
is easy. I just do things like {% url home-page %} or {% url blog-
index %}. If you set up a generic view in the views and name it, it
will work like normal.

[1]http://docs.djangoproject.com/en/dev/topics/http/urls/#id2

On Oct 28, 3:29 pm, Umapathy S <nsupa...@gmail.com> wrote:
> On Wed, Oct 28, 2009 at 8:03 PM, Gabriel . <gabriel....@gmail.com> wrote:
>
> > On Wed, Oct 28, 2009 at 4:16 PM, Umapathy S <nsupa...@gmail.com> wrote:
> > > view_xyz is the view function.  No arguments.
>
> > > exps is the application.  pams is project.
>
> > > pams/urls.py
>
> > > urlpatterns = patterns('',
> > >     # Example:
> > >     # (r'^pams/', include('pams.foo.urls')),
> > >     (r'pams/', include('pams.exps.urls')),
>
> > > pams/exps.urls.py
>
> > > from django.conf.urls.defaults import *
> > > from django.views.generic import list_detail
> > > from pams.exps.models import *
>
> > > urlpatterns = patterns('pams.exps.views',
> > >     (r'exps/xyz/$', 'view_xyz'),
>
> > Try with {% url exps.views.view_xyz ....
>
> > or "pams.exps.views.view_xyz"
>
> > {%
>
> Thanks.
>
>  {% url exps.views.view_xyz %} worked.
>
> Is it possible to do this for generic views?
>
> Thanks
>
> Umapathy
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to