Skip to content

Commit

Permalink
Minor changes and updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
dlareau committed Jan 20, 2018
1 parent 05d78cf commit 48854d0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@ New:
- Teams can now update their own location from the registration page
- Automatic submission responses now support markdown style links
- Progress page now has a button to unlock a specific puzzle for all teams
- New 404 and 500 error pages to match website's style

Updates:
- Removed unlockables tab from hunt header due to disuse
- Progress and Queue page now have sleeker more compact look
- Hunt info page now pulls max team size from database
- "Contact us" page now has more contact info
- Unused /staff URLs will now route to /admin URLs

Bugfixes:
- Fixed bug where team names could be made entirely of whitespace characters
- Removed dummy teams from all normal hunt interactions
- Fixed bug where parts of old hunt headers lead to the current hunt pages
- Fixed bug where staff announcements triggered new message alert for other staff members.
- Fixed bug in 3.0.3 relating to the use of "is not None" in info_views

v3.0.3
======
Expand Down
12 changes: 10 additions & 2 deletions huntserver/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, *args, **kwargs):
self.fields['email'].required = True
self.fields['first_name'].required = True
self.fields['last_name'].required = True
self.fields['password'].widget=forms.PasswordInput()
self.fields['password'].widget = forms.PasswordInput()

required_css_class = 'required'
confirm_password = forms.CharField(label='Confirm Password', widget=forms.PasswordInput())
Expand All @@ -59,7 +59,7 @@ def clean_confirm_password(self):
raise forms.ValidationError(u'Passwords must match')

class Meta:
model = User
model = User
fields = ['first_name', 'last_name', 'email', 'username', 'password']
help_texts = {
'username': "Required. 30 characters or fewer. Letters, digits and '-' or '_' only.",
Expand All @@ -79,6 +79,14 @@ def clean_username(self):
else:
return self.cleaned_data['username']

def clean_email(self):
email = self.cleaned_data.get('email')
username = self.cleaned_data.get('username')
if email and User.objects.filter(email=email).exclude(username=username).exists():
raise forms.ValidationError(u'Someone is already using that email address.')
return email


class Meta:
model = User
fields = ['first_name', 'last_name', 'username', 'email']
Expand Down
14 changes: 0 additions & 14 deletions huntserver/templates/user_profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@
{% block content %}
<div class="container">
<h2>Change User Details</h2>
{% if user_form.subject.errors %}
<ol>
{% for error in user_form.subject.errors %}
<li><strong>{{ error|escape }}</strong></li>
{% endfor %}
</ol>
{% endif %}
{% if person_form.subject.errors %}
<ol>
{% for error in person_form.subject.errors %}
<li><strong>{{ error|escape }}</strong></li>
{% endfor %}
</ol>
{% endif %}
<form method="POST">
{% csrf_token %}
<div>
Expand Down

0 comments on commit 48854d0

Please sign in to comment.