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

Поделиться
HTML-код
  • Опубликовано: 11 янв 2025

Комментарии • 49

  • @Codemycom
    @Codemycom  3 года назад

    ▶️ Watch Entire Django Wednesdays Playlist ✅ Subscribe To My RUclips 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

  • @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.

  • @Clussy123
    @Clussy123 3 года назад +5

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

  • @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

  • @kumara2mahe
    @kumara2mahe 2 года назад

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

  • @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

  • @madesastra4145
    @madesastra4145 3 года назад

    Great video. So simple and straightforward👍

  • @charlesenglebert8226
    @charlesenglebert8226 2 года назад +1

    hello
    How to make computed field available in admin ?

  • @MrElectrecity
    @MrElectrecity 3 года назад

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

  • @fernandocoelho1334
    @fernandocoelho1334 3 месяца назад

    Thanks so much!

  • @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 3 года назад

    Thank you so much sir.😷

  • @MatthewCoxPublicProfile
    @MatthewCoxPublicProfile 2 года назад

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

    • @Codemycom
      @Codemycom  2 года назад

      I have a video on pagination

  • @pouoiza6875
    @pouoiza6875 3 года назад

    Thank you so must Sir

  • @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!

  • @yasayah7289
    @yasayah7289 3 года назад

    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 :)

  • @Adrian-mh8op
    @Adrian-mh8op 3 года назад

    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  3 года назад

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

  • @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

  • @nadirnacef2223
    @nadirnacef2223 2 года назад +1

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

  • @Adrian-mh8op
    @Adrian-mh8op 3 года назад

    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  3 года назад

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

  • @mohammedhassan-kx2yf
    @mohammedhassan-kx2yf 3 года назад

    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  3 года назад

      I have many videos about adding things to the database.

    • @Clussy123
      @Clussy123 3 года назад

      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 3 года назад

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

    • @Codemycom
      @Codemycom  3 года назад

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

  • @kmdown
    @kmdown 3 года назад

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

    • @Clussy123
      @Clussy123 3 года назад

      ruclips.net/video/Li0Abz-KT78/видео.html
      it works the same with Django, I think

    • @kmdown
      @kmdown 3 года назад

      Ohh, Thanks a lot

    • @Codemycom
      @Codemycom  3 года назад

      Yeah I have those already on the channel.

  • @mohammadrajha5181
    @mohammadrajha5181 3 года назад

    i wanna free domain pls how

    • @Codemycom
      @Codemycom  3 года назад

      No, domains cost money from a registrar.