Files
@ a8710b4b9f2a
Branch filter:
Location: website/www/conservancy/apps/contacts/views.py - annotation
a8710b4b9f2a
778 B
text/x-python
Copyleft Compliance: mostly minor fixes to new pgs
These are mostly minor edits (typo fixes, etc.) to the enforcement
strategy and firmware liberation pages that were just added.
The one large change was to replace the first paragraph of the
enforcement strategy page with the full Conservancy description used
previously. The glue text used to shorten it appeared unsalvageable
and it wasn't immediately obvious how to replace it with something
better, so we used the full description instead.
These are mostly minor edits (typo fixes, etc.) to the enforcement
strategy and firmware liberation pages that were just added.
The one large change was to replace the first paragraph of the
enforcement strategy page with the full Conservancy description used
previously. The glue text used to shorten it appeared unsalvageable
and it wasn't immediately obvious how to replace it with something
better, so we used the full description instead.
66dbfac066b0 8e6ea8ad71bf 71834b60ec53 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf f7e45da6ddc8 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf 66dbfac066b0 8e6ea8ad71bf 8e6ea8ad71bf 8e6ea8ad71bf 66dbfac066b0 | from django.shortcuts import render
from django import forms
from conservancy.apps.contacts.models import ContactEntry
from django.forms import ModelForm
def subscribe(request):
"""Mailing list subscription form
"""
class ContactEntryForm(ModelForm):
class Meta:
model = ContactEntry
ContactEntryForm.base_fields['subscribe_conservancy'].label = 'Receive Software Freedom Conservancy updates'
if request.method == 'POST':
form = ContactEntryForm(request.POST)
if form.is_valid():
form.save()
return render(request, 'contacts/subscribe_success.html', {'form': form.cleaned_data})
else:
form = ContactEntryForm()
return render(request, 'contacts/subscribe.html', {'form': form})
|