Reputation: 20029
I need some help with django request I want to add a custom form proccessing to add a user (or any other model instance)
I don't want to create it like this
tagName = request.POST["tagname"]
new_tag = Tag()
new_tag.name = tagName
new_tag.save()
because I would need to rewrite this code everythime something changes in the model Is there any way how can I create a model instance from the request? What is the way django-admin do this?
Thank you so much
Upvotes: 2
Views: 160