Skip to content

Instantly share code, notes, and snippets.

View marcinn's full-sized avatar

Marcin Nowak marcinn

View GitHub Profile
@marcinn
marcinn / Veryfing user`s password outside Django env (Django 1.4)
Last active December 28, 2015 07:49
Veryfing user`s password outside Django env. I'm using it with Pyramid.
from django.contrib.auth import hashers
HASHERS = dict(map(lambda x: (x.algorithm, x), [
hashers.SHA1PasswordHasher,
hashers.MD5PasswordHasher,
hashers.UnsaltedMD5PasswordHasher,
hashers.CryptPasswordHasher,
hashers.BCryptPasswordHasher,
hashers.PBKDF2SHA1PasswordHasher,