diff --git a/.gitignore b/.gitignore index 0d20b64..27ffc2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.pyc +build diff --git a/__init__.py b/django-testauth/__init__.py similarity index 100% rename from __init__.py rename to django-testauth/__init__.py diff --git a/auth.py b/django-testauth/auth.py similarity index 88% rename from auth.py rename to django-testauth/auth.py index 3d258e6..755f39e 100644 --- a/auth.py +++ b/django-testauth/auth.py @@ -7,9 +7,9 @@ from hashlib import sha1 from django.contrib.auth.models import User, check_password, Group import settings -class DredditAuthBackend: +class TESTAuthBackend: """ - Django authentication backend for authenticating against Dreddit's Auth System. + Django authentication backend for authenticating against TEST's Auth System. """ def authenticate(self, username=None, password=None): @@ -39,7 +39,7 @@ class DredditAuthBackend: if email: user.email = email - if hasattr(settings, 'DREDDIT_AUTH_CREATE_GROUPS') and settings.DREDDIT_AUTH_CREATE_GROUPS: + if getattr(settings, 'TEST_AUTH_CREATE_GROUPS', False): for g in groups: group, created = Group.objects.get_or_create(name=g['name']) user.groups.add(group) diff --git a/tests.py b/django-testauth/tests.py similarity index 100% rename from tests.py rename to django-testauth/tests.py