Skip to main content

modify data obtained from request before saving in database in django

reference 1:
https://tutorial.djangogirls.org/en/django_forms/

Reference 2:
https://stackoverflow.com/questions/6461989/populating-django-field-with-pre-save


sample:
post = form.save(commit=False)
post.title = 'sabin le banako'
post.title = request.title
post.save()



Comments