Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Robert Myers
committed
Jul 14, 2012
1 parent
5e4defe
commit 2c88801
Showing
4 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
from django import forms | ||
from django.template.defaultfilters import escape | ||
|
||
class MessageForm(forms.Form): | ||
|
||
username = forms.CharField(required=True) | ||
picture_url = forms.URLField(required=True) | ||
message = forms.CharField(required=True) | ||
commit_hash = forms.CharField() | ||
url = forms.URLField() | ||
project = forms.URLField() | ||
|
||
def clean_username(self): | ||
data = self.cleaned_data.get('username') | ||
return escape(data) | ||
|
||
def clean_message(self): | ||
data = self.cleaned_data.get('message') | ||
return escape(data) | ||
|
||
def clean_commit_hash(self): | ||
data = self.cleaned_data.get('commit_hash') | ||
return escape(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters