From ca2db7b9361724ed1050c0e670de801beed57800 Mon Sep 17 00:00:00 2001 From: mitri4 Date: Mon, 27 Mar 2017 17:05:24 +0300 Subject: [PATCH] settings, requirements --- .bowerrc | 4 ++ .editorconfig | 37 +++++++++++++++++++ .gitignore | 3 ++ app/__init__.py | 16 ++++++++ app/local.py.example | 28 ++++++++++++++ bower.json | 11 ++++++ requirements.txt | 1 + .../common.txt | 3 +- requirements/dev.txt | 3 ++ requirements/prod.txt | 1 + 10 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 .bowerrc create mode 100644 .editorconfig create mode 100644 app/local.py.example create mode 100644 bower.json create mode 100644 requirements.txt rename app/requirements.txt => requirements/common.txt (97%) create mode 100644 requirements/dev.txt create mode 100644 requirements/prod.txt diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 0000000..67c5a74 --- /dev/null +++ b/.bowerrc @@ -0,0 +1,4 @@ +{ + "directory" : "static/vendor", + "json" : "bower.json" +} \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..639f4fb --- /dev/null +++ b/.editorconfig @@ -0,0 +1,37 @@ +# For more information about the properties used in +# this file, please see the EditorConfig documentation: +# http://editorconfig.org/ + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + + +[{*.scss, *.css}] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.html] +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[{.travis.yml, package.json}] +# The indent size used in the `package.json` file cannot be changed +# https://github.com/npm/npm/pull/3180#issuecomment-16336516 +indent_size = 2 +indent_style = space diff --git a/.gitignore b/.gitignore index 9ffab50..a36ab0f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ zsite/static/vendor/ _env/ media/ + +app/local.py +/static/vendor/ diff --git a/app/__init__.py b/app/__init__.py index e69de29..4b3ffe5 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +import sys + +from .settings import * + +try: + from .local import * +except ImportError: + print("Can't find module settings.local! Make it from local.py.example") + +# if manage.py test was called, use test settings +if 'test' in sys.argv or 'jenkins' in sys.argv: + try: + from .testing import * + except ImportError: + pass diff --git a/app/local.py.example b/app/local.py.example new file mode 100644 index 0000000..6eb70bf --- /dev/null +++ b/app/local.py.example @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- + +from .settings import INSTALLED_APPS + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '...' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +INSTALLED_APPS += ('debug_toolbar', ) + +MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware', ] + + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': u'...', + 'USER': u'...', + 'PASSWORD': u'...', + 'HOST': '', + 'PORT': '', + } +} + +ALLOWED_HOSTS = ['127.0.0.1'] + diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..b56f0ad --- /dev/null +++ b/bower.json @@ -0,0 +1,11 @@ +{ + "name": "zuykov", + "version": "0.1.0", + "dependencies": { + "angular": "1.3.6", + "bootstrap": "3.3.5", + "angular-bootstrap": "~0.10.0", + "jquery.inputmask": "*", + "font-awesome": "^4.7.0" + } +} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5eaadb8 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +-r requirements/prod.txt diff --git a/app/requirements.txt b/requirements/common.txt similarity index 97% rename from app/requirements.txt rename to requirements/common.txt index 68de0c8..a9331f8 100644 --- a/app/requirements.txt +++ b/requirements/common.txt @@ -12,7 +12,6 @@ django-appconf==1.0.1 django-appdata==0.1.4 django-classy-tags==0.6.2 django-cms==3.1.3 -django-debug-toolbar==1.4 django-durationfield==0.5.2 django-easy-select2==1.3.3 django-filer==0.9.12 @@ -73,4 +72,4 @@ vobject==0.6.6 YURL==0.13 pymorphy2==0.8 pymorphy2-dicts==2.4.393442.3710985 -DAWG-Python==0.7.2 \ No newline at end of file +DAWG-Python==0.7.2 diff --git a/requirements/dev.txt b/requirements/dev.txt new file mode 100644 index 0000000..165483f --- /dev/null +++ b/requirements/dev.txt @@ -0,0 +1,3 @@ +-r common.txt +django-debug-toolbar==1.4 +deployer-0.3.10 diff --git a/requirements/prod.txt b/requirements/prod.txt new file mode 100644 index 0000000..6624a30 --- /dev/null +++ b/requirements/prod.txt @@ -0,0 +1 @@ +-r common.txt