-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from rl-institut/release-0.1.2
Release 0.1.2
- Loading branch information
Showing
19 changed files
with
488 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
{% 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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.