Modernize dependencies, sync with gva
This commit modernizes all requirements to the latest versions, adapts the settings to Django 1.9 and synchronizes the settings layout with gva.
This commit is contained in:
parent
7c6ed136eb
commit
ed18c4a6f9
12 changed files with 105 additions and 120 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -41,3 +41,4 @@ Desktop.ini
|
|||
.ropeproject
|
||||
_build/
|
||||
.vagrant/
|
||||
.coverage
|
||||
|
|
3
gvaldap/gvacommon/.gitignore
vendored
3
gvaldap/gvacommon/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
|||
.*.swp
|
||||
*.pyc
|
||||
.ropeproject/
|
|
@ -1,15 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
class GvaRouter(object):
|
||||
|
||||
def route_for_task(self, task, args=None, kwargs=None):
|
||||
for route in ['ldap', 'file', 'mysql', 'pgsql']:
|
||||
if route in task:
|
||||
return {
|
||||
'exchange': route,
|
||||
'exchange_type': 'direct',
|
||||
'queue': route,
|
||||
}
|
||||
return None
|
|
@ -50,9 +50,6 @@ path.append(DJANGO_ROOT)
|
|||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
||||
DEBUG = False
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
########## END DEBUG CONFIGURATION
|
||||
|
||||
|
||||
########## MANAGER CONFIGURATION
|
||||
|
@ -119,20 +116,11 @@ MEDIA_URL = '/media/'
|
|||
|
||||
|
||||
########## STATIC FILE CONFIGURATION
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
|
||||
STATIC_ROOT = normpath(join(SITE_ROOT, 'assets'))
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS
|
||||
STATICFILES_DIRS = (
|
||||
normpath(join(SITE_ROOT, 'static')),
|
||||
)
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
|
||||
STATICFILES_FINDERS = (
|
||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
)
|
||||
########## END STATIC FILE CONFIGURATION
|
||||
|
@ -161,28 +149,29 @@ FIXTURE_DIRS = (
|
|||
|
||||
|
||||
########## TEMPLATE CONFIGURATION
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.core.context_processors.debug',
|
||||
'django.core.context_processors.i18n',
|
||||
'django.core.context_processors.media',
|
||||
'django.core.context_processors.static',
|
||||
'django.core.context_processors.tz',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'django.core.context_processors.request',
|
||||
)
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
)
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
|
||||
TEMPLATE_DIRS = (
|
||||
# See: https://docs.djangoproject.com/en/1.9/ref/settings/#std:setting-TEMPLATES # noqa
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [
|
||||
normpath(join(SITE_ROOT, 'templates')),
|
||||
)
|
||||
],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.i18n',
|
||||
'django.template.context_processors.media',
|
||||
'django.template.context_processors.static',
|
||||
'django.template.context_processors.tz',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'django.template.context_processors.request',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
########## END TEMPLATE CONFIGURATION
|
||||
|
||||
|
||||
|
@ -195,6 +184,7 @@ MIDDLEWARE_CLASSES = (
|
|||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
)
|
||||
########## END MIDDLEWARE CONFIGURATION
|
||||
|
@ -221,12 +211,8 @@ DJANGO_APPS = (
|
|||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
|
||||
# Useful template tags:
|
||||
# 'django.contrib.humanize',
|
||||
|
||||
# Admin panel and documentation:
|
||||
'django.contrib.admin',
|
||||
# 'django.contrib.admindocs',
|
||||
)
|
||||
|
||||
# Apps specific for this project go here.
|
||||
|
@ -250,6 +236,15 @@ INSTALLED_APPS = DJANGO_APPS + LOCAL_APPS
|
|||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'formatters': {
|
||||
'verbose': {
|
||||
'format': '%(levelname)s %(asctime)s %(name)s '
|
||||
'%(module)s:%(lineno)d %(process)d %(thread)d %(message)s',
|
||||
},
|
||||
'simple': {
|
||||
'format': '%(levelname)s %(name)s:%(lineno)d %(message)s',
|
||||
},
|
||||
},
|
||||
'filters': {
|
||||
'require_debug_false': {
|
||||
'()': 'django.utils.log.RequireDebugFalse'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- python -*-
|
||||
# pymode:lint_ignore=W0401,E501
|
||||
"""
|
||||
Development settings and globals based on :py:mod:`gvaldap.settings.base`.
|
||||
|
@ -6,7 +7,8 @@ Development settings and globals based on :py:mod:`gvaldap.settings.base`.
|
|||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .base import *
|
||||
# use import * to import all settings from base
|
||||
from .base import * # NOQA
|
||||
|
||||
|
||||
# ######### DEBUG CONFIGURATION
|
||||
|
@ -14,7 +16,7 @@ from .base import *
|
|||
DEBUG = True
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
|
||||
# ######### END DEBUG CONFIGURATION
|
||||
|
||||
|
||||
|
@ -44,8 +46,19 @@ MIDDLEWARE_CLASSES += (
|
|||
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||
)
|
||||
|
||||
LOGGING['handlers'].update({
|
||||
'console': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'simple',
|
||||
}
|
||||
})
|
||||
LOGGING['loggers'].update(dict(
|
||||
[(key, {'handlers': ['console'], 'level': 'DEBUG', 'propagate': True, })
|
||||
for key in ['ldapentities', 'ldaptasks']]))
|
||||
|
||||
DEBUG_TOOLBAR_PATCH_SETTINGS = False
|
||||
|
||||
# http://django-debug-toolbar.readthedocs.org/en/latest/installation.html
|
||||
INTERNAL_IPS = ('127.0.0.1',)
|
||||
INTERNAL_IPS = ('127.0.0.1', '10.0.2.2')
|
||||
# ######### END TOOLBAR CONFIGURATION
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- python -*-
|
||||
# pymode:lint_ignore=W0401,E501
|
||||
"""
|
||||
Production settings and globals based on :py:mod:`gvaldap.settings.base`.
|
||||
|
@ -6,10 +7,11 @@ Production settings and globals based on :py:mod:`gvaldap.settings.base`.
|
|||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .base import *
|
||||
# use import * to import all settings from base
|
||||
from .base import * # NOQA
|
||||
|
||||
# ######### HOST CONFIGURATION
|
||||
# See: https://docs.djangoproject.com/en/1.5/releases/1.5/#allowed-hosts-required-in-production
|
||||
# See: https://docs.djangoproject.com/en/1.5/releases/1.5/#allowed-hosts-required-in-production # noqa
|
||||
ALLOWED_HOSTS = get_env_variable('GVALDAP_ALLOWED_HOSTS').split(',')
|
||||
# ######### END HOST CONFIGURATION
|
||||
|
||||
|
@ -17,33 +19,16 @@ ALLOWED_HOSTS = get_env_variable('GVALDAP_ALLOWED_HOSTS').split(',')
|
|||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host
|
||||
#EMAIL_HOST = environ.get('EMAIL_HOST', 'smtp.gmail.com')
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-password
|
||||
#EMAIL_HOST_PASSWORD = environ.get('EMAIL_HOST_PASSWORD', '')
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-host-user
|
||||
#EMAIL_HOST_USER = environ.get('EMAIL_HOST_USER', 'your_email@example.com')
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-port
|
||||
#EMAIL_PORT = environ.get('EMAIL_PORT', 587)
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix
|
||||
EMAIL_SUBJECT_PREFIX = '[%s] ' % SITE_NAME
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#email-use-tls
|
||||
#EMAIL_USE_TLS = True
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email
|
||||
DEFAULT_FROM_EMAIL = get_env_variable('GVALDAP_ADMIN_EMAIL')
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#server-email
|
||||
SERVER_EMAIL = get_env_variable('GVALDAP_SERVER_EMAIL')
|
||||
# ######### END EMAIL CONFIGURATION
|
||||
|
||||
########## DATABASE CONFIGURATION
|
||||
#DATABASES = {}
|
||||
########## END DATABASE CONFIGURATION
|
||||
|
||||
|
||||
# ######### CACHE CONFIGURATION
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#caches
|
||||
# CACHES = {}
|
||||
|
|
|
@ -8,6 +8,9 @@ from __future__ import absolute_import
|
|||
# use import * to import all settings from base
|
||||
from .base import * # NOQA
|
||||
|
||||
PASSWORD_HASHERS = (
|
||||
'django.contrib.auth.hashers.MD5PasswordHasher',
|
||||
)
|
||||
########## IN-MEMORY TEST DATABASE
|
||||
DATABASES = {
|
||||
"default": {
|
||||
|
@ -28,10 +31,6 @@ LOGGING['handlers'].update({
|
|||
})
|
||||
LOGGING['loggers'].update(dict(
|
||||
[(key, {'handlers': ['console'], 'level': 'ERROR', 'propagate': True, })
|
||||
for key in [
|
||||
'dashboard', 'domains', 'fileservertasks', 'gvacommon',
|
||||
'gvawebcore', 'hostingpackages', 'ldaptasks', 'managemails',
|
||||
'mysqltasks', 'osusers', 'pgsqltasks', 'taskresults',
|
||||
'userdbs', 'websites']]))
|
||||
for key in ['ldapentities', 'ldaptasks']]))
|
||||
BROKER_URL = BROKER_URL + '_test'
|
||||
CELERY_RESULT_PERSISTENT = False
|
||||
|
|
|
@ -3,23 +3,21 @@ This module defines the main URLConf for gvaldap.
|
|||
|
||||
"""
|
||||
|
||||
from django.conf.urls import patterns, include, url
|
||||
from django.conf.urls import include, url
|
||||
from django.conf import settings
|
||||
|
||||
# Uncomment the next two lines to enable the admin:
|
||||
from django.contrib import admin
|
||||
admin.autodiscover()
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
urlpatterns = [
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
)
|
||||
]
|
||||
|
||||
# Uncomment the next line to serve media files in dev.
|
||||
# urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
if settings.DEBUG:
|
||||
if settings.DEBUG: # pragma: no cover
|
||||
import debug_toolbar
|
||||
urlpatterns += patterns('',
|
||||
urlpatterns += [
|
||||
url(r'^__debug__/', include(debug_toolbar.urls)),
|
||||
)
|
||||
]
|
||||
|
|
|
@ -1,10 +1,20 @@
|
|||
Django==1.7.4
|
||||
django-ldapdb==0.3.2
|
||||
bpython==0.13.2
|
||||
django-braces==1.4.0
|
||||
django-model-utils==2.2
|
||||
Django==1.9.1
|
||||
Jinja2==2.8
|
||||
#django-ldapdb==0.4.0
|
||||
-e git+https://github.com/jandd/django-ldapdb@django19#egg=django-ldapdb
|
||||
python-ldap==2.4.25
|
||||
bpython==0.15
|
||||
curtsies==0.2.6
|
||||
django-braces==1.8.1
|
||||
django-model-utils==2.4
|
||||
logutils==0.3.3
|
||||
celery==3.1.20
|
||||
passlib==1.6.2
|
||||
requests==2.5.1
|
||||
amqp==1.4.9
|
||||
billiard==3.3.0.22
|
||||
kombu==3.0.33
|
||||
pytz==2015.7
|
||||
passlib==1.6.5
|
||||
requests==2.9.1
|
||||
simplejson==3.8.1
|
||||
-e git+https://git.gnuviech-server.de/gvacommon.git@0.2.1#egg=gvacommon
|
||||
redis==2.10.5
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
# Local development dependencies go here
|
||||
-r test.txt
|
||||
django-debug-toolbar==1.2.2
|
||||
Sphinx==1.2.3
|
||||
sqlparse==0.1.14
|
||||
releases==0.7.0
|
||||
Pygments==2.0.2
|
||||
django-debug-toolbar==1.4
|
||||
sqlparse==0.1.18
|
||||
Sphinx==1.3.5
|
||||
Babel==2.2.0
|
||||
snowballstemmer==1.2.1
|
||||
releases==1.0.0
|
||||
Pygments==2.1
|
||||
flake8==2.5.2
|
||||
mccabe==0.4.0
|
||||
pep8==1.7.0
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Test dependencies go here.
|
||||
-r base.txt
|
||||
coverage==3.7.1
|
||||
coverage==4.0.3
|
||||
|
|
Loading…
Reference in a new issue