Guest User

Untitled

a guest
May 28th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. from django import forms
  2. from .models import User, Place, PlaceNote, PlacePhoto, PlaceComment
  3.  
  4. class NicknameChangeForm(forms.Form):
  5. username = forms.CharField(max_length=50,widget=forms.TextInput(attrs={'class':'form-control',}))
  6.  
  7. class PasswordChangeForm(forms.Form):
  8. old_pass = forms.CharField(widget=forms.PasswordInput(attrs={'class':'form-control',}))
  9. new_pass = forms.CharField(widget=forms.PasswordInput(attrs={'class':'form-control',}))
  10. new_pass1 = forms.CharField(widget=forms.PasswordInput(attrs={'class':'form-control',}))
  11.  
  12. class PrivacyChangeForm(forms.Form):
  13. accountVisible = forms.BooleanField(required=False)
  14.  
  15. class PlaceNameForm(forms.Form):
  16. place_name = forms.CharField(max_length=50)
  17.  
  18. class PlaceDescriptionForm(forms.Form):
  19. place_desc = forms.CharField(max_length=1000)
  20.  
  21. class PlaceNoteForm(forms.Form):
  22. place_note = forms.IntegerField()
  23.  
  24. class PlacePhotoForm(forms.Form):
  25. place_photo = forms.CharField(max_length=3000)
  26.  
  27. class PlaceCommentForm(forms.Form):
  28. place_comment = forms.CharField(max_length=1000)
  29.  
  30. class UserRegistrationForm(forms.Form):
  31. username = forms.CharField(
  32. required = True,
  33. label = 'Username',
  34. max_length = 32
  35. )
  36. email = forms.EmailField(
  37. required = True,
  38. label = 'Email',
  39. max_length = 32,
  40. )
  41. password = forms.CharField(
  42. required = True,
  43. label = 'Password',
  44. max_length = 32,
  45. widget = forms.PasswordInput()
  46. )
  47. password2 = forms.CharField(
  48. required = True,
  49. label = 'Password2',
  50. max_length = 32,
  51. widget = forms.PasswordInput()
  52. )
  53.  
  54. class AddPlaceForm(forms.Form):
  55. place_name = forms.CharField(max_length=50)
  56. place_desc = forms.CharField(max_length=50)
  57. place_photo = forms.URLField()
Add Comment
Please, Sign In to add comment