From 49cd11e1abb1c47f38000d5291e6ad588bee7994 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Sun, 2 Apr 2017 03:48:42 +0000 Subject: [PATCH] Bower stuff --- docs/dependencies.rst | 15 +++++++------ requirements/base.txt | 2 +- stagestatus/settings/base.py | 41 ++++++++++++++++++------------------ 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/docs/dependencies.rst b/docs/dependencies.rst index e639d22..9425434 100644 --- a/docs/dependencies.rst +++ b/docs/dependencies.rst @@ -6,13 +6,6 @@ Python ~~~~~~ -Model Mommy ------------ - -Install: http://model-mommy.readthedocs.io/en/latest/index.html - -Model-mommy offers you a smart way to create fixtures for testing in Django. With a simple and powerful API you can create many objects with a single line of code. - Django Nose ----------- @@ -20,6 +13,14 @@ https://django-nose.readthedocs.io/en/latest/usage.html django-nose provides all the goodness of nose in your Django tests. +Model Mommy +----------- + +Install: http://model-mommy.readthedocs.io/en/latest/index.html + +Model-mommy offers you a smart way to create fixtures for testing in Django. With a simple and powerful API you can create many objects with a single line of code. + + Sniffer ------- diff --git a/requirements/base.txt b/requirements/base.txt index 2de30e7..190f56f 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -10,4 +10,4 @@ mysql-python djangorestframework markdown # Markdown support for the browsable API. -django-filter # Filtering support \ No newline at end of file +django-filter # Filtering support diff --git a/stagestatus/settings/base.py b/stagestatus/settings/base.py index 6228a71..5da2450 100644 --- a/stagestatus/settings/base.py +++ b/stagestatus/settings/base.py @@ -4,7 +4,11 @@ import sys # PATH vars BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -root = lambda *x: os.path.join(BASE_DIR, *x) + + +def root(*x): + return os.path.join(BASE_DIR, *x) + sys.path.insert(0, root('apps')) @@ -31,6 +35,7 @@ PROJECT_APPS = [ ] THIRD_PARTY_APPS = [ 'django_nose', + 'djangobower', 'rest_framework', ] INSTALLED_APPS += PROJECT_APPS @@ -68,26 +73,26 @@ DATABASES = { # Internationalization LANGUAGE_CODE = 'en-us' - TIME_ZONE = 'EST' - USE_I18N = False - USE_L10N = True - USE_TZ = True - # Static files (CSS, JavaScript, Images) STATIC_URL = '/static/' # Additional locations of static files - +STATIC_ROOT = root('static') STATICFILES_DIRS = ( root('assets'), ) +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', +) + TEMPLATES = [ { @@ -112,20 +117,16 @@ TEMPLATES = [ ] # Password validation - +_password_validators = ( + 'UserAttributeSimilarityValidator', + 'MinimumLengthValidator', + 'CommonPasswordValidator', + 'NumericPasswordValidator', +) AUTH_PASSWORD_VALIDATORS = [ - { - 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', - }, - { - 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', - }, + {'NAME': 'django.contrib.auth.password_validation{}'.format(validator)} + for validator in _password_validators + ] TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'