Commit 7a81d378 authored by Christophe Siraut's avatar Christophe Siraut

Modularize.

parent d3a69b31
......@@ -7,3 +7,5 @@ local_settings.py
local_urls.py
.coverage
htmlcov
nuages.egg-info
......@@ -5,9 +5,6 @@ clean:
find . -name "*~" -exec rm {} \;
find . -name ".svn" -exec rm -r {} \;
apps:
apps="meetingpoll registration_templates nuages_base"
update:
git pull --rebase
python manage.py syncdb --noinput
......@@ -33,3 +30,6 @@ test:
python-coverage run --source='.' manage.py test
python-coverage report
build:
python setup.py --command-packages=stdeb.command debianize
git-buildpackage -us -uc --git-upstream-tree=branch --git-upstream-branch=master
from meetingpoll.models import Poll, Choice, Bulletin, Vote
from django.contrib import admin
from .models import UserProfile, Poll, Choice, Bulletin, Vote
admin.site.register(UserProfile)
admin.site.register(Poll)
admin.site.register(Choice)
admin.site.register(Bulletin)
......
from django import forms
from models import Poll, Choice, Bulletin, Vote
from .models import UserProfile, Poll, Choice, Bulletin, Vote
from django.utils.translation import ugettext_lazy as _
from datetimewidget.widgets import DateTimeWidget
from datetime import datetime
dateTimeOptions = {
'weekStart': '1',
'startView': '3',
'minView': '1',
'startDate': datetime.today().date(),
'autoclose': 'true',
'todayHighlight': 'true'
}
class UserProfileForm(forms.ModelForm):
class Meta:
model = UserProfile
fields = ('email_notifications',)
class DateTimeWidgetFixed(DateTimeWidget):
def __init__(self, **kwargs):
super(DateTimeWidgetFixed, self).__init__(**kwargs)
def value_from_datadict(self, data, files, name):
return str(super(
DateTimeWidgetFixed, self).value_from_datadict(data, files, name))
class PollForm(forms.ModelForm):
title = forms.CharField(label=_('title'))
description = forms.CharField(widget=forms.Textarea, label=_('description'))
title = forms.CharField(label=_('Title'))
description = forms.CharField(
widget=forms.Textarea,
label=_('Description'))
class Meta:
model = Poll
fields = ('title','description')
fields = ('title', 'description')
class ChoiceForm(forms.ModelForm):
choice = forms.DateTimeField(
widget=forms.DateTimeInput(format='%d-%m-%Y %H:%M',
attrs={'class':'hasdatepicker','size':'18',}),
input_formats=['%d-%m-%Y %H:%M']
)
details = forms.CharField(
required=False,
max_length='200',
widget=forms.TextInput(attrs={'size':'32',})
widget=DateTimeWidgetFixed(
options=dateTimeOptions)
)
class Meta:
model = Choice
exclude = ('poll','votecount')
#widgets = {
# 'choice': DateTimeWidget(
# attrs={'id': '666'},
# options=dateTimeOptions)}
exclude = ('poll', 'votecount')
class BulletinForm(forms.ModelForm):
class Meta:
......
......@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-06-23 14:18+0200\n"
"POT-Creation-Date: 2013-07-15 12:00+0200\n"
"PO-Revision-Date: 2013-05-14 09:32+0200\n"
"Last-Translator: Joan <aseques@gmail.com>\n"
"Language-Team: Catalan <kde-i18n-ca@kde.org>\n"
......@@ -17,15 +17,15 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Lokalize 1.4\n"
#: forms.py:6
#: forms.py:27
msgid "title"
msgstr "titol"
#: forms.py:7
#: forms.py:30
msgid "description"
msgstr "descripció"
#: models.py:23
#: models.py:24
msgid "Title"
msgstr "Titol"
......@@ -37,49 +37,49 @@ msgstr ""
"No heu entrat per tant no podreu modificar la enquesta un cop creada ni "
"rebre notificacions."
#: views.py:81
#: views.py:59
msgid "There are some errors in the form you posted."
msgstr "Hi ha errors el formulari que heu enviat."
#: views.py:176
#: views.py:146
msgid "Your vote has been counted, thank you."
msgstr "El vostre vot s'ha comptat, gràcies."
#: views.py:178
#: views.py:148
msgid "Your vote has been updated, thank you."
msgstr "El vostre vot s'ha actualitzat, gràcies."
#: views.py:186 views.py:188
#: views.py:156 views.py:158
msgid "Did you forget to provide your name?"
msgstr "Heu oblidat de donar un nom?"
#: views.py:189
#: views.py:159
msgid "your name"
msgstr "El vostre nom"
#: views.py:204
#: views.py:174
msgid "You have voted."
msgstr "Heu votat"
#: views.py:221
#: views.py:191
msgid "Login let you modify your vote anytime."
msgstr "Entrar us permet modificar el vot sempre."
#: views.py:227
#: views.py:197
#, python-format
msgid "%s has voted and can still modify its vote."
msgstr ""
#: views.py:228 views.py:242
#: views.py:198 views.py:212
#, python-format
msgid "Not %s? Click Forget me."
msgstr ""
#: templates/meetingpoll/choice_form.html:107
#: templates/meetingpoll/choice_form.html:12
msgid "Step 2 : Manage choices"
msgstr "Pas 2 : Gestionar les opcions"
#: templates/meetingpoll/choice_form.html:108
#: templates/meetingpoll/choice_form.html:13
msgid ""
"Provide possible dates for your meeting. You may adjust the time and add "
"other details in the text field."
......@@ -87,76 +87,85 @@ msgstr ""
"Proposeu dates possibles per la trobada. Podeu ajustar la hora i afegir "
"d'altres detalls en el camp de text."
#: templates/meetingpoll/choice_form.html:120
#: templates/meetingpoll/choice_form.html:19
msgid "Dates"
msgstr "Dates"
#: templates/meetingpoll/choice_form.html:121
#: templates/meetingpoll/poll_detail.html:92
#: templates/meetingpoll/choice_form.html:20
#: templates/meetingpoll/poll_detail.html:90
msgid "Details"
msgstr "Detalls"
#: templates/meetingpoll/choice_form.html:147
#: templates/meetingpoll/choice_form.html:21
#, fuzzy
msgid "Delete"
msgstr "esborrar"
#: templates/meetingpoll/choice_form.html:38
msgid "Save and add another"
msgstr ""
#: templates/meetingpoll/choice_form.html:39
msgid "Save"
msgstr "Guardar"
#: templates/meetingpoll/poll_detail.html:7
#: templates/meetingpoll/poll_detail.html:8
msgid "Clear cookie, you will not be able to change your vote."
msgstr "Esborrar la cookie, no podreu canviar el vot."
#: templates/meetingpoll/poll_detail.html:7
#: templates/meetingpoll/poll_detail.html:8
msgid "Forget me"
msgstr "Oblida'm"
#: templates/meetingpoll/poll_detail.html:9
#: templates/meetingpoll/poll_detail.html:10
msgid "Export as csv spreadsheet"
msgstr "Exportar com a un full de càlcul csv"
#: templates/meetingpoll/poll_detail.html:9
#: templates/meetingpoll/poll_detail.html:10
msgid "Export"
msgstr ""
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "Posted by"
msgstr "Penjat per"
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "Anonymous"
msgstr "Anònim"
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "on"
msgstr "el"
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "Shared address"
msgstr "Adreça compartida"
#: templates/meetingpoll/poll_detail.html:58
#: templates/meetingpoll/poll_detail.html:56
msgid "Your name:"
msgstr "El vostre nom:"
#: templates/meetingpoll/poll_detail.html:65
#: templates/meetingpoll/poll_detail.html:63
msgid " Check the little boxes to add positive answers "
msgstr "Marque les caselles petites per afegir respostes positives"
#: templates/meetingpoll/poll_detail.html:80
#: templates/meetingpoll/poll_detail.html:78
msgid "Instructions"
msgstr "Instruccions"
#: templates/meetingpoll/poll_detail.html:83
#: templates/meetingpoll/poll_detail.html:81
msgid "Point columns to see choice details and comments"
msgstr "Apunteu a les columnes per veure els detalls i comentaris"
#: templates/meetingpoll/poll_detail.html:84
#: templates/meetingpoll/poll_detail.html:82
msgid "Check the boxes for positive answers. "
msgstr "Marqueu les caselles per confirmar."
#: templates/meetingpoll/poll_detail.html:84
#: templates/meetingpoll/poll_detail.html:82
msgid "You may provide a comment for each choice."
msgstr "Podeu fer un comentari per cada tria."
#: templates/meetingpoll/poll_detail.html:85
#: templates/meetingpoll/poll_detail.html:83
msgid "Vote"
msgstr "Votar"
......@@ -164,7 +173,7 @@ msgstr "Votar"
msgid "Step 1 : About your poll"
msgstr "Pas 1 :Sobre la vostra enquesta"
#: templates/meetingpoll/poll_form.html:9
#: templates/meetingpoll/poll_form.html:10
msgid "Enter basic information for your poll."
msgstr "Entreu informació bàsica de la vostra enquesta."
......@@ -248,9 +257,6 @@ msgstr "Següent"
#~ msgid "Are you sure you want to delete this poll?"
#~ msgstr "Esteu segur que voleu esborrar aquesta enquesta?"
#~ msgid "delete"
#~ msgstr "esborrar"
#~ msgid "No poll created yet."
#~ msgstr "No hi ha enquestes creades."
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-06-23 14:18+0200\n"
"POT-Creation-Date: 2013-07-15 12:00+0200\n"
"PO-Revision-Date: 2010-10-24 22:27+0100\n"
"Last-Translator: Christophe Siraut <chris@tobald.eu.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -16,15 +16,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:6
#: forms.py:27
msgid "title"
msgstr "titre"
#: forms.py:7
#: forms.py:30
msgid "description"
msgstr "description"
#: models.py:23
#: models.py:24
msgid "Title"
msgstr "Titre"
......@@ -36,49 +36,49 @@ msgstr ""
"Vous n'êtes pas authentifié et ne pourrez donc pas modifier le sondage après "
"sa création ou recevoir des notifications."
#: views.py:81
#: views.py:59
msgid "There are some errors in the form you posted."
msgstr "Il ya des erreurs dans le formulaire que vous avez posté."
#: views.py:176
#: views.py:146
msgid "Your vote has been counted, thank you."
msgstr "Votre vote a été compté, merci."
#: views.py:178
#: views.py:148
msgid "Your vote has been updated, thank you."
msgstr "Votre vote a été mis-à-jour, merci."
#: views.py:186 views.py:188
#: views.py:156 views.py:158
msgid "Did you forget to provide your name?"
msgstr "Auriez-vous oublié de renseigner votre nom?"
#: views.py:189
#: views.py:159
msgid "your name"
msgstr "votre nom:"
#: views.py:204
#: views.py:174
msgid "You have voted."
msgstr "Vous avez voté."
#: views.py:221
#: views.py:191
msgid "Login let you modify your vote anytime."
msgstr "S'authentifier permet de modifier le vote ulterieurement."
#: views.py:227
#: views.py:197
#, python-format
msgid "%s has voted and can still modify its vote."
msgstr "%s a voté et peut encore modifier son vote."
#: views.py:228 views.py:242
#: views.py:198 views.py:212
#, python-format
msgid "Not %s? Click Forget me."
msgstr "Vous n'êtes pas %s? Cliquez Oublie-moi."
#: templates/meetingpoll/choice_form.html:107
#: templates/meetingpoll/choice_form.html:12
msgid "Step 2 : Manage choices"
msgstr "Etape 2: Choisir les dates proposées"
#: templates/meetingpoll/choice_form.html:108
#: templates/meetingpoll/choice_form.html:13
msgid ""
"Provide possible dates for your meeting. You may adjust the time and add "
"other details in the text field."
......@@ -86,76 +86,85 @@ msgstr ""
"Proposez quelques dates pour votre rendez-vous. Vous pouvez ajuster l'heure "
"et ajouter d'autres détails dans le champ texte."
#: templates/meetingpoll/choice_form.html:120
#: templates/meetingpoll/choice_form.html:19
msgid "Dates"
msgstr ""
#: templates/meetingpoll/choice_form.html:121
#: templates/meetingpoll/poll_detail.html:92
#: templates/meetingpoll/choice_form.html:20
#: templates/meetingpoll/poll_detail.html:90
msgid "Details"
msgstr "Détails"
#: templates/meetingpoll/choice_form.html:147
#: templates/meetingpoll/choice_form.html:21
#, fuzzy
msgid "Delete"
msgstr "supprimer"
#: templates/meetingpoll/choice_form.html:38
msgid "Save and add another"
msgstr ""
#: templates/meetingpoll/choice_form.html:39
msgid "Save"
msgstr "Sauver"
#: templates/meetingpoll/poll_detail.html:7
#: templates/meetingpoll/poll_detail.html:8
msgid "Clear cookie, you will not be able to change your vote."
msgstr "Éffacer le cookie, vous ne pourrez plus modifier votre vote."
#: templates/meetingpoll/poll_detail.html:7
#: templates/meetingpoll/poll_detail.html:8
msgid "Forget me"
msgstr "Oublie-moi"
#: templates/meetingpoll/poll_detail.html:9
#: templates/meetingpoll/poll_detail.html:10
msgid "Export as csv spreadsheet"
msgstr "Exporter vers un tableau csv"
#: templates/meetingpoll/poll_detail.html:9
#: templates/meetingpoll/poll_detail.html:10
msgid "Export"
msgstr "Exporter"
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "Posted by"
msgstr "Posté par"
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "Anonymous"
msgstr "Anonyme"
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "on"
msgstr "le"
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "Shared address"
msgstr "Adresse partagée"
#: templates/meetingpoll/poll_detail.html:58
#: templates/meetingpoll/poll_detail.html:56
msgid "Your name:"
msgstr "Votre nom:"
#: templates/meetingpoll/poll_detail.html:65
#: templates/meetingpoll/poll_detail.html:63
msgid " Check the little boxes to add positive answers "
msgstr "Cochez les boîtes pour des réponses positives "
#: templates/meetingpoll/poll_detail.html:80
#: templates/meetingpoll/poll_detail.html:78
msgid "Instructions"
msgstr ""
#: templates/meetingpoll/poll_detail.html:83
#: templates/meetingpoll/poll_detail.html:81
msgid "Point columns to see choice details and comments"
msgstr "Pointez les colonnes pour faire apparaître les détails"
#: templates/meetingpoll/poll_detail.html:84
#: templates/meetingpoll/poll_detail.html:82
msgid "Check the boxes for positive answers. "
msgstr "Cochez les boîtes pour des réponses positives."
#: templates/meetingpoll/poll_detail.html:84
#: templates/meetingpoll/poll_detail.html:82
msgid "You may provide a comment for each choice."
msgstr "Vous pouvez ajouter un commentaire pour chaque choix."
#: templates/meetingpoll/poll_detail.html:85
#: templates/meetingpoll/poll_detail.html:83
msgid "Vote"
msgstr "Vote"
......@@ -163,7 +172,7 @@ msgstr "Vote"
msgid "Step 1 : About your poll"
msgstr "Étape 1 : À propos de votre sondage:"
#: templates/meetingpoll/poll_form.html:9
#: templates/meetingpoll/poll_form.html:10
msgid "Enter basic information for your poll."
msgstr ""
"Veuillez fournir les informations de base suivantes pour votre sondage. "
......@@ -243,9 +252,6 @@ msgstr "Suivant"
#~ msgid "Are you sure you want to delete this poll?"
#~ msgstr "Êtes-vous sûre de vouloir supprimer ce sondage?"
#~ msgid "delete"
#~ msgstr "supprimer"
#~ msgid "No poll created yet."
#~ msgstr "Aucun sondage créé jusqu'à présent."
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-06-23 14:18+0200\n"
"POT-Creation-Date: 2013-07-15 12:00+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -17,15 +17,15 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: forms.py:6
#: forms.py:27
msgid "title"
msgstr "titel"
#: forms.py:7
#: forms.py:30
msgid "description"
msgstr ""
#: models.py:23
#: models.py:24
msgid "Title"
msgstr "Titel"
......@@ -40,126 +40,135 @@ msgstr ""
"login / \"> login </ a> of <a href=\"/user/registration/\"> registreer </ a> "
"eerste) "
#: views.py:81
#: views.py:59
msgid "There are some errors in the form you posted."
msgstr ""
#: views.py:176
#: views.py:146
msgid "Your vote has been counted, thank you."
msgstr ""
#: views.py:178
#: views.py:148
msgid "Your vote has been updated, thank you."
msgstr ""
#: views.py:186 views.py:188
#: views.py:156 views.py:158
msgid "Did you forget to provide your name?"
msgstr ""
#: views.py:189
#: views.py:159
#, fuzzy
msgid "your name"
msgstr "Uw naam:"
#: views.py:204
#: views.py:174
msgid "You have voted."
msgstr ""
#: views.py:221
#: views.py:191
msgid "Login let you modify your vote anytime."
msgstr ""
#: views.py:227
#: views.py:197
#, python-format
msgid "%s has voted and can still modify its vote."
msgstr ""
#: views.py:228 views.py:242
#: views.py:198 views.py:212
#, python-format
msgid "Not %s? Click Forget me."
msgstr ""
#: templates/meetingpoll/choice_form.html:107
#: templates/meetingpoll/choice_form.html:12
msgid "Step 2 : Manage choices"
msgstr "Stap 2 : Beheer keuses"
#: templates/meetingpoll/choice_form.html:108
#: templates/meetingpoll/choice_form.html:13
msgid ""
"Provide possible dates for your meeting. You may adjust the time and add "
"other details in the text field."
msgstr ""
#: templates/meetingpoll/choice_form.html:120
#: templates/meetingpoll/choice_form.html:19
msgid "Dates"
msgstr ""
#: templates/meetingpoll/choice_form.html:121
#: templates/meetingpoll/poll_detail.html:92
#: templates/meetingpoll/choice_form.html:20
#: templates/meetingpoll/poll_detail.html:90
msgid "Details"
msgstr ""
#: templates/meetingpoll/choice_form.html:147
#: templates/meetingpoll/choice_form.html:21
#, fuzzy
msgid "Delete"
msgstr "verwijderen"
#: templates/meetingpoll/choice_form.html:38
msgid "Save and add another"
msgstr ""
#: templates/meetingpoll/choice_form.html:39
msgid "Save"
msgstr "Opslaan"
#: templates/meetingpoll/poll_detail.html:7
#: templates/meetingpoll/poll_detail.html:8
msgid "Clear cookie, you will not be able to change your vote."
msgstr ""
#: templates/meetingpoll/poll_detail.html:7
#: templates/meetingpoll/poll_detail.html:8
msgid "Forget me"
msgstr "Vergeet mij"
#: templates/meetingpoll/poll_detail.html:9
#: templates/meetingpoll/poll_detail.html:10
msgid "Export as csv spreadsheet"
msgstr "Export als cvs spreadsheet"
#: templates/meetingpoll/poll_detail.html:9
#: templates/meetingpoll/poll_detail.html:10
msgid "Export"
msgstr ""
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "Posted by"
msgstr "Gepost door"
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "Anonymous"
msgstr ""
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "on"
msgstr "op"
#: templates/meetingpoll/poll_detail.html:17
#: templates/meetingpoll/poll_detail.html:19
msgid "Shared address"
msgstr "Gedeelde adres"
#: templates/meetingpoll/poll_detail.html:58
#: templates/meetingpoll/poll_detail.html:56
msgid "Your name:"
msgstr "Uw naam:"
#: templates/meetingpoll/poll_detail.html:65
#: templates/meetingpoll/poll_detail.html:63
msgid " Check the little boxes to add positive answers "
msgstr " Check de kleine vakjes om positieve antwoorden toe te voegen"