Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
etch
nuages
Commits
63c3a6ab
Commit
63c3a6ab
authored
Jun 23, 2010
by
christophe siraut
Browse files
simplifications formulaires
parent
9aa4fd68
Changes
6
Hide whitespace changes
Inline
Side-by-side
locale/fr/LC_MESSAGES/django.mo
View file @
63c3a6ab
No preview for this file type
locale/fr/LC_MESSAGES/django.po
View file @
63c3a6ab
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-06-23
19:07
+0200\n"
"POT-Creation-Date: 2010-06-23
22:43
+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"
...
...
@@ -16,6 +16,10 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: sondage/models.py:44
msgid "your name"
msgstr "votre nom"
#: templates/base.html:7
msgid "Easy poll sharing"
msgstr "rendez-vous partagés"
...
...
@@ -93,8 +97,8 @@ msgid ""
"Provide possible dates for your meeting. You may add details as meeting "
"hours, places, or else."
msgstr ""
"Proposez quelques dates pour votre rendez-vous. Vous pouvez ajouter "
"
l'heure,
le lieu ou autre dans le champ \"détails\"."
"Proposez quelques dates pour votre rendez-vous. Vous pouvez ajouter
l'heure,
"
"le lieu ou autre dans le champ \"détails\"."
#: templates/sondage/poll_detail.html:9
msgid "Posted by"
...
...
@@ -112,7 +116,7 @@ msgstr "Adresse partagée"
msgid "Point colums to see choice details and comments"
msgstr "Pointez les colonnes pour faire apparaître les détails"
#: templates/sondage/poll_detail.html:8
9
#: templates/sondage/poll_detail.html:8
7
msgid ""
"Check the boxes for positive answers, you may provide a comment for each "
"choice"
...
...
sondage/forms.py
View file @
63c3a6ab
...
...
@@ -21,7 +21,6 @@ class BulletinForm(forms.ModelForm):
class
VoteForm
(
forms
.
ModelForm
):
comment
=
forms
.
CharField
(
required
=
False
,
max_length
=
80
,
widget
=
forms
.
TextInput
(
attrs
=
{
'class'
:
'comment'
}))
choice
=
forms
.
CharField
()
voter
=
forms
.
CharField
(
required
=
False
)
class
Meta
:
model
=
Vote
fields
=
(
'choice'
,
'voice'
,
'comment'
)
...
...
sondage/models.py
View file @
63c3a6ab
from
django.db
import
models
import
os
from
django.db
import
models
from
django.utils.translation
import
ugettext_lazy
as
_
from
binascii
import
hexlify
def
_createId
():
...
...
@@ -40,7 +41,7 @@ class NodateChoice(models.Model):
class
Bulletin
(
models
.
Model
):
poll
=
models
.
ForeignKey
(
Poll
,
editable
=
False
)
voter
=
models
.
CharField
(
""
,
max_length
=
40
)
voter
=
models
.
CharField
(
_
(
'Your name'
)
,
max_length
=
40
)
def
__unicode__
(
self
):
return
self
.
voter
...
...
sondage/views.py
View file @
63c3a6ab
...
...
@@ -234,7 +234,7 @@ def vote(request, poll_id):
except
:
pass
else
:
voter
=
'your name'
#
voter = 'your name'
error_message
=
"Login let you modify your vote anytime."
key
=
'has_voted-'
+
poll
.
id
if
request
.
session
.
get
(
key
,
False
):
...
...
@@ -255,7 +255,8 @@ def vote(request, poll_id):
except
:
pass
form
=
BulletinForm
(
instance
=
poll
,
initial
=
{
'voter'
:
voter
})
#form = BulletinForm(instance=poll,initial={'voter': voter})
form
=
BulletinForm
(
instance
=
poll
)
current_site
=
settings
.
SITE
+
poll
.
id
return
render_to_response
(
'sondage/poll_detail.html'
,
{
'object'
:
poll
,
'form'
:
form
,
'vforms'
:
vforms
,
'error_message'
:
error_message
,
'current_site'
:
current_site
},
context_instance
=
RequestContext
(
request
))
...
...
templates/sondage/poll_detail.html
View file @
63c3a6ab
...
...
@@ -58,9 +58,7 @@
<tr><td
class=
'names'
title=
"Fill in your name"
>
{{ form.management_form }}
{{ form.voter }}
{% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
{{ form.as_p }}
</td>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment