Advertisement
Guest User

Untitled

a guest
Mar 7th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. def user_registration(request):
  2. username = request.DATA.get('username')
  3. email = request.DATA.get('email')
  4. password = request.DATA.get('password')
  5.  
  6. # walidacja
  7. if not <hasło wystarczająco długie>:
  8. return <coś w stylu:> HttpResponse('Za krótkie hasło')
  9. # itd
  10.  
  11. # tu jakies haszowanie hasla
  12.  
  13. # wysyłanie danych na serwer
  14.  
  15. # odpowiedź do klienta, że wszystko poszło ok, albo że jednak niezbyt
  16. return HttpResponse('Udało się zarejestrować blablabla')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement