Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ProjectCreate(View):
- def post(self, request):
- bound_form = ProjectForm(request.POST)
- if bound_form.is_valid():
- new_project = bound_form.save(commit=False)
- new_project.user = User.objects.get(id=request.user.id)
- new_project.save()
- return redirect('main_url', permanent=True)
- return redirect('main_url', permanent=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement