Django Admin Actions - Writing Custom Actions for the Django Admin

  Рет қаралды 3,044

BugBytes

BugBytes

Күн бұрын

Пікірлер: 47
@bugbytes3923
@bugbytes3923 Ай бұрын
☕ Buy a coffee: ko-fi.com/bugbytes ⭐Top resource to learn Python - datacamp.pxf.io/kOjKkV ⭐
@iwswordpress
@iwswordpress 5 ай бұрын
It is awesome that your channel covers areas others don't. Thanks.
@aafan.kuware
@aafan.kuware 5 ай бұрын
yes, definitely. he had consumed Django as cocktail drink. 😊
@bugbytes3923
@bugbytes3923 5 ай бұрын
@@iwswordpress thanks a lot!
@AmoahDevLabs
@AmoahDevLabs 5 ай бұрын
It's always great to have you here giving us gist on Django and other great stuffs. Thanks for sharing.
@bugbytes3923
@bugbytes3923 5 ай бұрын
Thanks as always man!
@Developer_python_
@Developer_python_ 5 ай бұрын
Dear author we need a big topics : 1 Everything about forms with details 2 Customising admin panel with details THANKS!!!
@bugbytes3923
@bugbytes3923 5 ай бұрын
I'll look into these, thanks!
@khalidseflan301
@khalidseflan301 5 ай бұрын
Thank you for your efforts and you deserve all support.
@bugbytes3923
@bugbytes3923 5 ай бұрын
Many thanks for your support!
@imthatchris
@imthatchris 5 ай бұрын
I’d certainly appreciate extra information on celery within django. Great video, big fan of the content
@bugbytes3923
@bugbytes3923 5 ай бұрын
Thanks a lot! Really keen to do some Celery stuff soon, it's on the cards!
@ahmednaseem5161
@ahmednaseem5161 5 ай бұрын
Very detailed series on Django ❤
@bugbytes3923
@bugbytes3923 5 ай бұрын
@@ahmednaseem5161 thank you!
@mrmuranga
@mrmuranga 5 ай бұрын
thanks as always🙂 ...always learning from you
@bugbytes3923
@bugbytes3923 5 ай бұрын
Thank you - glad to hear that, and thank you for commenting!
@devestavel
@devestavel 5 ай бұрын
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...
@bugbytes3923
@bugbytes3923 5 ай бұрын
@@devestavel thanks for the suggestion, I’ll consider this soon!
@gibbson130
@gibbson130 5 ай бұрын
Excellent as always!
@bugbytes3923
@bugbytes3923 5 ай бұрын
Thank you!
@hernansaa
@hernansaa 4 ай бұрын
great video! thanks again.
@bugbytes3923
@bugbytes3923 4 ай бұрын
Thanks a lot!
@abderahimlamamri8591
@abderahimlamamri8591 5 ай бұрын
very nice topic, thanks
@bugbytes3923
@bugbytes3923 5 ай бұрын
@@abderahimlamamri8591 thanks for watching!
@AGASTRONICS
@AGASTRONICS 5 ай бұрын
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 ❤🎉
@bugbytes3923
@bugbytes3923 5 ай бұрын
@@AGASTRONICS thanks a lot!
@divanshusoni3704
@divanshusoni3704 3 ай бұрын
great, thankyou 💖
@bugbytes3923
@bugbytes3923 3 ай бұрын
Thanks for watching!
@SmartC2007
@SmartC2007 5 ай бұрын
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.
@bugbytes3923
@bugbytes3923 5 ай бұрын
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.
@SmartC2007
@SmartC2007 5 ай бұрын
@@bugbytes3923 Thanks a lot - I will have a look at it.
@Man-si9xf
@Man-si9xf 5 ай бұрын
The best.
@bugbytes3923
@bugbytes3923 5 ай бұрын
Thanks a lot!
@АвоМама
@АвоМама 5 ай бұрын
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?
@bugbytes3923
@bugbytes3923 5 ай бұрын
I'll add a quick follow-up on intermediate pages soon.
@Developer_python_
@Developer_python_ 5 ай бұрын
I learnt it at mt work
@hernansaa
@hernansaa 4 ай бұрын
would it be to much hassle to be able to modify lets say, the status, directly in the row field as a dropdown select?
@bugbytes3923
@bugbytes3923 4 ай бұрын
It would potentially be possible, yes. However, for more complex actions (including side-effects), I think the action function is possibly a better approach.
@frameff9073
@frameff9073 5 ай бұрын
thank you
@bugbytes3923
@bugbytes3923 5 ай бұрын
Thanks for watching!
@ibrahimoglu
@ibrahimoglu 5 ай бұрын
👍👍
@bugbytes3923
@bugbytes3923 5 ай бұрын
Thank you!
@alexdin1565
@alexdin1565 5 ай бұрын
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
@alexdin1565
@alexdin1565 5 ай бұрын
i commented before watching full video, waiting the admin dashboard
@aafan.kuware
@aafan.kuware 5 ай бұрын
and I like his videos before watching it full. 😅
@bugbytes3923
@bugbytes3923 5 ай бұрын
@@alexdin1565 coming up in the next video, using a tailwind admin theme!
django-unfold - TailwindCSS Admin Theme for Django!
25:14
BugBytes
Рет қаралды 9 М.
django-filter and DRF API filtering - Django REST Framework
16:17
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
Don't be THAT backend engineer, EVER
59:17
K Srinivas Rao
Рет қаралды 4,5 М.
Marimo Notebooks Intro | Charting Python's rise in popularity
18:15
Django & HTMX - Optimistic Updates!
14:31
BugBytes
Рет қаралды 3,2 М.
NanoDjango - single-file Django apps | uv integration
19:37
Domain-Driven Design: The Last Explanation You'll Ever Need
21:05
Software Developer Diaries
Рет қаралды 15 М.
uv - Ruff + Pytest Tool Management (in a FastAPI Project)
19:28
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН