django - create user from request
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?
Than开发者_运维知识库k you so much
Use ModelForms
精彩评论