Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
75d45516
authored
Apr 15, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
django: use settings api
parent
88998966
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
8 deletions
+17
-8
cloud/settings/base.py
+2
-2
firewall/fw.py
+3
-1
firewall/models.py
+2
-1
firewall/tasks.py
+3
-1
one/models.py
+3
-1
one/views.py
+1
-1
store/api.py
+3
-1
No files found.
cloud/settings/base.py
View file @
75d45516
...
...
@@ -239,7 +239,7 @@ CACHES = {
}
store_settings
=
{
STORE_SETTINGS
=
{
"basic_auth"
:
"True"
,
"verify_ssl"
:
"False"
,
"ssl_auth"
:
"False"
,
...
...
@@ -251,7 +251,7 @@ store_settings = {
"store_public"
:
"store.ik.bme.hu"
,
}
firewall_settings
=
{
FIREWALL_SETTINGS
=
{
"default_vlangroup"
:
"publikus"
,
"reload_sleep"
:
"10"
,
"dns_hostname"
:
"dns1.ik.bme.hu"
,
...
...
firewall/fw.py
View file @
75d45516
from
django.contrib
import
auth
from
firewall
import
models
import
os
from
django.conf.settings
import
firewall_settings
as
settings
import
django.conf
import
subprocess
import
re
...
...
@@ -10,6 +11,7 @@ from datetime import datetime, timedelta
from
django.db.models
import
Q
settings
=
django
.
conf
.
settings
.
FIREWALL_SETTINGS
class
Firewall
:
IPV6
=
False
RULES
=
None
...
...
firewall/models.py
View file @
75d45516
...
...
@@ -7,11 +7,12 @@ from django.utils.translation import ugettext_lazy as _
from
firewall.fields
import
*
from
south.modelsinspector
import
add_introspection_rules
from
django.core.validators
import
MinValueValidator
,
MaxValueValidator
from
django.conf.settings
import
firewall_settings
as
settings
import
django.conf
from
django.db.models.signals
import
post_save
import
re
import
random
settings
=
django
.
conf
.
settings
.
FIREWALL_SETTINGS
class
Rule
(
models
.
Model
):
CHOICES_type
=
((
'host'
,
'host'
),
(
'firewall'
,
'firewall'
),
(
'vlan'
,
'vlan'
))
...
...
firewall/tasks.py
View file @
75d45516
...
...
@@ -4,7 +4,9 @@ from django.core.cache import cache
import
os
import
time
from
firewall.fw
import
*
from
django.conf.settings
import
firewall_settings
as
settings
import
django.conf
settings
=
django
.
conf
.
settings
.
FIREWALL_SETTINGS
@celery.task
def
reload_dns_task
(
data
):
...
...
one/models.py
View file @
75d45516
...
...
@@ -18,7 +18,9 @@ from firewall.models import Host, Rule, Vlan, Record
from
school.models
import
Person
,
Group
from
store.api
import
StoreApi
from
.util
import
keygen
from
django.conf.settings
import
CLOUD_URL
import
django.conf
CLOUD_URL
=
django
.
conf
.
settings
.
CLOUD_URL
logger
=
logging
.
getLogger
(
__name__
)
pwgen
=
User
.
objects
.
make_random_password
...
...
one/views.py
View file @
75d45516
...
...
@@ -20,7 +20,6 @@ from django.utils.translation import ugettext_lazy as _
from
django.views.decorators.http
import
*
from
django.views.generic
import
*
from
firewall.tasks
import
*
from
django.conf.settings
import
store_settings
from
one.models
import
*
from
school.models
import
*
import
django.contrib.auth
as
auth
...
...
@@ -28,6 +27,7 @@ import json
import
logging
import
subprocess
store_settings
=
settings
.
STORE_SETTINGS
logger
=
logging
.
getLogger
(
__name__
)
def
_list_instances
(
request
):
...
...
store/api.py
View file @
75d45516
from
django.db
import
models
from
django.http
import
Http404
import
json
,
requests
,
time
from
django.conf.settings
import
store_settings
as
settings
import
django.conf
settings
=
django
.
conf
.
settings
.
STORE_SETTINGS
# Create your models here.
#TODO Handle exceptions locally
...
...
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