-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 0.1.2 #73
Release 0.1.2 #73
Changes from all commits
62aa298
00b6623
2398a6d
37f55d6
20cd249
e0f35d3
41ec808
17b1175
2e5375a
c25c12c
b907429
97751cf
2a4b472
05b4278
994bb96
70a2ed6
4da01ee
50db0e0
5c7e650
41efb17
af42c67
f4f7512
dd0405b
cc30a41
8a073d2
8e8cb66
a59dee5
98c638d
762758a
3340b5b
5d2e6c8
38b135e
a511b86
b43ea6e
c3aa2da
679e9fd
62ca879
dd2440f
03bedf7
779c4d0
df13a07
3a753e8
a068238
6ac14ce
53ca201
44c7896
cc9c2ea
f3ad5a4
ff7b906
7b01c25
82df80b
a2e3efe
a261608
971f5e6
dad49e6
eba9364
41f0bab
6005f80
596f7db
d6b9248
5484632
42fecb0
4834def
d52b06d
a54db3b
4e3b5f0
89a0d4c
1f006c3
02ef8de
595acff
3821ca3
f8bf3f0
b547ed4
09a1948
ba432f2
4f18c8e
ec9f05c
366fb89
6b759a5
6daf795
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,9 @@ | |
ALLOWED_HOSTS=127.0.0.1 | ||
SECRET_KEY=<secret_key> | ||
DJANGO_DB=DEFAULT | ||
WAM_EXCHANGE_ACCOUNT=<Microsoft Exchange Account, e.g. [email protected]> | ||
WAM_EXCHANGE_EMAIL=<Microsoft Exchange E-Mail Adress, e.g. [email protected]> | ||
WAM_EXCHANGE_PW=<Microsoft Exchange Account Password> | ||
|
||
[DATABASES] | ||
[[DEFAULT]] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,42 @@ Additionally, the label template tag supports two attributes: | |
If no label is found or given (sub-) section is not found, *None* will be returned. | ||
|
||
|
||
Feedback Form | ||
------------- | ||
|
||
A feedback form is available which can be used in all apps. The feedback is send via e-mail using an Exchange account. | ||
Required configuration parameters for the Exchange account are *WAM_EXCHANGE_ACCOUNT*, *WAM_EXCHANGE_EMAIL* and | ||
*WAM_EXCHANGE_PW*. They must be set in the *[WAM]* section of the *config.cfg* file, see :ref:`configuration_file` for | ||
details. | ||
|
||
To use the form, just add the view to your urls like | ||
|
||
.. code:: python | ||
|
||
# my_app/urls.py | ||
|
||
from utils.views import FeedbackView | ||
|
||
admin_url_patterns = [ | ||
path(<path to other view>), | ||
..., | ||
path('feedback/', FeedbackView.as_view(app_name='<my app name>'), name='feedback') | ||
] | ||
|
||
Make sure you have the parameter ``email`` set in your *app.cfg*, example: | ||
|
||
.. code:: text | ||
|
||
# my_app/app.cfg | ||
category = app | ||
name = ... | ||
icon = ... | ||
email = '[email protected]' | ||
|
||
This address is used to send feedback messages for the app. | ||
If the Exchange account or app admin's e-mail address is not configured correctly, the user will be redirected to an | ||
error page. | ||
|
||
.. _custom_admin_site: | ||
|
||
Customizing Admin Site | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ pandas | |
whitenoise | ||
celery | ||
configobj | ||
exchangelib | ||
django-markdownx | ||
django-crispy-forms | ||
psycopg2-binary | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
|
||
{% extends 'base.html' %} | ||
|
||
{% load static %} | ||
|
||
{% block content %} | ||
<div class="u-vh--100"> | ||
|
||
<main> | ||
|
||
<section class="grid-x l-bg-color hp-hero"> | ||
<div class="cell u-text--center"> | ||
<img src="{% static '/img/logos/WAM_logo_w.png' %}" alt="Logo WAM" class="hp_wam_img"> | ||
</div> | ||
</section> | ||
|
||
<section class="grid-x align-center l-bg-color--error hp-features"> | ||
<div class="cell large-10"> | ||
<div class="grid-x align-center"> | ||
<h2><i class='icon ion-alert-circled icon--large'></i> {{ err_text }}</h2> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
</main> | ||
|
||
|
||
<footer class="footer-hp l-bg-color--w"> | ||
<div class="grid-x"> | ||
|
||
<div class="cell footer-hp__logo"> | ||
<ul> | ||
<li> | ||
<a href="{% url 'index' %}" rel=”noopener” title="WAM-Startseite"> | ||
<img class="footer-hp__logo-wam" src="{% static '/img/logos/WAM_logo.png' %}" alt="Logo WAM"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://reiner-lemoine-institut.de/" target="_blank" rel=”noopener noreferrer” title="Reiner Lemoine Institut"> | ||
<img class="footer-hp__logo-rli" src="{% static 'img/rli_logo.png' %}" alt="Logo Reiner Lemoine Institut"> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<div class="cell medium-10 medium-offset-1"> | ||
<ul class="u-text--center" id="footer-links"> | ||
<li><a class="anchor-text--dark" href="{% url 'contact' %}">Kontakt</a></li> | ||
<li><a class="anchor-text--dark" href="{% url 'impressum' %}">Impressum</a></li> | ||
<li><a class="anchor-text--dark" href="{% url 'privacy' %}">Datenschutz</a></li> | ||
<li class="hide-for-small-only"> | ||
<p class="u-no-margin">© Reiner Lemoine Institut gGmbH</p> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
</div> | ||
</footer> | ||
|
||
</div> | ||
{% endblock %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% load static %} | ||
{% block content %} | ||
<div class="u-vh--100"> | ||
<main> | ||
<section class="grid-x align-center l-bg-color--light hp-features"> | ||
<div class="cell medium-8 large-6"> | ||
<h1><i class='icon ion-chatbubbles icon--large'></i> Ihr Feedback</h1> | ||
<p><strong>App: <a href="../" class="u-padding-top--l u-padding-bt--l">{{ app_name }}</a></strong></p> | ||
{% if intro_text %} | ||
<p>{{ intro_text }}</p> | ||
{% else %} | ||
<p>Hier können Sie uns eine Rückmeldung zur App geben, wir freuen uns über Ihre Nachricht!</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should have the text content of these form in english as well, no? We should in any case avoid to mix the two languages within the WAM There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's right, I'd keep it for now but we should refactor all language-related stuff as you recommended in #76 later. |
||
{% endif %} | ||
|
||
<form method="post"> | ||
{% csrf_token %} | ||
{{ form }} | ||
<button class="btn btn-cta" type="submit" style="float: right;">Abschicken</button> | ||
</form> | ||
</div> | ||
</section> | ||
</main> | ||
|
||
<footer class="footer-hp l-bg-color--w"> | ||
<div class="grid-x"> | ||
|
||
<div class="cell footer-hp__logo"> | ||
<ul> | ||
<li> | ||
<a href="{% url 'index' %}" rel=”noopener” title="WAM-Startseite"> | ||
<img class="footer-hp__logo-wam" src="{% static '/img/logos/WAM_logo.png' %}" alt="Logo WAM"> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://reiner-lemoine-institut.de/" target="_blank" rel=”noopener” title="Reiner Lemoine Institut"> | ||
<img class="footer-hp__logo-rli" src="{% static 'img/rli_logo.png' %}" alt="Logo Reiner Lemoine Institut"> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<div class="cell medium-10 medium-offset-1"> | ||
<ul class="u-text--center" id="footer-links"> | ||
<li><a class="anchor-text--dark" href="{% url 'contact' %}">Kontakt</a></li> | ||
<li><a class="anchor-text--dark" href="{% url 'impressum' %}">Impressum</a></li> | ||
<li><a class="anchor-text--dark" href="{% url 'privacy' %}">Datenschutz</a></li> | ||
<li class="hide-for-small-only"> | ||
<p class="u-no-margin">© Reiner Lemoine Institut gGmbH</p> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
</div> | ||
</footer> | ||
|
||
</div> | ||
|
||
{% endblock %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block content %} | ||
<div class="grid-x grid-padding-x align-center"> | ||
<div class="cell medium-8 large-6"> | ||
<h1><i class='icon ion-alert-circled icon--large'></i> {{ error_text }}</h1> | ||
<p><a href="{% url 'index' %}" class="u-padding-top--l u-padding-bt--l">Zur WAM-Startseite</a></p> | ||
</div> | ||
</div> | ||
{% endblock %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block content %} | ||
<div class="grid-x grid-padding-x align-center"> | ||
<div class="cell medium-8 large-6"> | ||
<h1><i class='icon ion-chatbubbles icon--large'></i> Vielen Dank für Ihr Feedback!</h1> | ||
<p><a href="{% url 'index' %}" class="u-padding-top--l u-padding-bt--l">Zur WAM-Startseite</a></p> | ||
</div> | ||
</div> | ||
{% endblock %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from django import forms | ||
|
||
|
||
class FeedbackForm(forms.Form): | ||
"""Input form for feedback page""" | ||
from_name = forms.CharField(required=False, | ||
max_length=100, | ||
label='Ihr Name (optional)') | ||
from_email = forms.EmailField(required=False, | ||
label='Ihre E-Mail-Adresse (optional)') | ||
subject = forms.CharField(required=True, | ||
max_length=100, | ||
label='Betreff') | ||
message = forms.CharField(widget=forms.Textarea, | ||
required=True, | ||
label='Ihr Feedback') | ||
|
||
def submit(self): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Writing a password in an uncrypted file???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not have a better idea right now as stated in #65. Hashes do not make sense here.
Do you?
As a first step, we should change config file permissions on the server to 600 (-rw-------). Agree, @henhuy?