Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
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
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
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
AlekSIS®
Official
AlekSIS-Core
Commits
0d938d0b
Commit
0d938d0b
authored
6 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Add dbsettings to feedback/rebus (issue
#100
)
parent
60da001a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!86
Merge school-apps
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
schoolapps/support/models.py
+5
-1
5 additions, 1 deletion
schoolapps/support/models.py
schoolapps/support/views.py
+4
-3
4 additions, 3 deletions
schoolapps/support/views.py
with
9 additions
and
4 deletions
schoolapps/support/models.py
+
5
−
1
View file @
0d938d0b
import
dbsettings
from
django
import
forms
from
django.db
import
models
...
...
@@ -10,6 +9,10 @@ class KanboardSettings(dbsettings.Group):
kb_project_id_feedback
=
dbsettings
.
PositiveIntegerValue
(
"
Project ID for feedback tasks
"
)
class
MailSettings
(
dbsettings
.
Group
):
mail_rebus
=
dbsettings
.
EmailValue
(
"
Email address for REBUS
"
)
mail_feedback
=
dbsettings
.
EmailValue
(
"
Email address for Feedback
"
)
class
Support
(
models
.
Model
):
class
Meta
:
permissions
=
(
...
...
@@ -19,3 +22,4 @@ class Support(models.Model):
kanboard_settings
=
KanboardSettings
(
"
Kanboard
"
)
mail_settings
=
MailSettings
(
"
Mail adresses
"
)
This diff is collapsed.
Click to expand it.
schoolapps/support/views.py
+
4
−
3
View file @
0d938d0b
from
django.shortcuts
import
render
from
mailer
import
send_mail_with_template
from
support.models
import
kanboard_settings
from
support.models
import
kanboard_settings
,
mail_settings
from
untisconnect.api
import
get_all_rooms
from
.forms
import
REBUSForm
from
.forms
import
FeedbackForm
...
...
@@ -52,7 +52,7 @@ def rebus(request):
"
long_desc
"
:
long_description
,
"
user
"
:
request
.
user
.
username
}
send_mail_with_template
(
"
Neue REBUS-Meldung
"
,
[
"
support@katharineum.de
"
],
"
support/mail/rebus.txt
"
,
send_mail_with_template
(
"
Neue REBUS-Meldung
"
,
[
mail_settings
.
mail_rebus
],
"
support/mail/rebus.txt
"
,
"
support/mail/rebus.html
"
,
context
)
return
render
(
request
,
'
support/rebus_submitted.html
'
)
...
...
@@ -122,7 +122,8 @@ def feedback(request):
"
ideas
"
:
ideas
,
"
user
"
:
request
.
user
.
username
}
send_mail_with_template
(
"
Neues Feedback von {}
"
.
format
(
request
.
user
.
username
),
[
"
support@katharineum.de
"
],
send_mail_with_template
(
"
Neues Feedback von {}
"
.
format
(
request
.
user
.
username
),
[
mail_settings
.
mail_feedback
],
"
support/mail/feedback.txt
"
,
"
support/mail/feedback.html
"
,
context
)
print
(
context
)
...
...
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