TinyMCE
This commit is contained in:
parent
ff091dc3e7
commit
1484d6cc6d
1582 changed files with 46295 additions and 15 deletions
17
cms/forms.py
17
cms/forms.py
|
|
@ -4,18 +4,27 @@ Created on 17 nov. 2012
|
|||
|
||||
@author: alzo
|
||||
'''
|
||||
from .models import Processus, Module, Domaine, Competence, SousCompetence
|
||||
from .models import Processus, Module, Domaine, Competence, SousCompetence, Document
|
||||
from django import forms
|
||||
|
||||
from django.contrib import admin
|
||||
from _collections_abc import __all__
|
||||
#from django.forms import Textarea, TextInput
|
||||
|
||||
from tinymce.widgets import TinyMCE
|
||||
|
||||
class DocumentForm(forms.Form):
|
||||
docfile = forms.FileField(label='Selectionner un fichier', help_text='Taille max.: 42 megabytes')
|
||||
|
||||
|
||||
|
||||
class DocumentAdminForm(forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = Document
|
||||
fields = '__all__'
|
||||
widgets = {
|
||||
'texte': TinyMCE(attrs={'cols': 120, 'rows': 30}),
|
||||
}
|
||||
|
||||
|
||||
class ProcessusAdminForm(forms.ModelForm):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue