How To Add Calculated Fields To Models - Django Wednesdays #40

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024

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

  • @Codemycom
    @Codemycom  2 ปีที่แล้ว

    ▶️ Watch Entire Django Wednesdays Playlist ✅ Subscribe To My TH-cam Channel:
    bit.ly/35Xo9jD bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
    ▶️ Get The Code
    bit.ly/3sJpeV6

  • @clivethompson5016
    @clivethompson5016 2 ปีที่แล้ว +5

    fantastic video as always!
    This channel should be the biggest coding channel on youtube!
    edit: typo

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Wow, thanks!

  • @collen89c5
    @collen89c5 ปีที่แล้ว +1

    Thanks my man you realy saved the day , great video
    Assist pliz -- how do i compare todays current time and event time

  • @brunomandela3480
    @brunomandela3480 ปีที่แล้ว

    yo man you have no idea how this has helped out even that second @properties you did ,esspecially that one, fixed a lot of problems for me. Keep making more great content and stay blessed brother.

    • @Codemycom
      @Codemycom  ปีที่แล้ว +1

      Happy to hear it!

  • @kumara2mahe
    @kumara2mahe 2 ปีที่แล้ว

    This video really saves my day, and all your videos are awesome.

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว +1

      Happy to hear it!

  • @madesastra4145
    @madesastra4145 2 ปีที่แล้ว

    Great video. So simple and straightforward👍

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Glad you liked it!

  • @joachimkre5682
    @joachimkre5682 2 ปีที่แล้ว +1

    Un bon exposé. Mes félicitations pour tout ce que vous faites. Je voudrais rappeler que la différence entre 2 dates en Python ne fait pas apparaitre "days 00:00:00" quand les deux dates sont égales. Par conséquent, le split() donnera une erreur. Merci

  • @charlesenglebert8226
    @charlesenglebert8226 2 ปีที่แล้ว +1

    hello
    How to make computed field available in admin ?

  • @MrElectrecity
    @MrElectrecity 2 ปีที่แล้ว

    Quick tip 😁
    You can use date template tag to print only the date
    Thanks for your works sharing
    💖💖💖💖

  • @1412-kaito
    @1412-kaito ปีที่แล้ว

    Okay, so what would the steps be if i want to store some calculated info. in the forms and make i non-editable for non-admins?

  • @pouoiza6875
    @pouoiza6875 2 ปีที่แล้ว

    Thank you so much sir.😷

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Very welcome

  • @yasayah7289
    @yasayah7289 2 ปีที่แล้ว

    Merveilleux merci! Would be nice to add email notifications via dropdown email list as an event approaches a certain number of days. Additionally a dashboard with total number of events as well as breakdown number of events of event type...j'apprécie ton tuto merci :)

  • @nadirnacef2223
    @nadirnacef2223 2 ปีที่แล้ว +1

    I like this guy he looks like Walter white from the breaking bad serie

  • @pouoiza6875
    @pouoiza6875 2 ปีที่แล้ว

    Thank you so must Sir

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Very Welcome!

  • @MatthewCoxPublicProfile
    @MatthewCoxPublicProfile ปีที่แล้ว

    Hey John- perhaps I haven't dived deep enough, but do you have a video on paginating the returned searches?

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      I have a video on pagination

  • @TheGodfather360
    @TheGodfather360 2 ปีที่แล้ว

    Hi, I have two models and the names are Budget and Transaction. One budget can have multiple transactions, I would like to sum each transaction and subtract the total from the particular budget. I used the @property decorator, but how include this calculation from different models. Thanks in advance!

  • @Adrian-mh8op
    @Adrian-mh8op 2 ปีที่แล้ว

    Whenever I click my menu item, my label along with what’s on the GUI gradually keep going down with every click of it. How do you fix that, if you could link the video to that, it would be great.
    You’re amazing btw, I learn from your videos all the time

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Sorry, I have no idea what you're talking about. This is a django video, there are no menu items or gui's

  • @Adrian-mh8op
    @Adrian-mh8op 2 ปีที่แล้ว

    I have a few questions. I’m making a flashcard project, I followed your tutorial for the language one but to take it further I want to use SQLite to store the words. I’ve already created my table how do I call the contents for it to be displayed on the GUI of the flashcard.
    Also I have a menu but when I click between the menu the contents of it gradually go further and further down. How do I make it stay stationary when I switch between the menu items

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Are you talking about tkinter? I have videos on all that stuff.

  • @mohammedhassan-kx2yf
    @mohammedhassan-kx2yf 2 ปีที่แล้ว

    I need help
    I have a django db model which has a manytomany field.
    Problem i have is adding values to that field from my views.py
    I used obj.field.add(“”)
    Obj.field.set(“)
    Nothing is working

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      I have many videos about adding things to the database.

    • @clivethompson5016
      @clivethompson5016 2 ปีที่แล้ว

      I think it should be obj.feild.addWidget(")

  • @frozeneye100
    @frozeneye100 ปีที่แล้ว

    pretty cool, except doing exactly that, no access to the property... No idea what causes that issue.

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      what did you do differently?

    • @frozeneye100
      @frozeneye100 ปีที่แล้ว +1

      @@Codemycom I found the issue. I was trying to call the property which returned an object. For testing I placed it in a for loop which did not create any instances of the class. So since there was no instance of the class, of course the object was just an object without an instance for the way in which it was called. Moving it to a loop which did create a class instance worked. So I need to learn a bit more about that and OOP and django.

  • @mohammadrajha5181
    @mohammadrajha5181 2 ปีที่แล้ว

    can i get money from my website? if i do a good web

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Sure, it depends on the website and it's purpose

  • @kmdown
    @kmdown 2 ปีที่แล้ว

    Please Make a video on how to host django site free to show our friends...

    • @clivethompson5016
      @clivethompson5016 2 ปีที่แล้ว

      th-cam.com/video/Li0Abz-KT78/w-d-xo.html
      it works the same with Django, I think

    • @kmdown
      @kmdown 2 ปีที่แล้ว

      Ohh, Thanks a lot

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Yeah I have those already on the channel.

  • @mohammadrajha5181
    @mohammadrajha5181 2 ปีที่แล้ว

    i wanna free domain pls how

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      No, domains cost money from a registrar.

  • @Kennerdoll
    @Kennerdoll 2 ปีที่แล้ว

    Hello John, is it a good practice to just add:
    if self.event_date.date() > today:
    return days_till_split
    else:
    return "Event passed!
    at 8:18?

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว +1

      It's a good practice to do anything you want to do :-p