Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Paweljong
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Teckids
Projekt Hack-n-Fun
AlekSIS-App-Paweljong
Merge requests
!9
Resolve "Info mailing"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Info mailing"
17-info-mailing
into
master
Overview
0
Commits
7
Pipelines
10
Changes
2
Merged
Nik | Klampfradler
requested to merge
17-info-mailing
into
master
3 years ago
Overview
0
Commits
7
Pipelines
10
Changes
2
Expand
Closes
#17 (closed)
Edited
3 years ago
by
Tom Teichler
0
0
Merge request reports
Viewing commit
4ca65f10
Prev
Next
Show latest version
2 files
+
16
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
Verified
4ca65f10
Implement automatic sending of info mailings
· 4ca65f10
Nik | Klampfradler
authored
3 years ago
aleksis/apps/paweljong/models.py
+
6
−
0
Options
@@ -29,6 +29,8 @@ class InfoMailing(ExtensibleModel):
text
=
RichTextField
(
verbose_name
=
_
(
"
Text
"
))
reply_to
=
models
.
EmailField
(
verbose_name
=
_
(
"
Request replies to
"
),
blank
=
True
)
active
=
models
.
BooleanField
(
verbose_name
=
_
(
"
Mailing is active
"
),
default
=
False
)
send_to_person
=
models
.
BooleanField
(
verbose_name
=
_
(
"
Send to registered person
"
),
default
=
True
)
send_to_guardians
=
models
.
BooleanField
(
verbose_name
=
_
(
"
Send to guardians
"
),
default
=
False
)
@@ -37,6 +39,10 @@ class InfoMailing(ExtensibleModel):
def
__str__
(
self
)
->
str
:
return
self
.
subject
@classmethod
def
get_active_mailings
(
cls
):
return
cls
.
objects
.
filter
(
active
=
True
)
def
send
(
self
):
sent_to
=
self
.
sent_to
.
all
()
Loading