Many thanks! Now I got it! :) Am Samstag, 14. Februar 2015 05:28:40 UTC+1 schrieb inoyon artlover KLANGRAUSCH: > > Hi there, there is something I obviously don't understand. According to > django reference, > the DetailView has to be provided a slug or pk. I do it in the url but > django constantly doesn't > recognize the slug in the url. 'current url doesn't match etc.' what is > wrong here? I do everything > like it is explaind and it doesn't work.. very frustrating sometimes... > > > My models.py: > > class List01(models.Model): > name = models.CharField(max_length=100, default='name') > surename = models.CharField(max_length=100, default='surename') > slug = models.SlugField() > > > views.py > > class List(DetailView): > template_name = 'index.html' > model =List01 > > urls.py > > urlpatterns = patterns('', > url(r'^admin/', include(admin.site.urls)), > url(r'^(?P<slug>)$',List.as_view()), > ) >
-- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/671c9f52-a48d-4529-a126-31542515dbf2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.