Coolguy Please can we chat on WhatsApp... The post details is really giving me headache, please help out
On Fri, Jul 3, 2020, 9:04 PM coolguy <[email protected]> wrote: > Seems pretty simple unless you have specific question about something. > > You have a model which has some fields including Slug field which should > be unique i.e. unique=True but your screen shot is not clear.. > > In views you are overriding the get_queryset() method of base class and > assigning it to query variable for the 'q' from http GET request. Then > filtering Post data with the values in query object you have just created. > Finally returned the revised object_list including this new query context. > > In post_detail_views you are retrieving data from Post based on the post > slug and assigning it to variable 'f'. Finally you used the render() > shortcut to render the retrieved post using a template. > > In your urlpatterns you have defined the path for your post_detail which > send the post as a slug to your view and in turn view returns the HTTP > response. > > On Friday, July 3, 2020 at 11:10:22 AM UTC-4, Tanni Seriki wrote: >> >> Please can someone put me through on this, post details view either one >> the function based view or class based view. Thanks > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/d2457503-b332-4f26-8f8a-cda32934419fo%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/d2457503-b332-4f26-8f8a-cda32934419fo%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALWCJq073zXnm3NBAh10KNJiBbD%3DQTZj9B%3DXeBAfQ4mcrP0%2BoA%40mail.gmail.com.

