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
cf869ff5
Commit
cf869ff5
authored
Oct 02, 2019
by
Gladys Forte
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'RMSv2' of
http://42.61.118.105:7990/scm/rms/api-main-service
into gladys-dev2
parents
34bf4bab
00081ddd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
12 deletions
+69
-12
app/applicationlayer/cms/master/form/company/views.py
app/applicationlayer/cms/master/form/company/views.py
+1
-1
app/applicationlayer/cms/master/form/department/views.py
app/applicationlayer/cms/master/form/department/views.py
+1
-1
app/applicationlayer/cms/master/template/account/views.py
app/applicationlayer/cms/master/template/account/views.py
+11
-8
config/settings/staging.py
config/settings/staging.py
+54
-0
env.template.ini
env.template.ini
+2
-2
No files found.
app/applicationlayer/cms/master/form/company/views.py
View file @
cf869ff5
...
...
@@ -29,7 +29,7 @@ class ChangeRequestCompanyFormViewSet(viewsets.ModelViewSet):
queryset
=
self
.
filter_queryset
(
self
.
get_queryset
())
allowed
=
AllowedCompany
.
objects
.
filter
(
Q
(
id_number
=
self
.
request
.
user
.
code
)
&
Q
(
create_change_request
_template
=
True
)
Q
(
create_change_request
=
True
)
)
.
values
(
'company_pivot'
)
queryset
=
queryset
.
filter
(
code__in
=
allowed
)
page
=
self
.
paginate_queryset
(
queryset
)
...
...
app/applicationlayer/cms/master/form/department/views.py
View file @
cf869ff5
...
...
@@ -35,7 +35,7 @@ class ChangeRequestDepartmentFormViewSet(viewsets.ModelViewSet):
allowed
=
AllowedCompany
.
objects
.
filter
(
Q
(
id_number
=
self
.
request
.
user
.
code
)
&
Q
(
company_pivot
=
company
)
&
Q
(
create_change_request
_template
=
True
)
Q
(
create_change_request
=
True
)
)
.
values
(
'group_pivots'
)
queryset
=
queryset
.
filter
(
code__in
=
allowed
)
page
=
self
.
paginate_queryset
(
queryset
)
...
...
app/applicationlayer/cms/master/template/account/views.py
View file @
cf869ff5
...
...
@@ -17,14 +17,17 @@ class UserListTemplate(APIView):
try
:
serializer
=
ChangeRequestList
dept
=
self
.
request
.
query_params
[
'department_code'
]
user_codes
=
models
.
User
.
objects
.
filter
(
# company = self.request.query_params['company_code']
# allowed = models.AllowedCompany.objects.filter(
# Q(group_pivots=dept) &
# Q()
# )
user_list
=
models
.
User
.
objects
.
filter
(
department
=
dept
)
.
values
(
'code'
)
.
exclude
(
id
=
1
)
verified_users
=
models
.
AllowedCompany
.
objects
.
filter
(
Q
(
id_number__in
=
user_codes
)
&
Q
(
create_change_request_template
=
True
)
)
.
exclude
(
id
=
request
.
user
.
id
)
page
=
self
.
paginate_queryset
(
verified_users
)
)
.
exclude
(
id
=
1
)
user_list
=
user_list
.
exclude
(
id
=
request
.
user
.
id
)
print
(
user_list
.
query
)
page
=
self
.
paginate_queryset
(
user_list
)
if
page
is
not
None
:
...
...
@@ -39,7 +42,7 @@ class UserListTemplate(APIView):
return
self
.
get_paginated_response
(
message
)
except
Exception
as
e
:
return
Response
(
{
"message"
:
"this endpoint expect a query params department_
id
"
},
{
"message"
:
"this endpoint expect a query params department_
code
"
},
status
=
status
.
HTTP_400_BAD_REQUEST
)
...
...
config/settings/staging.py
0 → 100644
View file @
cf869ff5
from
.base
import
*
import
configparser
DEBUG
=
True
ALLOWED_HOSTS
=
[
'*'
]
config
=
configparser
.
ConfigParser
()
config_file
=
os
.
path
.
join
(
'./'
,
'env.ini'
)
config
.
read
(
config_file
)
CHANNEL_LAYERS
=
{
'default'
:
{
'BACKEND'
:
'channels_redis.core.RedisChannelLayer'
,
'CONFIG'
:
{
"hosts"
:
[(
'172.17.0.1'
,
6379
)],
},
},
}
DATABASES
=
{
'default'
:
{
'ENGINE'
:
config
[
'staging'
][
'DATABASE_ENGINE'
],
'NAME'
:
config
[
'staging'
][
'DATABASE_NAME'
],
'USER'
:
config
[
'staging'
][
'DATABASE_USER'
],
'PASSWORD'
:
config
[
'staging'
][
'DATABASE_PASSWORD'
],
'HOST'
:
config
[
'staging'
][
'DATABASE_HOST'
],
'PORT'
:
config
[
'staging'
][
'DATABASE_PORT'
],
}
}
# ****************
# PROGRAM SETTINGS
# ****************
SESSION_TIMEOUT
=
config
[
'staging'
][
'SESSION_TIMEOUT'
]
FRONT_END_URL
=
config
[
'staging'
][
'FRONT_END_URL'
]
AUTH_ACCESSS_TOKEN_TIMEOUT
=
config
[
'staging'
][
'AUTH_ACCESSS_TOKEN_TIMEOUT'
]
USER_DEFAULT_PASSWORD
=
config
[
'staging'
][
'USER_DEFAULT_PASSWORD'
]
REALTIMESERVER_IP
=
config
[
'staging'
][
'REALTIMESERVER_IP'
]
# Notification Messages
APPROVER_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'APPROVER_MESSAGE'
]
REQUESTOR_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REQUESTOR_MESSAGE'
]
REQUESTOR_REJECT_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REQUESTOR_REJECT_MESSAGE'
]
VENDOR_ACKNOWLEDGE_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'VENDOR_ACKNOWLEDGE_MESSAGE'
]
REQUESTOR_ACKNOWLEDGE_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REQUESTOR_ACKNOWLEDGE_MESSAGE'
]
REQUESTOR_COMPLETION_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REQUESTOR_COMPLETION_MESSAGE'
]
VENDOR_ACCEPTANCE_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'VENDOR_ACCEPTANCE_MESSAGE'
]
VENDOR_REJECT_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'VENDOR_REJECT_MESSAGE'
]
#ADMIN PROFILE
CATCH_EMAIL
=
config
[
'staging'
][
'CATCH_EMAIL'
]
CR_FRONT_LINK
=
config
[
'staging'
][
'CR_LINK'
]
env.template.ini
View file @
cf869ff5
...
...
@@ -51,11 +51,11 @@ DATABASE_USER =
DATABASE_PASSWORD =
DATABASE_HOST
=
DATABASE_PORT =
SESSION_TIMEOUT
=
SESSION_TIMEOUT
=
30
FRONT_END_URL
=
http://staging.rms.oneberrysystem.com
AUTH_ACCESSS_TOKEN_TIMEOUT
=
3600
USER_DEFAULT_PASSWORD
=
password
CATCH_EMAIL
=
CATCH_EMAIL
=
gladys@tirsolutions.com
CR_LINK
=
http://staging.rms.oneberrysystem.com/cms/change-request/form/view
REALTIMESERVER_IP
=
127.0.0.1:8000
...
...
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