I thought I had been everywhere on the web but guess not.  This really
helped me a lot and I have it working now. Thanks a lot!

frank-


On Tue, Jun 29, 2021 at 7:57 PM Lalit Suthar <sutharlalit...@gmail.com>
wrote:

> https://youtu.be/SNXn76SI1Ks
> try this
>
> On Wed, Jun 30, 2021, 1:27 AM frank dilorenzo <frankdi...@gmail.com>
> wrote:
>
>> Here is a function view:
>>
>> def base(request):
>>
>>     shipments = Shipment.objects.all().order_by("-slabel")[:5]
>>
>>     suppliers = Supplier.objects.all()
>>
>>
>>     context = {
>>
>>         "shipments": shipments,
>>
>>         "suppliers": suppliers,
>>
>>     }
>>
>>     return render(request, "base/dashboard.html", context)
>>
>>
>> I tried to figure this out myself but apparently I can't.  I want to
>> convert this to a class based view if possible but I couldn't figure out
>> how to send the context data to the .html file.  Not sure it that is even
>> possible.  I am new to django for sure.
>>
>>
>> Frank
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/95d0558e-5f34-4e81-b20c-c95aee4af739n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/95d0558e-5f34-4e81-b20c-c95aee4af739n%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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGp2JVFDGwDMMb%2BKJ-SCamJToR2N94B4ENBhL2f5MQyQRhO-iw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGp2JVFDGwDMMb%2BKJ-SCamJToR2N94B4ENBhL2f5MQyQRhO-iw%40mail.gmail.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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJbiy1B1BOnYS4PSkWu8589htbh0v%3D706WE_WjJ%3DPSgKv0bXiw%40mail.gmail.com.

Reply via email to