Commit fa5ddad0 by Őry Máté

cloud: make flake8 pass

parent 643a8794
import json
import subprocess
from django.conf import settings from django.conf import settings
from django.core.cache import cache from django.core.cache import cache
def process_debug(req): def process_debug(req):
return {'DEBUG': settings.DEBUG} return {'DEBUG': settings.DEBUG}
def process_stat(req): def process_stat(req):
if settings.STAT_DEBUG: if settings.STAT_DEBUG:
stat = { stat = {
...@@ -28,6 +27,7 @@ def process_stat(req): ...@@ -28,6 +27,7 @@ def process_stat(req):
'cloud_stat': stat, 'cloud_stat': stat,
} }
def process_release(req): def process_release(req):
return { return {
'release': settings.RELEASE, 'release': settings.RELEASE,
......
# coding=utf8 # coding=utf8
# Django development settings for cloud project. # Django development settings for cloud project.
from .base import * from .base import * # NOQA
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
...@@ -8,10 +8,10 @@ EMAIL_HOST = "localhost" ...@@ -8,10 +8,10 @@ EMAIL_HOST = "localhost"
EMAIL_PORT = 1025 EMAIL_PORT = 1025
ADMINS = ( ADMINS = (
('Ory, Mate', 'orymate@localhost'), ('Ory, Mate', 'orymate@localhost'),
) )
MANAGERS = ( MANAGERS = (
('Ory Mate', 'maat@localhost'), ('Ory Mate', 'maat@localhost'),
) )
INSTALLED_APPS += ("debug_toolbar", ) INSTALLED_APPS += ("debug_toolbar", )
MIDDLEWARE_CLASSES += ("debug_toolbar.middleware.DebugToolbarMiddleware", ) MIDDLEWARE_CLASSES += ("debug_toolbar.middleware.DebugToolbarMiddleware", )
# coding=utf8 # coding=utf8
# Django production settings for cloud project. # Django production settings for cloud project.
from .base import * from .base import * # NOQA
DEBUG = False DEBUG = False
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
......
...@@ -3,7 +3,7 @@ from django.conf.urls import patterns, include, url ...@@ -3,7 +3,7 @@ from django.conf.urls import patterns, include, url
from django.contrib import admin from django.contrib import admin
admin.autodiscover() admin.autodiscover()
import one.views # import one.views
import firewall_gui.urls import firewall_gui.urls
# import store.views # import store.views
...@@ -11,7 +11,8 @@ js_info_dict = { ...@@ -11,7 +11,8 @@ js_info_dict = {
'packages': ('one', ), 'packages': ('one', ),
} }
urlpatterns = patterns('', urlpatterns = patterns(
'',
url(r'^admin/doc/', include('django.contrib.admindocs.urls'), ), url(r'^admin/doc/', include('django.contrib.admindocs.urls'), ),
url(r'^admin/', include(admin.site.urls), ), url(r'^admin/', include(admin.site.urls), ),
...@@ -44,7 +45,8 @@ urlpatterns = patterns('', ...@@ -44,7 +45,8 @@ urlpatterns = patterns('',
url(r'^vm/saveas/(?P<vmid>\d+)$', 'one.views.vm_saveas', ), url(r'^vm/saveas/(?P<vmid>\d+)$', 'one.views.vm_saveas', ),
url(r'^vm/credentials/(?P<iid>\d+)$', 'one.views.vm_credentials', ), url(r'^vm/credentials/(?P<iid>\d+)$', 'one.views.vm_credentials', ),
url(r'^ajax/templateWizard/$', 'one.views.ajax_template_wizard', ), url(r'^ajax/templateWizard/$', 'one.views.ajax_template_wizard', ),
url(r'^ajax/templateEditWizard/(?P<id>\d+)/$', 'one.views.ajax_template_edit_wizard', ), url(r'^ajax/templateEditWizard/(?P<id>\d+)/$',
'one.views.ajax_template_edit_wizard', ),
url(r'^ajax/share/(?P<id>\d+)/$', 'one.views.ajax_share_wizard', ), url(r'^ajax/share/(?P<id>\d+)/$', 'one.views.ajax_share_wizard', ),
url(r'^ajax/share/(?P<id>\d+)/(?P<gid>\d+)$', url(r'^ajax/share/(?P<id>\d+)/(?P<gid>\d+)$',
'one.views.ajax_share_wizard', ), 'one.views.ajax_share_wizard', ),
......
...@@ -23,6 +23,7 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cloud.settings.prod") ...@@ -23,6 +23,7 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cloud.settings.prod")
from django.core.wsgi import get_wsgi_application from django.core.wsgi import get_wsgi_application
_application = get_wsgi_application() _application = get_wsgi_application()
def application(environ, start_response): def application(environ, start_response):
# copy DJANGO_* wsgi-env vars to process-env # copy DJANGO_* wsgi-env vars to process-env
for i in environ.keys(): for i in environ.keys():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment