Django Proxy Models - Customizing Model Behaviour using Proxy Models!

  Рет қаралды 5,344

BugBytes

BugBytes

Күн бұрын

Пікірлер: 57
@bugbytes3923
@bugbytes3923 9 ай бұрын
ORM Playlist link: kzbin.info/www/bejne/e6SlonyQordli8U
@kicknotes
@kicknotes 10 ай бұрын
Your channel is really underrated and doesn't have the exposure/views it deserves, imo. Many of the other Django series on YT (even by the more well-known names) are clearly regurgitations of the basic Django docs/tutorials. You on the other hand have a very obvious, deep understanding of Django internals and development in general. Your content is really well-presented at a pace that neither bores nor overwhelms. Very much appreciated, and keep up the excellent work!
@bugbytes3923
@bugbytes3923 10 ай бұрын
Thanks a lot, that's one of the best comments I've had on the channel! Really appreciate it, and I'm glad you're enjoying the content! Thanks again.
@mayanksingh579
@mayanksingh579 9 ай бұрын
@@bugbytes3923 Indeed we are enjoying the content, this is so informative...
@aafan.kuware
@aafan.kuware 11 ай бұрын
best django tutor on youtube so far. I want to become like you bro, please teach me personally on my own project to understand more better. 😅😅😅
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thanks a lot! Happy to try helping if you have any questions. Thanks for watching!
@aafan.kuware
@aafan.kuware 10 ай бұрын
@@bugbytes3923 hi, can you help me in one of my project? I have an hotel commission app live, which show the commission & discount structure to the operation staff, now I wanna implement calculator which will take RATE as input and Commission from the object which is looped in table and gives the Nett amount, I have my view calculating the amount just need help in htmx part.
@aafan.kuware
@aafan.kuware 10 ай бұрын
@@bugbytes3923 can you help me in a django app? i have my code ready just stuck in htmx part.
@LegionLeague
@LegionLeague 11 ай бұрын
This looks like a more flexible and extendable (but potentially more complicated) version of creating a custom manager on the main class itself and just creating methods for custom filtering. Something like this (haven't tested the exact syntax): TaskManager(models.Manager): def todo(self): return self.get_queryset().filter(status=self.model.status.TODO) And query it with Task.objects.todo() With proxy models you'd have to import each of them and add them to the context for rendering in templates.
@bugbytes3923
@bugbytes3923 11 ай бұрын
Good point, this may be a nicer way to do things if the only purpose is for filtering. Thanks for sharing that!
@AmoahDevLabs
@AmoahDevLabs 11 ай бұрын
Nice presentation. This is truely informative. Thanks for your precious time.
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thanks a lot as always!
@todorowael
@todorowael 3 ай бұрын
Thanks for the great explanation! Wish you all the best!
@bugbytes3923
@bugbytes3923 3 ай бұрын
Thank you!
5 ай бұрын
When you add proxy model, you should add migration too. Django should know that proxy model's base.
@francosbenitez
@francosbenitez 11 ай бұрын
Amazing! I didn't even know about how to run scripts using `runscript`. Thanks!
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thanks a lot! Not sure if I mentioned in the video, this is an extra command added by "django-extensions" - django-extensions.readthedocs.io/en/latest/
@jamoinmoin
@jamoinmoin 10 ай бұрын
I had to use these for the first time just before this video came out, but the video really helped to clear some things up, thanks!
@bugbytes3923
@bugbytes3923 10 ай бұрын
Thanks! Hope it went well for you!
@brianibbotson6492
@brianibbotson6492 10 ай бұрын
Been building a large enterprise ERP product that is based around proxy models as its core entity. Love them!
@bugbytes3923
@bugbytes3923 10 ай бұрын
Interesting use case!
@shahbozsharafzoda7441
@shahbozsharafzoda7441 11 ай бұрын
You explain as professional one, as always
@Yarkanlaki
@Yarkanlaki 10 ай бұрын
Wow I really needed this 😂 a couple thousand line can be removed. Thank you very much
@bugbytes3923
@bugbytes3923 10 ай бұрын
Haha awesome 😂 Thanks!
@robhafemeister3100
@robhafemeister3100 11 ай бұрын
Great video! I never thought of using Proxy Models in this way. Just out of curiosity do you create a separate module to keep all of your custom Model Proxies in and then import them as needed?
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thanks Rob! Different ways I might do it, depends on the size of the project - a module for proxies would be a good idea though, to keep them separate from models that represent concrete database tables.
@امینجمالی-خ9ص
@امینجمالی-خ9ص 5 ай бұрын
great tutorial Thanks a lottttt
@bugbytes3923
@bugbytes3923 5 ай бұрын
@@امینجمالی-خ9ص thank you!
@blees123
@blees123 10 ай бұрын
This is great! Thank you
@bugbytes3923
@bugbytes3923 10 ай бұрын
Thanks a lot!
@ayubkara1092
@ayubkara1092 11 ай бұрын
Fantastic as always
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thanks a lot, appreciate it!
@kushalpy
@kushalpy 11 ай бұрын
Another Master Piece
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thanks a lot as always!
@rajatarora8693
@rajatarora8693 10 ай бұрын
Hey, can you please make a video on how to implement User-Role based access control?
@Gbolly_bambam
@Gbolly_bambam 9 ай бұрын
you are the best
@bugbytes3923
@bugbytes3923 9 ай бұрын
Thanks so much!
@shahbozsharafzoda7441
@shahbozsharafzoda7441 11 ай бұрын
Later, could you please make video about multi language for django project?) Thanks for your informative videos, Sir!
@davidl.e5203
@davidl.e5203 11 ай бұрын
How would that be different from creating a new model and using the base model as a foreign key? Example: class Task(models.Model): id = models.Integer() class TaskStatus(models.Model): task = models.ForeignKey(Task)
@serychristianrenaud
@serychristianrenaud 11 ай бұрын
Thanks ❤
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thanks a lot!
@aashayamballi
@aashayamballi 11 ай бұрын
Thank you!
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thanks a lot as always!
@youbra4267
@youbra4267 11 ай бұрын
thank you
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thank you!
@ztakip
@ztakip 14 күн бұрын
You are great🎉
@bugbytes3923
@bugbytes3923 10 күн бұрын
Thanks a lot!
@frameff9073
@frameff9073 11 ай бұрын
thank you 😍
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thanks for watching!
@r75shell
@r75shell 8 ай бұрын
It's silly that you haven't show what will print(Task.objects.all()) show in the end for Completed tasks.
@ammaryasser4839
@ammaryasser4839 11 ай бұрын
keep going👏
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thank you, will do!
@abbasebadian6851
@abbasebadian6851 2 ай бұрын
Person ❌ Persian✅
@seydinaoumarsamabaly1806
@seydinaoumarsamabaly1806 11 ай бұрын
Thank You!
@bugbytes3923
@bugbytes3923 11 ай бұрын
Thanks a lot mate!
GeneratedField in Django 5 - New Django Model Field!
23:19
BugBytes
Рет қаралды 5 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
Django Content Types framework / ContentType model
15:07
BugBytes
Рет қаралды 6 М.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 227 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 918 М.
Multiple User Types | Django
21:13
Daniel Roy Greenfeld
Рет қаралды 57 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН