Please do a series about django admin. For me, Django Admin is one of the best features of all frameworks available. It is extremely under used. The docs are hard, and customizing it is not obvious...
Thanks a lot for the video. As always very interesting. I have a quick question: How much of a "bad practise" is it, to create model admin actions, which are not related to the queryset / the selected model objects? E.g. if I have a model with many entries and I want to delete all entries older than six months from the current date. I could write a admin actions for this. Or is there a better way of doing such thing? I would need to select one object, to make the action work, but it would work ... Thanks or your time.
Thank you! Interesting question - I would say a better way to approach that would be to create a scheduled task that runs once per day, and removes any entries older than 6 months. That would avoid having to start the task via an admin action, where you need to select a random object to trigger the task. However - I just released a video on django-unfold (an admin theme for Django). I didn't cover this in the video but it provides different "action types" on top of the default Django action mechanism. Here's a link: github.com/unfoldadmin/django-unfold?tab=readme-ov-file#actions Note the Global option: "General actions for model, without selecting specific instances" So this would be possible that way, too, and might be easier to setup if you're not already using a task queue like Celery.
It would potentially be possible, yes. However, for more complex actions (including side-effects), I think the action function is possibly a better approach.
☕ Buy a coffee: ko-fi.com/bugbytes
⭐Top resource to learn Python - datacamp.pxf.io/kOjKkV ⭐
It is awesome that your channel covers areas others don't. Thanks.
yes, definitely.
he had consumed Django as cocktail drink. 😊
@@iwswordpress thanks a lot!
Thank you for your efforts and you deserve all support.
Many thanks for your support!
Very detailed series on Django ❤
@@ahmednaseem5161 thank you!
It's always great to have you here giving us gist on Django and other great stuffs. Thanks for sharing.
Thanks as always man!
thanks as always🙂 ...always learning from you
Thank you - glad to hear that, and thank you for commenting!
I’d certainly appreciate extra information on celery within django. Great video, big fan of the content
Thanks a lot! Really keen to do some Celery stuff soon, it's on the cards!
Excellent as always!
Thank you!
Dear author we need a big topics :
1 Everything about forms with details
2 Customising admin panel with details
THANKS!!!
I'll look into these, thanks!
great video! thanks again.
Thanks a lot!
great, thankyou 💖
Thanks for watching!
very nice topic, thanks
@@abderahimlamamri8591 thanks for watching!
Chat GPT did something like this for me while trying to achieve this that's the first time I learned about it.
Thanks to GPT thanks to you too ❤🎉
@@agastronics thanks a lot!
The best.
Thanks a lot!
Please do a series about django admin. For me, Django Admin is one of the best features of all frameworks available. It is extremely under used. The docs are hard, and customizing it is not obvious...
@@devestavel thanks for the suggestion, I’ll consider this soon!
Thanks a lot for the video. As always very interesting.
I have a quick question: How much of a "bad practise" is it, to create model admin actions, which are not related to the queryset / the selected model objects? E.g. if I have a model with many entries and I want to delete all entries older than six months from the current date. I could write a admin actions for this. Or is there a better way of doing such thing? I would need to select one object, to make the action work, but it would work ... Thanks or your time.
Thank you!
Interesting question - I would say a better way to approach that would be to create a scheduled task that runs once per day, and removes any entries older than 6 months. That would avoid having to start the task via an admin action, where you need to select a random object to trigger the task.
However - I just released a video on django-unfold (an admin theme for Django). I didn't cover this in the video but it provides different "action types" on top of the default Django action mechanism. Here's a link:
github.com/unfoldadmin/django-unfold?tab=readme-ov-file#actions
Note the Global option: "General actions for model, without selecting specific instances"
So this would be possible that way, too, and might be easier to setup if you're not already using a task queue like Celery.
@@bugbytes3923 Thanks a lot - I will have a look at it.
thank you
Thanks for watching!
👍👍
Thank you!
Could you show how intermediate pages can be used to add a tag to several products, which can be selected from a list or created a new one?
I'll add a quick follow-up on intermediate pages soon.
I learnt it at mt work
would it be to much hassle to be able to modify lets say, the status, directly in the row field as a dropdown select?
It would potentially be possible, yes. However, for more complex actions (including side-effects), I think the action function is possibly a better approach.
thanks for sharing, please can you make a video on how we can change default admin dashboard using tailwind or customer CSS because its ugly
i commented before watching full video, waiting the admin dashboard
and I like his videos before watching it full. 😅
@@alexdin1565 coming up in the next video, using a tailwind admin theme!