On Mon, Feb 22, 2010 at 11:01 AM, andreas schmid <a.schmi...@gmail.com> wrote: > im experiencing a problem since today: > > my model : > > class Technology(models.Model): > title = models.CharField(max_length=250, > help_text=_('Type in the technology title')) > body = models.TextField(help_text=_('Type in the > description of the technology')) > slug = models.SlugField() > > ... > > @models.permalink > def get_absolute_url(self): > return ('my_technology_detail', (), { 'slug': self.slug }) > > my view: > > def technology_detail(request, slug): > technology = get_object_or_404(Technology, slug=slug) > return render_to_response( 'techn_detail.html', > {'technology': technology}) > > my url: > ... > > url(r'^/technlogies/(?P<slug>[-\w]+])/$', ^^^ Remove the extraneous square bracket and everything should be golden.
> technology_detail, > name='my_technology_detail'), > ... > > whatever i try to do with the detailview of this model i get a: > Exception Type: NoReverseMatch > Exception Value: > > Reverse for 'my_technology_detail' with arguments '()' and keyword arguments > '{'slug': u'whatever-slug'}' not found. > > > but the technology is saved in the db and the slug is the right slug and > i have other models written the same way but they are working. what am i > missing? > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.