First Commit
This commit is contained in:
commit
ce0758fbbb
496 changed files with 52062 additions and 0 deletions
26
forum/forms.py
Executable file
26
forum/forms.py
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
from django import forms
|
||||
|
||||
class CreateTopic(forms.Form):
|
||||
TOPIC_TYPE_CHOICES = (
|
||||
('normal', 'Normal'),
|
||||
('announce', 'Annonce'),
|
||||
)
|
||||
title = forms.CharField(
|
||||
max_length=150,
|
||||
label='',
|
||||
widget=forms.TextInput(attrs={'placeholder': 'Titre du sujet'})
|
||||
)
|
||||
content = forms.CharField(
|
||||
label='',
|
||||
widget=forms.Textarea(attrs={'placeholder': 'Contenu du sujet'})
|
||||
)
|
||||
type = forms.ChoiceField(choices=TOPIC_TYPE_CHOICES, label='Type de sujet')
|
||||
|
||||
class CreatePost(forms.Form):
|
||||
content = forms.CharField(
|
||||
label='',
|
||||
widget=forms.Textarea(attrs={'placeholder': 'Contenu du message'})
|
||||
)
|
||||
|
||||
class EditPost(forms.Form):
|
||||
content = forms.CharField(widget=forms.Textarea, label="Message")
|
||||
Loading…
Add table
Add a link
Reference in a new issue