Permalink
Browse files

Merge branch 'master' of heroku.com:djangosnippets

  • Loading branch information...
2 parents 514d531 + 4cc0bfe commit 8e44991bd1d6070f2bdf46fdd9e8f2714b8a46ed @jezdez jezdez committed Jul 31, 2012
Showing with 8 additions and 6 deletions.
  1. +5 −3 cab/comments/forms.py
  2. +2 −2 cab/forms.py
  3. +1 −1 djangosnippets/templates/registration/registration_form.html
View
8 cab/comments/forms.py
@@ -3,10 +3,12 @@
class CapCommentForm(CommentForm):
- name = forms.CharField(label='Your Name', required=False,
+ pass
+
+ your_name = forms.CharField(label='Your Name', required=False,
widget=forms.TextInput(attrs={'autocomplete': 'off'}))
def clean(self):
- if self.cleaned_data.get('name'):
+ if self.cleaned_data.get('your_name'):
raise forms.ValidationError('Please keep the Name field blank')
- return self.cleaned_data
+ return self.cleaned_data
View
4 cab/forms.py
@@ -54,10 +54,10 @@ def search(self):
class RegisterForm(RegistrationFormUniqueEmail):
- name = forms.CharField(label='Your Name', required=False,
+ your_name = forms.CharField(label='Your Name', required=False,
widget=forms.TextInput(attrs={'autocomplete': 'off'}))
def clean(self):
- if self.cleaned_data.get('name'):
+ if self.cleaned_data.get('your_name'):
raise forms.ValidationError('Please keep the Name field blank')
return self.cleaned_data
View
2 djangosnippets/templates/registration/registration_form.html
@@ -15,7 +15,7 @@
{{ field }}
{% else %}
{% if field.errors %}{{ field.errors }}{% endif %}
- <tr {% ifequal field.name "name" %} class="bee-like-this"{% endifequal %}>
+ <tr {% ifequal field.name "your_name" %} class="bee-like-this"{% endifequal %}>
<td{% if field.errors %} class="error"{% endif %}>
{{ field.label_tag }}
</td>

0 comments on commit 8e44991

Please sign in to comment.