Django Proxy Models - Customizing Model Behaviour using Proxy Models!

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ส.ค. 2024

ความคิดเห็น • 49

  • @bugbytes3923
    @bugbytes3923  4 หลายเดือนก่อน +2

    ORM Playlist link: th-cam.com/video/EsBqIZmR2Uc/w-d-xo.html

  • @kicknotes
    @kicknotes 4 หลายเดือนก่อน +5

    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  4 หลายเดือนก่อน +1

      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 3 หลายเดือนก่อน

      @@bugbytes3923 Indeed we are enjoying the content, this is so informative...

  • @aafan.kuware
    @aafan.kuware 5 หลายเดือนก่อน +8

    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  5 หลายเดือนก่อน +1

      Thanks a lot! Happy to try helping if you have any questions. Thanks for watching!

    • @aafan.kuware
      @aafan.kuware 4 หลายเดือนก่อน

      @@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 4 หลายเดือนก่อน

      @@bugbytes3923 can you help me in a django app?
      i have my code ready just stuck in htmx part.

  • @LegionLeague
    @LegionLeague 5 หลายเดือนก่อน +3

    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  5 หลายเดือนก่อน +1

      Good point, this may be a nicer way to do things if the only purpose is for filtering. Thanks for sharing that!

  • @AmoahDevLabs
    @AmoahDevLabs 5 หลายเดือนก่อน +3

    Nice presentation. This is truely informative. Thanks for your precious time.

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน

      Thanks a lot as always!

  • @jamoinmoin
    @jamoinmoin 5 หลายเดือนก่อน

    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  5 หลายเดือนก่อน

      Thanks! Hope it went well for you!

  • @brianibbotson6492
    @brianibbotson6492 5 หลายเดือนก่อน

    Been building a large enterprise ERP product that is based around proxy models as its core entity. Love them!

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน

      Interesting use case!

  • @francosbenitez
    @francosbenitez 5 หลายเดือนก่อน +2

    Amazing! I didn't even know about how to run scripts using `runscript`. Thanks!

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน

      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/

  • @Yarkanlaki
    @Yarkanlaki 5 หลายเดือนก่อน

    Wow I really needed this 😂 a couple thousand line can be removed.
    Thank you very much

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน

      Haha awesome 😂 Thanks!

  • @gbolahanolanrewaju1301
    @gbolahanolanrewaju1301 3 หลายเดือนก่อน +2

    you are the best

    • @bugbytes3923
      @bugbytes3923  3 หลายเดือนก่อน

      Thanks so much!

  • @blees123
    @blees123 5 หลายเดือนก่อน

    This is great! Thank you

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน

      Thanks a lot!

  • @shahbozsharafzoda7441
    @shahbozsharafzoda7441 5 หลายเดือนก่อน

    You explain as professional one, as always

  • @ayubkara1092
    @ayubkara1092 5 หลายเดือนก่อน

    Fantastic as always

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน

      Thanks a lot, appreciate it!

  • @robhafemeister3100
    @robhafemeister3100 5 หลายเดือนก่อน +1

    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  5 หลายเดือนก่อน

      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.

  • @seydinaoumarsamabaly1806
    @seydinaoumarsamabaly1806 5 หลายเดือนก่อน +1

    Thank You!

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน

      Thanks a lot mate!

  • @kushalpy
    @kushalpy 5 หลายเดือนก่อน

    Another Master Piece

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน

      Thanks a lot as always!

  • @frameff9073
    @frameff9073 5 หลายเดือนก่อน

    thank you 😍

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน

      Thanks for watching!

  • @serychristianrenaud
    @serychristianrenaud 5 หลายเดือนก่อน

    Thanks ❤

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน

      Thanks a lot!

  • @shahbozsharafzoda7441
    @shahbozsharafzoda7441 5 หลายเดือนก่อน

    Later, could you please make video about multi language for django project?)
    Thanks for your informative videos, Sir!

  • @ammaryasser4839
    @ammaryasser4839 5 หลายเดือนก่อน

    keep going👏

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน

      Thank you, will do!

  • @youbra4267
    @youbra4267 5 หลายเดือนก่อน

    thank you

  • @aashayamballi
    @aashayamballi 5 หลายเดือนก่อน

    Thank you!

    • @bugbytes3923
      @bugbytes3923  5 หลายเดือนก่อน +1

      Thanks a lot as always!

  • @rajatarora8693
    @rajatarora8693 4 หลายเดือนก่อน

    Hey, can you please make a video on how to implement User-Role based access control?

  • @davidl.e5203
    @davidl.e5203 5 หลายเดือนก่อน

    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)

  • @r75shell
    @r75shell 2 หลายเดือนก่อน

    It's silly that you haven't show what will print(Task.objects.all()) show in the end for Completed tasks.