Guest User

bino: l2auth (Second Level Auth), shell test

a guest
Feb 21st, 2013
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. bino@bino-pata:~/Documents/django/proj02$ python manage.py shell
  2. /home/bino/Documents/django/proj02/proj02 ('templates',)
  3. Python 2.7.3 (default, Aug 1 2012, 05:16:07)
  4. [GCC 4.6.3] on linux2
  5. Type "help", "copyright", "credits" or "license" for more information.
  6. (InteractiveConsole)
  7. >>>
  8. >>>
  9. >>> from django.contrib.auth.models import Permission
  10. >>> from l2auth.models import L2User, L2Company
  11. >>> from l2auth.models import *
  12. >>> from l2auth.backends import L2Backend
  13. >>>
  14. >>> mybackend=L2Backend()
  15. >>> mybackend.authenticate('dua@binonet','234')
  16. L2BACKEND !!!!
  17. Traceback (most recent call last):
  18. File "<console>", line 1, in <module>
  19. File "/home/bino/Documents/django/proj02/l2auth/backends.py", line 18, in authenticate
  20. if user.check_password(password):
  21. File "/home/bino/Documents/django/proj02/l2auth/models.py", line 246, in check_password
  22. return check_password(raw_password, self.password, setter)
  23. File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/hashers.py", line 42, in check_password
  24. hasher = get_hasher(algorithm)
  25. File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/hashers.py", line 115, in get_hasher
  26. "setting?" % algorithm)
  27. ValueError: Unknown password hashing algorithm '234'. Did you specify it in the PASSWORD_HASHERS setting?
  28. >>>
  29. >>>
Advertisement
Add Comment
Please, Sign In to add comment