Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fa5ddad0
authored
Jul 03, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cloud: make flake8 pass
parent
643a8794
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
10 deletions
+13
-10
cloud/context_processors.py
+3
-3
cloud/settings/dev.py
+3
-3
cloud/settings/prod.py
+1
-1
cloud/urls.py
+5
-3
cloud/wsgi.py
+1
-0
No files found.
cloud/context_processors.py
View file @
fa5ddad0
import
json
import
subprocess
from
django.conf
import
settings
from
django.core.cache
import
cache
def
process_debug
(
req
):
return
{
'DEBUG'
:
settings
.
DEBUG
}
def
process_stat
(
req
):
if
settings
.
STAT_DEBUG
:
stat
=
{
...
...
@@ -28,6 +27,7 @@ def process_stat(req):
'cloud_stat'
:
stat
,
}
def
process_release
(
req
):
return
{
'release'
:
settings
.
RELEASE
,
...
...
cloud/settings/dev.py
View file @
fa5ddad0
# coding=utf8
# Django development settings for cloud project.
from
.base
import
*
from
.base
import
*
# NOQA
DEBUG
=
True
TEMPLATE_DEBUG
=
DEBUG
...
...
@@ -9,9 +9,9 @@ EMAIL_PORT = 1025
ADMINS
=
(
(
'Ory, Mate'
,
'orymate@localhost'
),
)
)
MANAGERS
=
(
(
'Ory Mate'
,
'maat@localhost'
),
)
)
INSTALLED_APPS
+=
(
"debug_toolbar"
,
)
MIDDLEWARE_CLASSES
+=
(
"debug_toolbar.middleware.DebugToolbarMiddleware"
,
)
cloud/settings/prod.py
View file @
fa5ddad0
# coding=utf8
# Django production settings for cloud project.
from
.base
import
*
from
.base
import
*
# NOQA
DEBUG
=
False
TEMPLATE_DEBUG
=
DEBUG
...
...
cloud/urls.py
View file @
fa5ddad0
...
...
@@ -3,7 +3,7 @@ from django.conf.urls import patterns, include, url
from
django.contrib
import
admin
admin
.
autodiscover
()
import
one.views
#
import one.views
import
firewall_gui.urls
# import store.views
...
...
@@ -11,7 +11,8 @@ js_info_dict = {
'packages'
:
(
'one'
,
),
}
urlpatterns
=
patterns
(
''
,
urlpatterns
=
patterns
(
''
,
url
(
r'^admin/doc/'
,
include
(
'django.contrib.admindocs.urls'
),
),
url
(
r'^admin/'
,
include
(
admin
.
site
.
urls
),
),
...
...
@@ -44,7 +45,8 @@ urlpatterns = patterns('',
url
(
r'^vm/saveas/(?P<vmid>\d+)$'
,
'one.views.vm_saveas'
,
),
url
(
r'^vm/credentials/(?P<iid>\d+)$'
,
'one.views.vm_credentials'
,
),
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+)/(?P<gid>\d+)$'
,
'one.views.ajax_share_wizard'
,
),
...
...
cloud/wsgi.py
View file @
fa5ddad0
...
...
@@ -23,6 +23,7 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cloud.settings.prod")
from
django.core.wsgi
import
get_wsgi_application
_application
=
get_wsgi_application
()
def
application
(
environ
,
start_response
):
# copy DJANGO_* wsgi-env vars to process-env
for
i
in
environ
.
keys
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment