Proposal: cacheif template tag

2022-09-24 Thread Igor Margitich
Hi django-developers, I would like to propose new template tag `cacheif`. Could be useful when you need to cache part of html and it depends on some condition. Template tag is similar to built-in `cache` tag but accepts extra boolean parameter. See example: {% cacheif user.is_anonymous 10 home

Re: Proposal: cacheif template tag

2022-10-12 Thread Igor Margitich
UTC+2 carlton...@gmail.com пише: > Hey Igor, > > I wonder if you can achieve the same varying the timeout parameter based > in user.is_authenticated? > > Kind Regards, > > Carlton > > On Sat, 24 Sept 2022 at 15:35, Igor Margitich wrote: > >> Hi django-de

Re: Creating internal/admin pages without Models

2022-10-25 Thread Igor Margitich
Hi Vasanth, Can you ptovide an example when do you need generic admin view? I have case where I need gather some information from different not directly related tables. I have used https://pypi.org/project/django-nonrelated-inlines/. Can't say it is exactly what I need but seems it does the job. A