|
|
|
@ -11,17 +11,15 @@ class PostForm(forms.Form): |
|
|
|
style = forms.ChoiceField(label='Style',choices=STYLE_CHOICES, required=True) |
|
|
|
style = forms.ChoiceField(label='Style',choices=STYLE_CHOICES, required=True) |
|
|
|
|
|
|
|
|
|
|
|
title = forms.CharField(label='Title', max_length=200, required=False) |
|
|
|
title = forms.CharField(label='Title', max_length=200, required=False) |
|
|
|
body = forms.CharField(label='Optional text', max_length=10000, required=False) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
url = forms.CharField(label='URL', max_length=200, required=False) |
|
|
|
url = forms.CharField(label='URL', max_length=200, required=False) |
|
|
|
# date = forms.DateTimeField('date published') |
|
|
|
|
|
|
|
# state = forms.IntegerField(label='State', default=1) |
|
|
|
body = forms.CharField(label='Optional body', max_length=10000, required=False) |
|
|
|
|
|
|
|
|
|
|
|
today = datetime.today() # + datetime.timedelta(days=1) |
|
|
|
today = datetime.today() # + datetime.timedelta(days=1) |
|
|
|
today_formatted = today.strftime("%Y-%m-%d %H:%M:%S") |
|
|
|
today_formatted = today.strftime("%Y-%m-%d %H:%M:%S") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
image = forms.FileField(required=False) |
|
|
|
pub_date = forms.DateTimeField(label='Optional publication date, example: ' + today_formatted, required=False) |
|
|
|
pub_date = forms.DateTimeField(label='Optional publication date, example: ' + today_formatted, required=False) |
|
|
|
image = forms.FileField() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SigninForm(forms.Form): |
|
|
|
class SigninForm(forms.Form): |
|
|
|
username = forms.CharField(label='Enter Username', min_length=4, max_length=150) |
|
|
|
username = forms.CharField(label='Enter Username', min_length=4, max_length=150) |
|
|
|
|