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
ba44675b
Commit
ba44675b
authored
Feb 10, 2020
by
John Red Medrano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{dev bugfix} delete un used codes and folder
parent
327611a2
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
0 additions
and
2137 deletions
+0
-2137
app/applicationlayer/authentication/__init__.py
app/applicationlayer/authentication/__init__.py
+0
-0
app/applicationlayer/authentication/apps.py
app/applicationlayer/authentication/apps.py
+0
-5
app/applicationlayer/authentication/models.py
app/applicationlayer/authentication/models.py
+0
-3
app/applicationlayer/authentication/views.py
app/applicationlayer/authentication/views.py
+0
-3
app/applicationlayer/cms/form/serializers.py
app/applicationlayer/cms/form/serializers.py
+0
-173
app/applicationlayer/cms/form/views.py
app/applicationlayer/cms/form/views.py
+0
-1099
app/applicationlayer/cms/template/serializers.py
app/applicationlayer/cms/template/serializers.py
+0
-102
app/applicationlayer/cms/template/views.py
app/applicationlayer/cms/template/views.py
+0
-414
app/applicationlayer/cms/user_privilege/serializers.py
app/applicationlayer/cms/user_privilege/serializers.py
+0
-0
app/applicationlayer/cms/user_privilege/views.py
app/applicationlayer/cms/user_privilege/views.py
+0
-0
app/applicationlayer/paginators.py
app/applicationlayer/paginators.py
+0
-61
app/applicationlayer/serializers.py
app/applicationlayer/serializers.py
+0
-9
app/applicationlayer/views.py
app/applicationlayer/views.py
+0
-0
app/entities/enums.py
app/entities/enums.py
+0
-28
config/settings/demo.py
config/settings/demo.py
+0
-61
config/settings/dev.py
config/settings/dev.py
+0
-61
config/settings/sit.py
config/settings/sit.py
+0
-59
config/settings/staging.py
config/settings/staging.py
+0
-59
No files found.
app/applicationlayer/authentication/__init__.py
deleted
100644 → 0
View file @
327611a2
app/applicationlayer/authentication/apps.py
deleted
100644 → 0
View file @
327611a2
from
django.apps
import
AppConfig
class
AuthenticationConfig
(
AppConfig
):
name
=
'authentication'
app/applicationlayer/authentication/models.py
deleted
100644 → 0
View file @
327611a2
from
django.db
import
models
# Create your models here.
app/applicationlayer/authentication/views.py
deleted
100644 → 0
View file @
327611a2
from
django.shortcuts
import
render
# Create your views here.
app/applicationlayer/cms/form/serializers.py
deleted
100644 → 0
View file @
327611a2
from
app.entities
import
models
from
rest_framework
import
serializers
from
django.db.models
import
Q
from
drf_writable_nested
import
WritableNestedModelSerializer
from
app.applicationlayer.utils
import
model_to_dict
class
ChangeRequestFormApproversSerializer
(
serializers
.
ModelSerializer
):
def
to_representation
(
self
,
instance
):
ret
=
super
()
.
to_representation
(
instance
)
try
:
ret
[
'company'
]
=
model_to_dict
(
instance
.
user
.
department
.
company
)
ret
[
'department'
]
=
model_to_dict
(
instance
.
user
.
department
)
user_object
=
{
"id"
:
instance
.
user
.
id
,
"name"
:
instance
.
user
.
name
,
"username"
:
instance
.
user
.
username
,
"code"
:
instance
.
user
.
code
,
"email"
:
instance
.
user
.
email
,
"contact_no"
:
instance
.
user
.
contact_no
}
ret
[
'user'
]
=
user_object
return
ret
except
Exception
as
e
:
ret
[
'user'
]
=
"none"
ret
[
'department'
]
=
"none"
ret
[
'company'
]
=
"none"
return
ret
class
Meta
:
model
=
models
.
ChangeRequestFormApprovers
fields
=
'__all__'
read_only_fields
=
[
'created'
,
'code'
]
class
ChangeRequestFormStakeHoldersSerializer
(
serializers
.
ModelSerializer
):
class
Meta
:
model
=
models
.
ChangeRequestFormStakeHolders
fields
=
'__all__'
read_only_fields
=
[
'created'
,
'code'
]
class
ChangeRequestFormAttachmentsSerializer
(
serializers
.
ModelSerializer
):
class
Meta
:
model
=
models
.
ChangeRequestFormAttachments
fields
=
'__all__'
read_only_fields
=
[
'created'
,
'code'
]
class
ChangeRequestFormDetailsSerializer
(
serializers
.
ModelSerializer
):
class
Meta
:
model
=
models
.
ChangeRequestFormDetails
fields
=
'__all__'
read_only_fields
=
[
'created'
,
'code'
]
class
ChangeRequestFormHeaderSerializer
(
serializers
.
ModelSerializer
):
frm_approvers
=
ChangeRequestFormApproversSerializer
(
many
=
True
,
read_only
=
True
)
frm_stakes
=
ChangeRequestFormStakeHoldersSerializer
(
many
=
True
,
read_only
=
True
)
frm_attachments
=
ChangeRequestFormAttachmentsSerializer
(
many
=
True
,
read_only
=
True
)
frm_details
=
ChangeRequestFormDetailsSerializer
(
many
=
True
,
read_only
=
True
)
def
to_representation
(
self
,
instance
):
ret
=
super
()
.
to_representation
(
instance
)
try
:
user
=
self
.
context
[
'request'
]
.
user
id_number
=
user
.
code
current_level
=
models
.
ChangeRequestFormApprovers
.
objects
.
filter
(
Q
(
form_code
=
ret
[
'form_code'
])
&
(
Q
(
action
=
''
)
|
Q
(
action
=
None
))
)
.
order_by
(
'level'
)
if
current_level
[
0
]
.
user
.
code
==
id_number
:
if
instance
.
status
.
lower
()
==
'rejected'
:
approver
=
'No'
elif
instance
.
status
.
lower
()
==
'cancelled'
:
approver
=
'No'
elif
instance
.
status
.
lower
()
==
'completed & accepted'
:
approver
=
'No'
else
:
approver
=
'Yes'
else
:
approver
=
'No'
ret
[
'action'
]
=
approver
ret
[
'company'
]
=
instance
.
requested_to_company
.
name
ret
[
'department'
]
=
instance
.
requested_to_department
.
name
ret
[
'requested_by'
]
=
instance
.
requested_by_user
.
name
return
ret
except
Exception
as
e
:
ret
[
'action'
]
=
"No"
ret
[
'company'
]
=
"None"
ret
[
'department'
]
=
"None"
ret
[
'requested_by'
]
=
"None"
return
ret
class
Meta
:
model
=
models
.
ChangeRequestFormHeader
# fields = '__all__'
fields
=
(
'form_code'
,
'requested_to_template_name'
,
'requested_to_objective'
,
'requested_to_target_date'
,
'requested_to_priority'
,
'description'
,
'created'
,
'cancel_date'
,
'status'
,
'requested_to_template_id'
,
'requested_to_company'
,
'requested_to_department'
,
'requested_to_user'
,
'requested_by_user'
,
'requested_by_department'
,
'template_no'
,
'frm_approvers'
,
'frm_stakes'
,
'frm_attachments'
,
'frm_details'
)
read_only_fields
=
[
'created'
,
'form_code'
]
# 'company_desc', 'department_desc', 'requested_desc',
class
ChangeRequestFormHeaderSerializerList
(
serializers
.
ModelSerializer
):
def
to_representation
(
self
,
instance
):
ret
=
super
()
.
to_representation
(
instance
)
try
:
user
=
self
.
context
[
'request'
]
.
user
id_number
=
user
.
code
current_level
=
models
.
ChangeRequestFormApprovers
.
objects
.
filter
(
Q
(
form_code
=
ret
[
'form_code'
])
&
(
Q
(
action
=
''
)
|
Q
(
action
=
None
))
)
.
order_by
(
'level'
)
if
current_level
[
0
]
.
user
.
code
==
id_number
:
if
instance
.
status
.
lower
()
==
'rejected'
:
approver
=
'No'
elif
instance
.
status
.
lower
()
==
'cancelled'
:
approver
=
'No'
elif
instance
.
status
.
lower
()
==
'completed & accepted'
:
approver
=
'No'
else
:
approver
=
'Yes'
else
:
approver
=
'No'
ret
[
'action'
]
=
approver
ret
[
'company'
]
=
instance
.
requested_to_company
.
name
ret
[
'department'
]
=
instance
.
requested_to_department
.
name
ret
[
'requested_by'
]
=
instance
.
requested_by_user
.
name
return
ret
except
Exception
as
e
:
ret
[
'action'
]
=
"No"
ret
[
'company'
]
=
"None"
ret
[
'department'
]
=
"None"
ret
[
'requested_by'
]
=
"None"
return
ret
class
Meta
:
model
=
models
.
ChangeRequestFormHeader
fields
=
'__all__'
read_only_fields
=
[
'created'
,
'form_code'
]
\ No newline at end of file
app/applicationlayer/cms/form/views.py
deleted
100644 → 0
View file @
327611a2
This diff is collapsed.
Click to expand it.
app/applicationlayer/cms/template/serializers.py
deleted
100644 → 0
View file @
327611a2
from
app.entities
import
models
from
rest_framework
import
serializers
from
django.db.models
import
Q
from
app.applicationlayer.utils
import
model_to_dict
from
drf_writable_nested
import
WritableNestedModelSerializer
from
app.applicationlayer.cms.utils_cr
import
(
get_account_details
,
get_dept_details
,
get_companies_details
)
from
app.applicationlayer.cms.template.approver.serializers
import
ChangeRequestTemplateApproversSerializer
from
app.applicationlayer.cms.template.stakeholder.serializers
import
ChangeRequestTemplateStakeHoldersSerializer
class
ChangeRequestTemplateAttachmentsSerializer
(
serializers
.
ModelSerializer
):
class
Meta
:
model
=
models
.
ChangeRequestTemplateAttachments
fields
=
'__all__'
read_only_fields
=
[
'created'
,
'code'
]
class
ChangeRequestTemplateDetailsSerializer
(
serializers
.
ModelSerializer
):
class
Meta
:
model
=
models
.
ChangeRequestTemplateDetails
fields
=
'__all__'
read_only_fields
=
[
'created'
,
'code'
]
class
ChangeRequestTemplatesSerializer
(
serializers
.
ModelSerializer
):
tmp_approvers
=
ChangeRequestTemplateApproversSerializer
(
many
=
True
,
read_only
=
True
)
tmp_stakes
=
ChangeRequestTemplateStakeHoldersSerializer
(
many
=
True
,
read_only
=
True
)
tmp_attachments
=
ChangeRequestTemplateAttachmentsSerializer
(
many
=
True
,
read_only
=
True
)
tmp_details
=
ChangeRequestTemplateDetailsSerializer
(
many
=
True
,
read_only
=
True
)
def
to_representation
(
self
,
instance
):
ret
=
super
()
.
to_representation
(
instance
)
try
:
ret
[
'company'
]
=
instance
.
requested_to_company
.
name
ret
[
'department'
]
=
instance
.
requested_to_department
.
name
ret
[
'point_of_contact'
]
=
instance
.
requested_to_user
.
name
ret
[
'created_by'
]
=
instance
.
created_by_user
.
name
return
ret
except
Exception
as
e
:
ret
[
'company'
]
=
"none"
ret
[
'department'
]
=
"none"
ret
[
'point_of_contact'
]
=
"none"
ret
[
'created_by'
]
=
"none"
return
ret
class
Meta
:
model
=
models
.
ChangeRequestTemplateHeader
# fields = '__all__'
fields
=
(
'template_no'
,
'requested_to_template_name'
,
'requested_to_objective'
,
'requested_to_target_date'
,
'requested_to_priority'
,
'description'
,
'created'
,
'requested_to_template_id'
,
'requested_to_company'
,
'requested_to_department'
,
'requested_to_user'
,
'created_by_user'
,
'created_by_department'
,
'tmp_approvers'
,
'tmp_stakes'
,
'tmp_attachments'
,
'tmp_details'
)
read_only_fields
=
[
'created'
,
'template_no'
]
class
ChangeRequestTemplatesSerializerList
(
serializers
.
ModelSerializer
):
def
to_representation
(
self
,
instance
):
ret
=
super
()
.
to_representation
(
instance
)
try
:
ret
[
'company'
]
=
instance
.
requested_to_company
.
name
ret
[
'department'
]
=
instance
.
requested_to_department
.
name
ret
[
'point_of_contact'
]
=
instance
.
requested_to_user
.
name
ret
[
'created_by'
]
=
instance
.
created_by_user
.
name
return
ret
except
Exception
as
e
:
ret
[
'company'
]
=
"none"
ret
[
'department'
]
=
"none"
ret
[
'point_of_contact'
]
=
"none"
ret
[
'created_by'
]
=
"none"
return
ret
class
Meta
:
model
=
models
.
ChangeRequestTemplateHeader
fields
=
'__all__'
read_only_fields
=
[
'created'
,
'template_no'
]
app/applicationlayer/cms/template/views.py
deleted
100644 → 0
View file @
327611a2
This diff is collapsed.
Click to expand it.
app/applicationlayer/cms/user_privilege/serializers.py
deleted
100644 → 0
View file @
327611a2
app/applicationlayer/cms/user_privilege/views.py
deleted
100644 → 0
View file @
327611a2
app/applicationlayer/paginators.py
deleted
100644 → 0
View file @
327611a2
from
rest_framework
import
pagination
from
collections
import
OrderedDict
from
rest_framework.response
import
Response
from
django.core.paginator
import
InvalidPage
from
rest_framework.exceptions
import
NotFound
from
django.utils
import
six
from
django.utils.translation
import
ugettext_lazy
as
_
class
SimplePageNumberPagination
(
pagination
.
PageNumberPagination
):
page_query_param
=
'page'
page_size_query_param
=
'page-size'
max_page_size
=
1000
invalid_page_message
=
_
(
'Invalid page.'
)
def
paginate_queryset
(
self
,
queryset
,
request
,
view
=
None
):
"""
Paginate a queryset if required, either returning a
page object, or `None` if pagination is not configured for this view.
"""
page_size
=
self
.
get_page_size
(
request
)
if
not
page_size
:
return
None
paginator
=
self
.
django_paginator_class
(
queryset
,
page_size
)
page_number
=
request
.
query_params
.
get
(
self
.
page_query_param
,
1
)
if
page_number
in
self
.
last_page_strings
:
page_number
=
paginator
.
num_pages
try
:
if
len
(
queryset
)
<
page_size
:
page_number
=
1
self
.
page
=
paginator
.
page
(
page_number
)
except
InvalidPage
as
exc
:
msg
=
self
.
invalid_page_message
.
format
(
page_number
=
page_number
,
message
=
six
.
text_type
(
exc
)
)
raise
NotFound
(
msg
)
if
paginator
.
num_pages
>
1
and
self
.
template
is
not
None
:
# The browsable API should display pagination controls.
self
.
display_page_controls
=
True
self
.
request
=
request
return
list
(
self
.
page
)
def
get_paginated_response
(
self
,
data
,
additional_info
=
None
):
content
=
[
(
'count'
,
self
.
page
.
paginator
.
count
),
(
'next'
,
self
.
get_next_link
()),
(
'previous'
,
self
.
get_previous_link
()),
(
'results'
,
data
),
(
'page'
,
self
.
page
.
number
),
(
'additional_info'
,
additional_info
)
]
return
Response
(
OrderedDict
(
content
))
app/applicationlayer/serializers.py
deleted
100644 → 0
View file @
327611a2
from
rest_framework
import
serializers
from
app.entities
import
models
class
DepartmentSerializer
(
serializers
.
ModelSerializer
):
class
Meta
:
model
=
models
.
Department
fields
=
(
'__all__'
)
depth
=
0
app/applicationlayer/views.py
deleted
100644 → 0
View file @
327611a2
app/entities/enums.py
View file @
ba44675b
...
...
@@ -2,18 +2,6 @@ from enum import Enum
class
ModelSeriesEnum
(
Enum
):
USER
=
"USR"
# CLIENT = "CLI"
# CONSUMABLEPRODUCTS = "CSP"
# PROJECT = "PRJ"
# SERIALIZEITEM = "ITM"
# SERIALIZEPRODUCT = "SRP"
# SUPPLIER = "SUP"
# WAREHOUSE = "WHL"
# ACQUISITION = 'AQN'
# REQUISITION = 'RQN'
# PURCHASEREQUEST = 'PR'
# STOCKTAKE = 'STK'
# CHECKOUT = 'CHK'
class
UserTypeEnum
(
Enum
):
SUPER_USER
=
"SU"
...
...
@@ -77,22 +65,6 @@ class LogEntitiesEnum(Enum):
ChangeRequestFormAttachments
=
"ChangeRequestFormAttachments"
ChangeRequestFormDetails
=
"ChangeRequestFormDetails"
# BRAND = "Brand"
# CATEGORY = "Category"
# CURRENCY = "Currency"
# UNIT_MATERIAL = "Unit Material"
# NEWS = "News"
# PROJECT = "Project"
# PROJECT_LOCATION = "Project Location"
# WAREHOUSE = "Warehouse"
# SUPPLIER = "Supplier"
# CLIENT = "Client"
# PRODUCT = "Product"
# ACQUISITION_ITEM = "Acquisition Item"
# STOCK = "Stock"
# STOCK_ITEM = "Stock Item"
# REQUISITION = "Requisition Header"
'''
*********
CR HISTORY ENUMS
...
...
config/settings/demo.py
deleted
100644 → 0
View file @
327611a2
from
.base
import
*
import
configparser
DEBUG
=
False
ALLOWED_HOSTS
=
[
'*'
]
# CORS_ORIGIN_ALLOW_ALL = True
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
)],
# "hosts": [('127.0.0.1', 6379)],
},
},
}
DATABASES
=
{
'default'
:
{
'ENGINE'
:
config
[
'DEMO'
][
'DATABASE_ENGINE'
],
'NAME'
:
config
[
'DEMO'
][
'DATABASE_NAME'
],
'USER'
:
config
[
'DEMO'
][
'DATABASE_USER'
],
'PASSWORD'
:
config
[
'DEMO'
][
'DATABASE_PASSWORD'
],
'HOST'
:
config
[
'DEMO'
][
'DATABASE_HOST'
],
'PORT'
:
config
[
'DEMO'
][
'DATABASE_PORT'
],
}
}
# ****************
# PROGRAM SETTINGS
# ****************
SESSION_TIMEOUT
=
config
[
'DEMO'
][
'SESSION_TIMEOUT'
]
FRONT_END_URL
=
config
[
'DEMO'
][
'FRONT_END_URL'
]
AUTH_ACCESSS_TOKEN_TIMEOUT
=
config
[
'DEMO'
][
'AUTH_ACCESSS_TOKEN_TIMEOUT'
]
USER_DEFAULT_PASSWORD
=
config
[
'DEMO'
][
'USER_DEFAULT_PASSWORD'
]
REALTIMESERVER_IP
=
config
[
'DEMO'
][
'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'
]
REVISED_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REVISED_MESSAGE'
]
CANCEL_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'CANCEL_MESSAGE'
]
APPROVER_REJECT_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'APPROVER_REJECT_MESSAGE'
]
#ADMIN PROFILE
CATCH_EMAIL
=
config
[
'DEMO'
][
'CATCH_EMAIL'
]
CR_FRONT_LINK
=
config
[
'DEMO'
][
'CR_LINK'
]
CORS_ORIGIN_ALLOW_ALL
=
True
config/settings/dev.py
deleted
100644 → 0
View file @
327611a2
from
.base
import
*
import
configparser
DEBUG
=
True
ALLOWED_HOSTS
=
[
'*'
]
# CORS_ORIGIN_ALLOW_ALL = True
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
)],
# "hosts": [('127.0.0.1', 6379)],
},
},
}
DATABASES
=
{
'default'
:
{
'ENGINE'
:
config
[
'DEV'
][
'DATABASE_ENGINE'
],
'NAME'
:
config
[
'DEV'
][
'DATABASE_NAME'
],
'USER'
:
config
[
'DEV'
][
'DATABASE_USER'
],
'PASSWORD'
:
config
[
'DEV'
][
'DATABASE_PASSWORD'
],
'HOST'
:
config
[
'DEV'
][
'DATABASE_HOST'
],
'PORT'
:
config
[
'DEV'
][
'DATABASE_PORT'
],
}
}
# ****************
# PROGRAM SETTINGS
# ****************
SESSION_TIMEOUT
=
config
[
'DEV'
][
'SESSION_TIMEOUT'
]
FRONT_END_URL
=
config
[
'DEV'
][
'FRONT_END_URL'
]
AUTH_ACCESSS_TOKEN_TIMEOUT
=
config
[
'DEV'
][
'AUTH_ACCESSS_TOKEN_TIMEOUT'
]
USER_DEFAULT_PASSWORD
=
config
[
'DEV'
][
'USER_DEFAULT_PASSWORD'
]
REALTIMESERVER_IP
=
config
[
'DEV'
][
'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'
]
REVISED_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REVISED_MESSAGE'
]
CANCEL_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'CANCEL_MESSAGE'
]
APPROVER_REJECT_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'APPROVER_REJECT_MESSAGE'
]
#ADMIN PROFILE
CATCH_EMAIL
=
config
[
'DEV'
][
'CATCH_EMAIL'
]
CR_FRONT_LINK
=
config
[
'DEV'
][
'CR_LINK'
]
CORS_ORIGIN_ALLOW_ALL
=
True
config/settings/sit.py
deleted
100644 → 0
View file @
327611a2
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
)],
# "hosts": [('127.0.0.1', 6379)],
},
},
}
DATABASES
=
{
'default'
:
{
'ENGINE'
:
config
[
'SIT'
][
'DATABASE_ENGINE'
],
'NAME'
:
config
[
'SIT'
][
'DATABASE_NAME'
],
'USER'
:
config
[
'SIT'
][
'DATABASE_USER'
],
'PASSWORD'
:
config
[
'SIT'
][
'DATABASE_PASSWORD'
],
'HOST'
:
config
[
'SIT'
][
'DATABASE_HOST'
],
'PORT'
:
config
[
'SIT'
][
'DATABASE_PORT'
],
}
}
# ****************
# PROGRAM SETTINGS
# ****************
SESSION_TIMEOUT
=
config
[
'SIT'
][
'SESSION_TIMEOUT'
]
FRONT_END_URL
=
config
[
'SIT'
][
'FRONT_END_URL'
]
AUTH_ACCESSS_TOKEN_TIMEOUT
=
config
[
'SIT'
][
'AUTH_ACCESSS_TOKEN_TIMEOUT'
]
USER_DEFAULT_PASSWORD
=
config
[
'SIT'
][
'USER_DEFAULT_PASSWORD'
]
REALTIMESERVER_IP
=
config
[
'SIT'
][
'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'
]
REVISED_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REVISED_MESSAGE'
]
CANCEL_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'CANCEL_MESSAGE'
]
APPROVER_REJECT_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'APPROVER_REJECT_MESSAGE'
]
#ADMIN PROFILE
CATCH_EMAIL
=
config
[
'SIT'
][
'CATCH_EMAIL'
]
CR_FRONT_LINK
=
config
[
'SIT'
][
'CR_LINK'
]
CORS_ORIGIN_ALLOW_ALL
=
True
config/settings/staging.py
deleted
100644 → 0
View file @
327611a2
from
.base
import
*
import
configparser
DEBUG
=
False
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
)],
# "hosts": [('127.0.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'
]
REVISED_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'REVISED_MESSAGE'
]
CANCEL_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'CANCEL_MESSAGE'
]
APPROVER_REJECT_MESSAGE
=
config
[
'NOTIFICATION_EMAIL'
][
'APPROVER_REJECT_MESSAGE'
]
#ADMIN PROFILE
CATCH_EMAIL
=
config
[
'STAGING'
][
'CATCH_EMAIL'
]
CR_FRONT_LINK
=
config
[
'STAGING'
][
'CR_LINK'
]
CORS_ORIGIN_ALLOW_ALL
=
True
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