Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRui Barbosa
19,432 PointsProblem in Custom Field Validation Challenge Task
So i came across with a problem at the last step of Task but i can't identify where is the error!
Can someone review the code for me and tell me where's the mistakeplease?
Thank you guys!
from django import forms
class LeadShareForm(forms.Form):
email = forms.EmailField()
link = forms.URLField()
honeypot = forms.CharField(widget=forms.HiddenInput, required=False)
def clean_honeypot(self):
honeypot = self.cleaned_data['honeypot']
if len(honeypot):
raise forms.ValidationError('Error')
return honeypot
1 Answer
Chris Freeman
Treehouse Moderator 68,457 PointsYou are SO close. The clean_honeypot
method is indented too far. Fixing this passes the challenge.
Post back if you need more help. Good Luck!!
Rui Barbosa
19,432 PointsRui Barbosa
19,432 PointsOh, don't know how i missed that!
Thank you very much!!