mirror of https://github.com/sipwise/repoapi.git
* upgrade requirements - remove django-jenkins own patch * split common settings on settings/common.py * improve code quality following pylint Change-Id: If62940f6369d23079d3113407d221461c8d02e39changes/62/7062/1
parent
35d2c97d58
commit
784cda3e02
@ -0,0 +1,137 @@
|
||||
# Copyright (C) 2015 The Sipwise Team - http://sipwise.com
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation, either version 3 of the License, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
import os
|
||||
|
||||
BASE_DIR = os.path.dirname(
|
||||
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
||||
# Application definition
|
||||
# django-jenkins
|
||||
PROJECT_APPS = [
|
||||
'repoapi',
|
||||
'panel',
|
||||
]
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'rest_framework',
|
||||
'rest_framework_swagger',
|
||||
'django_extensions',
|
||||
'django_assets',
|
||||
]
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'repoapi.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'repoapi.wsgi.application'
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.8/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_L10N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.8/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
STATICFILES_FINDERS = (
|
||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
'django_assets.finders.AssetsFinder',
|
||||
)
|
||||
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'static_media/')
|
||||
|
||||
TEMPLATE_DIRS = (
|
||||
'repoapi/templates',
|
||||
)
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'PAGE_SIZE': 10,
|
||||
'DEFAULT_FILTER_BACKENDS': (
|
||||
'rest_framework.filters.DjangoFilterBackend',
|
||||
)
|
||||
}
|
||||
|
||||
SWAGGER_SETTINGS = {
|
||||
'api_version': '0.1',
|
||||
'info': {
|
||||
'contact': 'dev@sipwise.com',
|
||||
'description': 'repoapi, one ring to rule them all',
|
||||
'license': 'GPL 3.0',
|
||||
'title': 'RepoApi',
|
||||
},
|
||||
}
|
||||
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'handlers': {
|
||||
'console': {
|
||||
'class': 'logging.StreamHandler',
|
||||
},
|
||||
},
|
||||
'loggers': {
|
||||
'repoapi': {
|
||||
'handlers': ['console'],
|
||||
'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
JENKINS_TOKEN = "sipwise_jenkins_ci"
|
@ -1,7 +1,7 @@
|
||||
-r common.txt
|
||||
django-nose
|
||||
git+https://github.com/linuxmaniac/django-jenkins.git@vseva/nose#egg=django-jenkins
|
||||
flake8==2.4.1
|
||||
django-jenkins
|
||||
flake8
|
||||
pep8
|
||||
pylint
|
||||
coverage==3.7.1
|
||||
coverage
|
||||
mock
|
||||
|
@ -1,7 +1,7 @@
|
||||
-r common.txt
|
||||
django-nose
|
||||
git+https://github.com/linuxmaniac/django-jenkins.git@vseva/nose#egg=django-jenkins
|
||||
flake8==2.4.1
|
||||
django-jenkins
|
||||
flake8
|
||||
pep8
|
||||
pylint
|
||||
coverage==3.7.1
|
||||
coverage
|
||||
mock
|
||||
|
Loading…
Reference in new issue