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 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.
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.
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/
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?
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.
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)
ORM Playlist link: th-cam.com/video/EsBqIZmR2Uc/w-d-xo.html
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!
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.
@@bugbytes3923 Indeed we are enjoying the content, this is so informative...
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. 😅😅😅
Thanks a lot! Happy to try helping if you have any questions. Thanks for watching!
@@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.
@@bugbytes3923 can you help me in a django app?
i have my code ready just stuck in htmx part.
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.
Good point, this may be a nicer way to do things if the only purpose is for filtering. Thanks for sharing that!
Nice presentation. This is truely informative. Thanks for your precious time.
Thanks a lot as always!
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!
Thanks! Hope it went well for you!
Been building a large enterprise ERP product that is based around proxy models as its core entity. Love them!
Interesting use case!
Amazing! I didn't even know about how to run scripts using `runscript`. Thanks!
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/
Wow I really needed this 😂 a couple thousand line can be removed.
Thank you very much
Haha awesome 😂 Thanks!
you are the best
Thanks so much!
This is great! Thank you
Thanks a lot!
You explain as professional one, as always
Fantastic as always
Thanks a lot, appreciate it!
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?
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.
Thank You!
Thanks a lot mate!
Another Master Piece
Thanks a lot as always!
thank you 😍
Thanks for watching!
Thanks ❤
Thanks a lot!
Later, could you please make video about multi language for django project?)
Thanks for your informative videos, Sir!
keep going👏
Thank you, will do!
thank you
Thank you!
Thank you!
Thanks a lot as always!
Hey, can you please make a video on how to implement User-Role based access control?
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)
It's silly that you haven't show what will print(Task.objects.all()) show in the end for Completed tasks.