Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
red-group-test
red-ci-cd
Commits
ac1ce276
Commit
ac1ce276
authored
Feb 18, 2020
by
Gladys Forte
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product-dev' into 'product-sit'
Product dev See merge request rms/Backend/api-main-service!807
parents
88bb5c6a
ca296b69
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
5 deletions
+24
-5
app/applicationlayer/cms/cms_settings/views.py
app/applicationlayer/cms/cms_settings/views.py
+11
-4
app/entities/models.py
app/entities/models.py
+8
-0
config/settings/base.py
config/settings/base.py
+4
-1
env.new_template.ini
env.new_template.ini
+1
-0
No files found.
app/applicationlayer/cms/cms_settings/views.py
View file @
ac1ce276
...
...
@@ -19,6 +19,7 @@ from app.applicationlayer.utils import (
CustomPagination
,
status_message_response
)
from
app.helper.email_service
import
sender
from
app.applicationlayer.utils
import
error_message
class
CMSSettingsViewSet
(
viewsets
.
ModelViewSet
):
...
...
@@ -97,13 +98,19 @@ class CMSSettingsViewSet(viewsets.ModelViewSet):
logged_user
=
self
.
request
.
user
.
code
data_cms_settings
=
[]
behalf_user_list
=
[]
cms_settings
=
request
.
data
[
'cms_settings'
]
for
cms_setting
in
cms_settings
:
cms_setting
[
'active_user'
]
=
logged_user
data_cms_settings
.
append
(
cms_setting
)
if
cms_setting
[
'behalf_user'
]
in
behalf_user_list
:
return
error_message
(
'400'
,
'Please make sure to add unique on behalf users'
,
'failed'
,
status
.
HTTP_400_BAD_REQUEST
)
else
:
behalf_user_list
.
append
(
cms_setting
[
'behalf_user'
])
cms_setting
[
'active_user'
]
=
logged_user
data_cms_settings
.
append
(
cms_setting
)
serializer
=
ChangeRequestSettingsSerializer
(
data
=
data_cms_settings
,
many
=
True
)
...
...
app/entities/models.py
View file @
ac1ce276
...
...
@@ -471,6 +471,14 @@ class BaseHeader(models.Model):
null
=
True
)
created
=
models
.
DateTimeField
(
auto_now_add
=
True
)
is_active
=
models
.
BooleanField
(
default
=
True
)
html_obj
=
models
.
TextField
(
blank
=
True
,
null
=
True
)
html_desc
=
models
.
TextField
(
blank
=
True
,
null
=
True
)
class
Meta
:
abstract
=
True
...
...
config/settings/base.py
View file @
ac1ce276
...
...
@@ -26,7 +26,7 @@ BASE_DIR = os.path.dirname(
SECRET_KEY
=
'w!dkk7gc*dk#4!6ow3s1wc32
%
_yp$=osgybm=n0vw6k1j^sqo&'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
False
ALLOWED_HOSTS
=
[
'*'
]
CORS_ORIGIN_ALLOW_ALL
=
True
...
...
@@ -201,9 +201,12 @@ DATABASES = {
}
}
# ****************
# PROGRAM SETTINGS
# ****************
DEBUG
=
config
[
'SETTINGS'
][
'DEBUG'
]
SESSION_TIMEOUT
=
config
[
'SETTINGS'
][
'SESSION_TIMEOUT'
]
FRONT_END_URL
=
config
[
'SETTINGS'
][
'FRONT_END_URL'
]
AUTH_ACCESSS_TOKEN_TIMEOUT
=
config
[
'SETTINGS'
][
'AUTH_ACCESSS_TOKEN_TIMEOUT'
]
...
...
env.new_template.ini
View file @
ac1ce276
...
...
@@ -14,6 +14,7 @@ USER_DEFAULT_PASSWORD = password
CATCH_EMAIL
=
gladys@tirsolutions.com
CR_LINK
=
http://localhost:8000/cms/change-request/form/view
REALTIMESERVER_IP
=
127.0.0.1:8000
DEBUG
=
True
[NOTIFICATION_EMAIL]
...
...
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