Re: about url tag
On 31 March 2011 18:50, Lic. José M. Rodriguez Bacallao
<jmrbcu@gmail.com> wrote:
> well, I don't know if this is ok, but I solved the problem adding a
> name='help_subject' tu the urlconf line
Sorry, I couldn't answer earlier, but yes - that is exactly what you
should do. Class-based views can't be referenced by using dot
notation, so you must name them and reverse them by name.
Django expects a string in form of "<module_path>.<function_name>". A
class-based view is not a module, so it has no chance of success. Even
if it somehow was able to get the as_view method from the class, there
is no way to tell to which URL it was bound (look at how as_view()
works for more details).
Naming all your URLs is a good practice anyway.
--
Łukasz Rekucki
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home