Monday, November 22, 2021

Re: Multiple Templates in single list view

Screenshot 2021-11-22 at 9.21.06 PM.png

On Monday, 22 November 2021 at 21:20:16 UTC+5:30 Trippy Samurai wrote:
Its done bro model is configured already i didn't just posted the models.py file

On Monday, 22 November 2021 at 21:18:12 UTC+5:30 ram.asf...@gmail.com wrote:
will update asap

On Mon, Nov 22, 2021 at 1:22 PM David Nugent <dav...@uniquode.io> wrote:
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 all cases with conditional blocks where appropriate.


Regards,
David

--
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...@googlegroups.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/211116cb-6012-4eb3-83f0-a11b79b7fecfn%40googlegroups.com.

No comments:

Post a Comment