On May 26, 9:28 pm, Steve Howell <showel...@yahoo.com> wrote:
>
> From the docs you might want to take advantage of the name= parameter
> in your URLS setup and do something like {% url 'add_media_action'
> %}.  Not sure about the quoting, as the docs are vague about quoting
> literals.
>
> '''
> New in Django 1.0: Please, see the release notes
>
> If you're using named URL patterns, you can refer to the name of the
> pattern in the url tag instead of using the path to the view.
> '''
>
> It seems like the login_required method may be confusing you:
>
> url(r'^add/$', login_required(views.add_media),
>         name = 'add_media_action'),
>
> I am guessing the login_required method returns another method that
> gets set up into the url data structure, so the reverse code has no
> way of knowing about views.add_media anymore.   Does that make sense
> to you?
>
> Perhaps you can try to step through the code in the debugger.  The top-
> level method involved in reversing URLs are not super complicated.
> You can set a breakpoint in django/core/urlresolver.py to see what's
> happening.

Steve, thanks for your suggestion to trace django code, I've finally
found what was the problem. Don't know how to fix it yet so I disabled
some fancy ajax-based functionality. But at least I am no getting this
mysterious 500 errors any more.

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