On Fri, Oct 17, 2008 at 3:30 PM, dkadish <[EMAIL PROTECTED]> wrote:

>
> Okay. I think the issue is that I am trying to use reverse( ) in the
> URLConf file. According to the django docs, "the reverse() function
> has to import all of your URLConf files and examine the name of each
> view". My thinking is that this is leading to to attempt to import
> itself as it evaluates the URL.
>
> Can anyone confirm this? Is there a known workaround?
>
>
Specify the post_save_redirect as a callable instead of an object in the
extra_context dictionary:

def reverse_home():
    return reverse('project-home')

urlpatterns = patterns('',
   url(r'^$', list_detail.object_list,
       {'queryset': Project.objects.all()}, 'project-home'),
   url(r'^new$', create_update.create_object,
       {'model': Project, 'post_save_redirect': reverse_home},
'project-new'),
)

Karen

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