django-rest-auth/rest_auth/test_settings.py

54 lines
1.2 KiB
Python
Raw Normal View History

2014-05-02 22:53:42 +04:00
import django
import os
import sys
2014-05-02 23:58:41 +04:00
2014-05-03 01:55:39 +04:00
PROJECT_ROOT = os.path.abspath(os.path.split(os.path.split(__file__)[0])[0])
ROOT_URLCONF = 'urls'
STATIC_URL = '/static/'
STATIC_ROOT = '%s/staticserve' % PROJECT_ROOT
STATICFILES_DIRS = (
('global', '%s/static' % PROJECT_ROOT),
)
UPLOADS_DIR_NAME = 'uploads'
MEDIA_URL = '/%s/' % UPLOADS_DIR_NAME
MEDIA_ROOT = os.path.join(PROJECT_ROOT, '%s' % UPLOADS_DIR_NAME)
2014-05-02 23:58:41 +04:00
IS_DEV = False
IS_STAGING = False
IS_PROD = False
2014-05-06 02:53:06 +04:00
IS_TEST = 'test' in sys.argv or 'test_coverage' in sys.argv
2014-05-02 22:53:42 +04:00
if django.VERSION[:2] >= (1, 3):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
else:
DATABASE_ENGINE = 'sqlite3'
INSTALLED_APPS = [
2014-05-02 23:58:41 +04:00
'django.contrib.admin',
2014-05-02 23:03:25 +04:00
'django.contrib.auth',
2014-05-03 01:47:28 +04:00
'django.contrib.humanize',
2014-05-02 23:58:41 +04:00
'django.contrib.contenttypes',
'django.contrib.sessions',
2014-05-03 01:47:28 +04:00
'django.contrib.sites',
'django.contrib.sitemaps',
'django.contrib.staticfiles',
2014-05-02 23:58:41 +04:00
'allauth',
'allauth.account',
2014-05-02 23:58:41 +04:00
'rest_framework',
'rest_framework.authtoken',
2014-05-02 22:53:42 +04:00
'rest_auth',
'rest_auth.registration'
2014-05-02 22:53:42 +04:00
]
SECRET_KEY = "38dh*skf8sjfhs287dh&^hd8&3hdg*j2&sd"
2014-05-02 23:58:41 +04:00
ACCOUNT_ACTIVATION_DAYS = 1
2014-05-03 01:47:28 +04:00
SITE_ID = 1