Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
django-sshkey
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
9630800e
authored
Jul 03, 2014
by
Scott Duckworth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set email from address to SSHKEY_FROM_EMAIL
SSHKEY_FROM_EMAIL defaults to DEFAULT_FROM_EMAIL
parent
eace7ee7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
django_sshkey/models.py
+5
-1
django_sshkey/settings.py
+1
-1
No files found.
django_sshkey/models.py
View file @
9630800e
...
...
@@ -117,4 +117,8 @@ def send_email_add_key(sender, instance, **kwargs):
key_fingerprint
=
instance
.
fingerprint
,
remote_addr
=
remote_addr
or
"<unknown>"
,
)
instance
.
user
.
email_user
(
settings
.
SSHKEY_EMAIL_ADD_KEY_SUBJECT
,
body
)
instance
.
user
.
email_user
(
settings
.
SSHKEY_EMAIL_ADD_KEY_SUBJECT
,
body
,
settings
.
SSHKEY_FROM_EMAIL
,
)
django_sshkey/settings.py
View file @
9630800e
...
...
@@ -41,4 +41,4 @@ SSHKEY_EMAIL_ADD_KEY_BODY = getattr(settings, 'SSHKEY_EMAIL_ADD_KEY_BODY',
"{key_fingerprint}
\n\n
"
"If you believe this key was added in error, you should delete the key."
)
DEFAULT_FROM_EMAIL
=
settings
.
DEFAULT_FROM_EMAIL
SSHKEY_FROM_EMAIL
=
getattr
(
settings
,
'SSHKEY_FROM_EMAIL'
,
settings
.
DEFAULT_FROM_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