sorry, I have atypo in the previous code, this is the las line: (r'(?P<slug>[0-9A-Za-z-]+)', HelpSubject.as_view()),
On Thu, Mar 31, 2011 at 12:36 PM, Lic. José M. Rodriguez Bacallao <jmr...@gmail.com> wrote: > I am getting a this error: > TemplateSyntaxError at /help/ > > Caught NoReverseMatch while rendering: Reverse for > 'apps.help.views.HelpSubject.as_view()' with arguments '()' and > keyword arguments '{'slug': u'gdsgdgdg'}' not found. > > On Thu, Mar 31, 2011 at 12:33 PM, Lic. José M. Rodriguez Bacallao > <jmr...@gmail.com> wrote: >> I mean url tag: {% url ... %} >> >> this is what I am using: <a href="{% url >> help.views.HelpSubject.as_view() slug=help_subject.slug %}">Leer >> mas...</a> >> >> directory structure: >> >> site >> |--> url.py >> |--> apps (included in the python path) >> |--> help >> |--> models.py >> |--> views.py >> |--> urls.py >> >> where: >> "apps" is a package (is in the python path) >> "help" is my application >> "HelpSubject" is a class based view, here is the definition: >> >> >> class HelpSubject(DetailView): >> template_name = 'help/help_subject.html' >> context_object_name = 'help_subject' >> queryset = HelpSubject.objects.filter(published=True) >> >> and here is the two lines in url.py and apps/help/url.py >> >> url.py: >> (r'^help/', include('help.urls')), >> >> apps/help/url.py: >> (r'(?P<slug>[0-9A-Za-z-]+)', help.HelpSubject.as_view, >> >> 2011/3/31 Łukasz Rekucki <lreku...@gmail.com>: >>> On 31 March 2011 17:16, Lic. José M. Rodriguez Bacallao >>> <jmr...@gmail.com> wrote: >>>> use the tag: >>>> url >>> >>> What do you mean by that ? Do you mean the {% url %} template tag, or >>> the `url` function commonly used in urls.py module. Give us some >>> examples of what you want to achieve and what problems you have. >>> -- >>> Ł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+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >>> >> >> >> >> -- >> Lic. José M. Rodriguez Bacallao >> Centro de Biofisica Medica >> ----------------------------------------------------------------- >> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo. >> >> Recuerda: El arca de Noe fue construida por aficionados, el titanic >> por profesionales >> ----------------------------------------------------------------- >> > > > > -- > Lic. José M. Rodriguez Bacallao > Centro de Biofisica Medica > ----------------------------------------------------------------- > Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo. > > Recuerda: El arca de Noe fue construida por aficionados, el titanic > por profesionales > ----------------------------------------------------------------- > -- Lic. José M. Rodriguez Bacallao Centro de Biofisica Medica ----------------------------------------------------------------- Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo. Recuerda: El arca de Noe fue construida por aficionados, el titanic por profesionales ----------------------------------------------------------------- -- 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.