summaryrefslogtreecommitdiffstats
path: root/agenda/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'agenda/forms.py')
-rw-r--r--agenda/forms.py76
1 files changed, 76 insertions, 0 deletions
diff --git a/agenda/forms.py b/agenda/forms.py
new file mode 100644
index 0000000..c8cb280
--- /dev/null
+++ b/agenda/forms.py
@@ -0,0 +1,76 @@
+from django.db import models
+from django.conf import settings
+from infopoint.agenda import *
+from infopoint.agenda.models import *
+from infopoint.sites.models import Site
+import datetime
+from django.contrib.contenttypes import generic
+from django.contrib import databrowse
+from django.contrib.auth.models import User,Group
+from django.contrib.comments.models import Comment,ContentType,User
+from django import forms
+from django.forms import ModelForm,DateTimeInput
+from django.template.loader import render_to_string
+
+from django.contrib import admin
+
+# Create your models here.
+
+
+class EventForm(ModelForm):
+ class Meta:
+ model = Event
+
+class RedesForm(ModelForm):
+ class Meta:
+ model = Network
+
+class GroupAddEventForm(forms.Form):
+ group = forms.ModelMultipleChoiceField(queryset=Group.objects.all(),help_text='Send this event information to a group')
+
+class TodoForm(ModelForm):
+ class Meta:
+ model = Todo
+
+class TodoCompletedForm(forms.Form):
+ pass
+
+class TodoCreateForm(forms.Form):
+ """
+ Add the tasks that need to be done, even if you plan to do them yourself.
+ To have a list of things to be done will be great for sharing the information between the group
+ """
+ title = forms.CharField(max_length=100)
+ description = forms.CharField(max_length=300,required=False,widget=forms.TextInput(attrs={'size':'40'}))
+ due_date = forms.DateField(required=False,widget=forms.DateTimeInput)
+ public = forms.BooleanField(required=False)
+ group = forms.ModelMultipleChoiceField(queryset=Group.objects.all(), required=False,help_text='Is this task related to a group?')
+ event = forms.ModelMultipleChoiceField(queryset=Event.calendar.all(), required=False,help_text='Is this task related to an event?')
+ location = forms.ModelMultipleChoiceField(queryset=Location.places.all(), required=False,help_text='Is this task related to a locattion?')
+
+
+class TodoRelatedCreateForm(forms.Form):
+ """
+ Put here the tasks needed to be done before the event...
+ """
+ title = forms.CharField(max_length=100)
+ public = forms.BooleanField(required=False,help_text='Is this todo public?')
+ description = forms.CharField(max_length=300,required=False,widget=forms.TextInput(attrs={'size':'25'}))
+ due_date = forms.DateField(required=False,widget=forms.DateTimeInput)
+
+
+
+class AttendanceForm(ModelForm):
+ class Meta:
+ model = Attendance
+
+
+class ConfirmForm(ModelForm):
+ exclude = ['person', 'update', 'event']
+ class Meta:
+ model = Attendance
+
+
+
+
+