title = request.POST.get('title')
simple_introduction = request.POST.get('simple_introduction')
content = request.POST.get('content')
content = mark_safe(content)
type = (int)(request.POST.get('types'))
obj = models.Article.objects.get(id=p)
obj.title = title
obj.brif_introduce = simple_introduction
obj.content = content
obj.catery_id = type
#一定要进行sava()
obj.save()
转载于:https://my.oschina.net/u/2511906/blog/1922306