Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
oser-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hamza Touizrat
oser-backend
Commits
8d537690
Commit
8d537690
authored
Jun 9, 2018
by
florimondmanca
Browse files
Options
Downloads
Patches
Plain Diff
more bug fixes
parent
bc6c2461
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mails/settings.py
+4
-0
4 additions, 0 deletions
mails/settings.py
visits/serializers.py
+1
-5
1 addition, 5 deletions
visits/serializers.py
with
5 additions
and
5 deletions
mails/settings.py
+
4
−
0
View file @
8d537690
"""
Mails app settings.
"""
from
django.conf
import
settings
import
warnings
NOTIFICATIONS_ADDRESS
=
getattr
(
settings
,
'
MAILS_NOTIFICATIONS_ADDRESS
'
)
ENABLED
=
getattr
(
settings
,
'
MAILS_ENABLED
'
)
RAISE_EXCEPTIONS
=
getattr
(
settings
,
'
MAILS_RAISE_EXCEPTIONS
'
)
if
getattr
(
settings
,
'
SENDGRID_API_KEY
'
,
None
)
is
None
:
warnings
.
warn
(
'
SENDGRID_API_KEY is not set, sending emails will fail
'
)
This diff is collapsed.
Click to expand it.
visits/serializers.py
+
1
−
5
View file @
8d537690
...
...
@@ -54,10 +54,7 @@ class VisitListSerializer(serializers.HyperlinkedModelSerializer):
"""
Serializer for lists of visits.
"""
place
=
serializers
.
StringRelatedField
()
participants
=
serializers
.
SerializerMethodField
()
def
get_participants
(
self
,
obj
):
return
obj
.
participants
.
values_list
(
'
id
'
,
flat
=
True
)
participants
=
ParticipationSerializer
(
source
=
'
participations
'
,
many
=
True
)
organizers
=
serializers
.
SerializerMethodField
()
...
...
@@ -87,7 +84,6 @@ class VisitListSerializer(serializers.HyperlinkedModelSerializer):
class
VisitSerializer
(
VisitListSerializer
):
"""
Serializer for Visit.
"""
participants
=
ParticipationSerializer
(
source
=
'
participations
'
,
many
=
True
)
place
=
PlaceSerializer
()
organizers
=
VisitOrganizerSerializer
(
many
=
True
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment