예제 #1
0
파일: acts.py 프로젝트: sjasonma/ostproject
def create_blog(request):
	user = request.user
	blog = Blog()
	blog.name = request.POST.get('name')
	blog.owner = user
	authors = []
	authors.append(user)
	blog.save()
	blog.authors = authors
	blog.save()
	return HttpResponseRedirect(reverse('myblog:index'))