Created a mockup login and logout function and added login required as decorator for, among others, the settings page.
Authorized user names and passwords can be found in views.py in the function login_required (see the dictionary "valid_users"). This needs to be changed later when the authenticate functionality in the rest server is implemented.
1 parent b639699 commit 4a4e53a5c045d9b229fb789b6d5e1a1c728e1e83
@Anna Granudd Anna Granudd authored on 4 Aug 2010
Showing 7 changed files
View
19
forms.py
"start_chain", "subject_prefix", "subscribe_auto_approval",
"subscribe_policy", "topics", "topics_bodylines_limit",
"topics_enabled", "unsubscribe_policy"]]
 
class Login(FieldsetForm):
"""Form to let the user log in.
"""
address = forms.EmailField(
label = _('Email address'),
error_messages = {'required': _('Please enter an email address.'),
'invalid': _('Please enter a valid email address.')},
required = True,
)
password = forms.CharField(
label = _('Password'),
error_messages = {'required': _('Please enter your password.'),
'invalid': _('Please enter a valid password.')},
required = True,
)
 
class Meta:
layout = [["Login", "address", "password"],]
 
class ListMassSubscription(FieldsetForm):
"""Form fields to masssubscribe users to a list.
"""
emails = forms.CharField(
View
2
■■■
templates/mailman-django/lists/created.html
 
{% block content %}
 
<h1>{% trans "List Created" %}</h1>
 
<p id=logout><a href="{% url logout %}">Logout</a></p>
 
<p>The list <em>{{ fqdn_listname }}</em> has been created. What would you like to do next?</p>
 
<ul>
View
templates/mailman-django/lists/mass_subscribe.html
View
templates/mailman-django/lists/new.html
View
templates/mailman-django/lists/settings.html
View
urls.py
View
views.py