Re: How to access the key attributes of a model

2018-03-02 Thread Julio Biason
Hi Alberto, I'm guessing `def blog(request):` is actually `blog_category_posts`, right? Because you have `` on your URL, our view will receive it as another parameter, after request. So it should be `def blog_category_posts(requests, slug):` and then you can get the slug, filter the posts and

Re: How to access the key attributes of a model

2018-03-01 Thread Dylan Reinhold
That seems right. Do you get an error, or just no data in the url? You should also look into the slugify helper, https://docs.djangoproject.com/en/2.0/ref/utils/#django.utils.text.slugify Dylan On Thu, Mar 1, 2018 at 2:37 PM, Alberto Sanmartin < albertosanmartinmarti...@gmail.com> wrote: > This