Hi Rok, 
I suppose you want to *list* all your posts :) List is where you display 
many instances on one page (and your url is e.g. `.../classes/`). 
And as you probably already know, if you want to retrieve just one post (or 
class, or whatever you call it), you need a detail view, and the url will 
contain the retrieved item's pk (primary key): `.../classes/1`. 

Hope this is what you were looking for.


On Tuesday, 2 April 2019 03:22:59 UTC+2, Rok Klancar wrote:
>
> Hello developers!
>
> Much respect to you all.
>
> I have just finished a couple of hours browsing the web, but found no 
> solution. I guess my problem is simply *not knowing the right term *for 
> the thing that I am trying to make (in Django of course).
>
> Brief description:
> I have made a class 'Post' in *models.py *that represents four different 
> kind of data:
>
>    - Date
>    - Int
>    - Text 1
>    - Text 2
>
> It is sort of like a blog post. Now, in the official Django tutorial I 
> have learned how to make posts appear on separate pages.
> But I want the different instances of this class 'Post' appear one under 
> another on a single page (Today's post is on top, yesterday's is bellow the 
> today's, etc.).
>
> I hope I made my issue clear.
> I would be happy, just if you told me, how do you call this shape of a 
> page in Web Dev jargon.
>
> Have a nice day
> Rok
>
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0604272b-068b-407f-8425-1a04ba82fecc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to