Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
radiopanik
panikweb
Commits
0d3d354d
Commit
0d3d354d
authored
Sep 14, 2013
by
fred
Browse files
add newsletter subscribe form to home page
parent
d03ca156
Changes
3
Show whitespace changes
Inline
Side-by-side
panikweb/views.py
View file @
0d3d354d
...
...
@@ -19,6 +19,8 @@ from emissions.models import Category, Emission, Episode, Diffusion, SoundFile,
from
emissions.utils
import
whatsonair
,
period_program
from
newsletter.forms
import
SubscribeForm
from
.
import
utils
...
...
@@ -428,6 +430,8 @@ class Home(TemplateView):
for
episode
in
context
[
'episodes'
]:
episode
.
main_sound
=
soundfiles
.
get
(
episode
.
id
)
context
[
'newsletter_form'
]
=
SubscribeForm
()
return
context
home
=
Home
.
as_view
()
...
...
panikweb_templates/templates/home.html
View file @
0d3d354d
...
...
@@ -14,6 +14,15 @@
<h2><a
href=
"{% url 'program' %}"
>
Cette semaine sur Panik
</a></h2>
{% weekview %}
</div>
<div
class=
"padded"
>
<form
method=
"post"
action=
"{% url 'newsletter-subscribe' %}"
class=
"big center"
id=
"subscribe-form"
>
<p>
Tous les lundis, l'actualité de la semaine de Panik :
</p>
{% csrf_token %}
{{ newsletter_form.as_table }}
<button>
M'inscrire
</button>
</form>
</div>
{% endblock %}
{% block related %}
<div
class=
"wrapper"
>
...
...
panikweb_templates/templates/newsletter/confirmation_email_body.txt
View file @
0d3d354d
Bla bla bla.
Token : {{ token }}
Confirmez l'abonnement en suivant ce lien :
http://www.radiopanik.org{% url 'newsletter-confirmation' token=token %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment