try this
On Thu, May 14, 2020 at 3:01 AM Ahmed Khairy <ahmed.heshameldin@gmail.com> wrote:
Hi,--I have the following context and I am trying to write it correctly in a functionThis is context data :def post_view(request):qs= Post.objects.all()user= request.usercontext= {'qs':qs,'user':user,}I am trying to define it in a class PostListView(ListView):I need help writing it correctly
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e81a0fc9-f0ab-4f3b-b61d-827a67db0466%40googlegroups.com.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPxLkSQny28x4f00AULx%3DHN7FX0aZ6UasN7fdteP%2BJVd5gF09g%40mail.gmail.com.

No comments:
Post a Comment