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
fc39a41a
Commit
fc39a41a
authored
Jan 17, 2020
by
John Red Medrano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing issue on verb
parent
602612ca
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
app/applicationlayer/cms/cms_settings/views.py
app/applicationlayer/cms/cms_settings/views.py
+4
-2
app/helper/email_service/sender.py
app/helper/email_service/sender.py
+2
-2
app/helper/email_service/templates/RMS-ONBEHALF.html
app/helper/email_service/templates/RMS-ONBEHALF.html
+1
-1
No files found.
app/applicationlayer/cms/cms_settings/views.py
View file @
fc39a41a
...
@@ -86,8 +86,9 @@ class CMSSettingsViewSet(viewsets.ModelViewSet):
...
@@ -86,8 +86,9 @@ class CMSSettingsViewSet(viewsets.ModelViewSet):
active_user
=
self
.
request
.
user
.
name
active_user
=
self
.
request
.
user
.
name
admin
=
request
.
user
.
email
admin
=
request
.
user
.
email
linking_verb
=
'as'
args
=
[
behalf_name
,
'Removed'
,
active_user
,
behalf_email
,
admin
,
'as'
]
args
=
[
behalf_name
,
'Removed'
,
active_user
,
behalf_email
,
admin
,
linking_verb
]
main_threading
(
args
,
sender
.
on_behalf
)
main_threading
(
args
,
sender
.
on_behalf
)
return
Response
(
status
=
status
.
HTTP_204_NO_CONTENT
)
return
Response
(
status
=
status
.
HTTP_204_NO_CONTENT
)
...
@@ -116,13 +117,14 @@ class CMSSettingsViewSet(viewsets.ModelViewSet):
...
@@ -116,13 +117,14 @@ class CMSSettingsViewSet(viewsets.ModelViewSet):
active_user
=
self
.
request
.
user
.
name
active_user
=
self
.
request
.
user
.
name
action
=
'Added'
action
=
'Added'
admin
=
request
.
user
.
email
admin
=
request
.
user
.
email
linking_verb
=
'on'
for
data
in
data_cms_settings
:
for
data
in
data_cms_settings
:
recipient
=
User
.
objects
.
get
(
recipient
=
User
.
objects
.
get
(
code
=
str
(
data
[
'behalf_user'
])
code
=
str
(
data
[
'behalf_user'
])
)
)
args
=
[
recipient
.
name
,
action
,
active_user
,
recipient
.
email
,
admin
,
'on'
]
args
=
[
recipient
.
name
,
action
,
active_user
,
recipient
.
email
,
admin
,
linking_verb
]
main_threading
(
args
,
sender
.
on_behalf
)
main_threading
(
args
,
sender
.
on_behalf
)
if
serializer
.
is_valid
(
raise_exception
=
True
):
if
serializer
.
is_valid
(
raise_exception
=
True
):
...
...
app/helper/email_service/sender.py
View file @
fc39a41a
...
@@ -606,8 +606,7 @@ def on_behalf(args):
...
@@ -606,8 +606,7 @@ def on_behalf(args):
recipient
=
args
[
3
]
recipient
=
args
[
3
]
admin
=
args
[
4
]
admin
=
args
[
4
]
verb
=
args
[
5
]
linking_verb
=
args
[
5
]
print
(
verb
)
F
=
open
(
os
.
path
.
join
(
settings
.
EMAIL_TEMPLATES_ROOT
,
'RMS-ONBEHALF.html'
),
'r'
)
F
=
open
(
os
.
path
.
join
(
settings
.
EMAIL_TEMPLATES_ROOT
,
'RMS-ONBEHALF.html'
),
'r'
)
...
@@ -616,6 +615,7 @@ def on_behalf(args):
...
@@ -616,6 +615,7 @@ def on_behalf(args):
FC
=
FC
.
replace
(
'{name}'
,
name
)
FC
=
FC
.
replace
(
'{name}'
,
name
)
FC
=
FC
.
replace
(
'{action}'
,
action
)
FC
=
FC
.
replace
(
'{action}'
,
action
)
FC
=
FC
.
replace
(
'{active_user}'
,
active_user
)
FC
=
FC
.
replace
(
'{active_user}'
,
active_user
)
FC
=
FC
.
replace
(
'{linking_verb}'
,
linking_verb
)
try
:
try
:
send_mail
(
send_mail
(
...
...
app/helper/email_service/templates/RMS-ONBEHALF.html
View file @
fc39a41a
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<h3
style=
"color:#888888;"
>
{action} on Behalf
</h3><br>
<h3
style=
"color:#888888;"
>
{action} on Behalf
</h3><br>
<p>
Dear {name},
</p><br>
<p>
Dear {name},
</p><br>
<p>
Please be informed that {active_user} {action} you {verb} their behalf for change requests under Actions on Behalf.
</p><br>
<p>
Please be informed that {active_user} {action} you {
linking_
verb} their behalf for change requests under Actions on Behalf.
</p><br>
<!-- <p>Please be informed that {active_user} {action} you as on behalf user for change request. </p><br> -->
<!-- <p>Please be informed that {active_user} {action} you as on behalf user for change request. </p><br> -->
<p>
Sincerely,
</p>
<p>
Sincerely,
</p>
...
...
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