Advertisement
urbanslug

SignUpView

Jul 31st, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. def SignUpView(request):
  2. if request.method == 'POST':
  3. form = SignUp(request.POST)
  4. if form.is_valid():
  5. form.save()
  6. username = request.POST['username']
  7. mkdir(os.path.join('/home/urbanslug/media', username))
  8. return HttpResponseRedirect('/welcome/')
  9. else:
  10. form = SignUp()
  11.  
  12. return render(request, 'signup.html', {'form':form,})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement