forked from Fantomas42/django-blog-zinnia
-
Notifications
You must be signed in to change notification settings - Fork 11
/
forms.py
73 lines (49 loc) · 2.12 KB
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
from gstudio.models import *
from django.forms import ModelForm
from django.contrib.admin import widgets
class MetatypeForm(ModelForm):
class Meta:
model = Metatype
fields = ('title', 'altnames','plural','parent','slug','creation_date','last_update','description','parent')
class ObjecttypeForm(ModelForm):
class Meta:
model = Objecttype
fields = ('title', 'altnames','plural','parent','slug','metatypes','tags',
'status','content','prior_nodes','posterior_nodes','password','login_required','sites')
class AttributetypeForm(ModelForm):
class Meta:
model = Attributetype
fields =('title','altnames','subjecttype','applicable_nodetypes','dataType',
'slug','status','content','prior_nodes','posterior_nodes','password','login_required','sites')
class RelationtypeForm(ModelForm):
class Meta:
model = Relationtype
fields =('title','altnames','slug','inverse','left_subjecttype','left_applicable_nodetypes','right_subjecttype', 'right_applicable_nodetypes','content','prior_nodes','posterior_nodes','sites')
class SystemtypeForm(ModelForm):
class Meta:
model =Systemtype
fields =('title','altnames','content','parent','slug','status','nodetype_set','relationtype_set','attributetype_set','metatype_set','processtype_set',
'prior_nodes','posterior_nodes','sites')
class ProcesstypeForm(ModelForm):
class Meta:
model =Processtype
fields =('title','altnames','content','parent','slug','status','changing_attributetype_set','changing_relationtype_set','prior_nodes','posterior_nodes','sites')
class RelationForm(ModelForm):
class Meta:
model = Relation
class AttributeForm(ModelForm):
def __init__(self, *args, **kwargs):
super(AttributeForm, self).__init__(*args, **kwargs)
self.fields['last_update'].widget = widgets.AdminSplitDateTime()
self.fields['creation_date'].widget = widgets.AdminSplitDateTime()
class Meta:
model = Attribute
class ComplementForm(ModelForm):
class Meta:
model = Complement
class UnionForm(ModelForm):
class Meta:
model = Union
class IntersectionForm(ModelForm):
class Meta:
model = Intersection