PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/counterpoint/forms/admin.py

http://counterpoint.googlecode.com/
Python | 31 lines | 19 code | 12 blank | 0 comment | 0 complexity | 4396010dc545275f9d3a6a52a19b6b9c MD5 | raw file
 1from counterpoint.models import ForumGroup, Forum
 2from django import forms
 3
 4
 5class ForumGroupForm(forms.ModelForm):
 6
 7    class Meta:
 8        model = ForumGroup
 9
10
11class ForumForm(forms.ModelForm):
12
13    class Meta:
14        model = Forum
15        exclude = ('parent_group', )
16
17
18class GroupOrderingForm(forms.ModelForm):
19    ordering = forms.IntegerField(widget=forms.HiddenInput())
20
21    class Meta:
22        model = ForumGroup
23        fields = ('ordering', )
24
25
26class ForumOrderingForm(forms.ModelForm):
27    ordering = forms.IntegerField(widget=forms.HiddenInput())
28
29    class Meta:
30        model = Forum
31        fields = ('ordering', )