Re: Multiple Templates in single list view

2021-11-21 Thread David Nugent
Well, there are several ways you can deal with that. Probably easiest is to override get_template() and switch the template based on whatever type of ticket you're managing or you can change the value of self.template_name based on the request. Or maybe you prefer a single template to deal with a

Re: Multiple Templates in single list view

2021-11-21 Thread Trippy Samurai
What about the templates i have three different templates for as u can see in template_name in the above views ,how do i deal with it if i actualyl had one template the above could have worked. On Monday, 22 November 2021 at 12:42:59 UTC+5:30 sutharl...@gmail.com wrote: > we can go like > > ```

Re: Multiple Templates in single list view

2021-11-21 Thread David Nugent
Hi Lalit, On Mon, Nov 22, 2021 at 6:12 PM Lalit Suthar wrote: > we can go like > > ``` > > class Manager(...): > def get_context_data(self, **kwargs): > context = super() > context["open_tickets"] = Ticket.objects.filter(status="OPEN") > context["accepted_tickets"] = Ticket.objects.filter(s

Re: Multiple Templates in single list view

2021-11-21 Thread Lalit Suthar
we can go like ``` class Manager(...): def get_context_data(self, **kwargs): context = super() context["open_tickets"] = Ticket.objects.filter(status="OPEN") context["accepted_tickets"] = Ticket.objects.filter(status="ACCEPTED") context["completed_tickets"] = Ticket.objects.filter(status="CO

Re: Multiple Templates in single list view

2021-11-21 Thread Trippy Samurai
Hi Elena Thanks for the reply i have three different html pages to display open tickets closed tickets accepted tickets etc each of them have different ticket statuses i have them written in different views as above to display each type of ticket at different pages how can i combine all three i

Django 4.0 release candidate 1 released

2021-11-21 Thread Mariusz Felisiak
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2021/nov/22/django-40-rc1/ -- 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

Re: Multiple Templates in single list view

2021-11-21 Thread Elena Williams
Hi, The problem is it's unclear what your question is. Can you be clearer about what outcome you're trying to achieve? --- Elena Williams Github: elena On Mon, 22 Nov 2021 at 15:20, Trippy Samurai wrote: > Any one plz > > > On Sunday, 21 November 2021 at 15:09:39 U

Re: Multiple Templates in single list view

2021-11-21 Thread Trippy Samurai
Any one plz On Sunday, 21 November 2021 at 15:09:39 UTC+5:30 Trippy Samurai wrote: > Hello, > I have different views for displaying different templates how do i write > them into one single Listview so that i can take care of DRY > > > [image: Screenshot 2021-11-21 at 3.08.58 PM.png] > -- You

RE: Exported filtered by date data in django

2021-11-21 Thread ngallen4
1. Declare it on your settings.py #settings.py FOO = “foo” � When you want to use it e.g views.py from django.conf import settings FOO_VARIABLES = settings.FOO � 2. Declare on .env files(OR using set/export) BAR = “bar” To use it import os BAR_VARIALBE = os.getenviron.get(