53👍
✅
model_instance = form.save(commit=False)
will return you a object of the model without saving to the DB
you can then add value of some field which is not available on form
model_instance.some_field = value
model_instance.save()
- [Django]-Multithreading for Python Django
- [Django]-Is it possible to pass query parameters via Django's {% url %} template tag?
- [Django]-How to resolve "django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: foo" in Django 1.7?
Source:stackexchange.com