Creating a Custom Save Method in Django Models

preview_player
Показать описание
Write custom save methods in your Django models to customize what happens when you save a model in Django.

WORK WITH ME👇🏼

✅ Need help with your project? Schedule a call with me at:

💻 Code written in video
Рекомендации по теме
Комментарии
Автор

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

gregruiz
Автор

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.

drew
Автор

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

Aibiloye
Автор

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

sebastiancastillo
Автор

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

prateeksarangi
Автор

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

jeanpeuplu
Автор

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

nosratullahmohammadi
Автор

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

bridroid
Автор

Great video. Create one on custom delete method too.

deekshantwadhwa
Автор

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

simpletipsandtricks
Автор

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

vinaykakanuru
Автор

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

shivamrohilla
Автор

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 =(

agustingiannoni
Автор

Hey man!!

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

lrtestdemo
Автор

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

rezervium
Автор

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

ranaarifsb
Автор

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

richardalcantara
Автор

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!

tochimclaren
Автор

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

coddingnoob
welcome to shbcf.ru