Creating a Custom Save Method in Django Models

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

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

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

    Thanks for putting this together. You've made it super simple for me to understand how to customize the Save method... something I wasn't too clear on. Thanks!!!

  • @drew2936
    @drew2936 4 года назад

    Man thank you. I'm relatively new to Django and don't really know the extent of what it has to offer. This was exactly what I was looking for without realizing it beforehand.

  • @Aibiloye1
    @Aibiloye1 4 года назад +2

    I bought Anthony's course and I must say.... it's amazing! Just like RUclips... always nice and clear content! I'll share your channel with everyone I know :-)

    • @prettyprinted
      @prettyprinted  4 года назад

      Awesome! I'm glad you like the course!

  • @sebastiancastillo3560
    @sebastiancastillo3560 4 года назад +1

    As always Anthony giving us very good tips. Thank you!!

    • @prettyprinted
      @prettyprinted  4 года назад +1

      You're welcome! thanks for watching

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

    Thanks for the tutorial. Can we get a value from another model to the target model?

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

    great video, thank you

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

    Anthony can we use a pre_save signal rather than over riding the save() in the model class .
    Happy with this approach too !! Got to know something new

  • @jeanpeuplu3862
    @jeanpeuplu3862 3 года назад +1

    Thank you so much, I'm an apprentice and this is very useful at my job!

  • @agustingiannoni6910
    @agustingiannoni6910 4 года назад

    hi man, very very useful, now is there a way to have the data before saving the object? i am struggling with this for 3 days on a row and cant find any answer =(

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

    how do you know that I'm exactly looking for this, and try to save my lat and long, that's awesome

  • @simpletipsandtricks1418
    @simpletipsandtricks1418 4 года назад

    Hi Anthony. How to hide the latitude and longitude input fields? 😊

  • @vinaykakanuru
    @vinaykakanuru 4 года назад

    Hi Anthony, can you please tell me how create custom create method for django model

  • @rezervium
    @rezervium 4 года назад

    Hello How can ı save to json to my django model ??

  • @ranaarifsb
    @ranaarifsb 4 года назад

    Hi!
    I am using modelformset_factory and trying to save data on different data base like
    form.save(using=“abc”)
    This work fine with form but when using with modelformset shows an error that un aspected argument “using”
    How to solve please

  • @bridroid58
    @bridroid58 4 года назад

    Nice. You should do one on custom save vs signals.

    • @prettyprinted
      @prettyprinted  4 года назад

      I'll consider making a video like that. Thanks for watching.

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

    Hey man!!
    Thanks for sharing,
    But i need to update the field values from my views.py logic,

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

    can you show me how to save automatically set the save method for this:
    Classroom model -
    Chapter model -
    classroom(foreignkey)
    Lesson model -
    chapter(foreignkey)
    4 different file models (video, audio, image, pdf ...) which all have foreign key from Lesson.
    Now I want to automatically set the default Lesson of the file model where I am currently in... rather than manually manuevering it in fill-up forms and/or admin site. Pls help

  • @mahmudsajib8648
    @mahmudsajib8648 4 года назад

    This is perfect!

  • @deekshantwadhwa
    @deekshantwadhwa 4 года назад

    Great video. Create one on custom delete method too.

  • @tochimclaren
    @tochimclaren 4 года назад

    You make awesome tutorial please do the multi option kind of question forms that keeps spitting form for answers until there is no question or answer left. The kind found on django-quiz and django-multiple-users thanks!

    • @prettyprinted
      @prettyprinted  4 года назад

      I'll look into making a video like that.

  • @codedjango
    @codedjango 4 года назад

    Awesome 👍

  • @ruzzan
    @ruzzan 4 года назад

    Great Vid

  • @siumhossain-
    @siumhossain- 3 года назад

    awesome

  • @rangabharath4253
    @rangabharath4253 4 года назад

    Awesome

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

    im not gay or anything like that but i must say ur voice is good