Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nuages
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etch
nuages
Commits
bc1dd3fa
Commit
bc1dd3fa
authored
Jun 23, 2010
by
christophe siraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplifications formulaires
parent
12067fa3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
12 deletions
+15
-12
locale/fr/LC_MESSAGES/django.mo
locale/fr/LC_MESSAGES/django.mo
+0
-0
locale/fr/LC_MESSAGES/django.po
locale/fr/LC_MESSAGES/django.po
+8
-4
nuage.sqlite
nuage.sqlite
+0
-0
sondage/forms.py
sondage/forms.py
+0
-1
sondage/models.py
sondage/models.py
+3
-2
sondage/views.py
sondage/views.py
+3
-2
templates/sondage/poll_detail.html
templates/sondage/poll_detail.html
+1
-3
No files found.
locale/fr/LC_MESSAGES/django.mo
View file @
bc1dd3fa
No preview for this file type
locale/fr/LC_MESSAGES/django.po
View file @
bc1dd3fa
...
...
@@ -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, l
e 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"
...
...
nuage.sqlite
View file @
bc1dd3fa
No preview for this file type
sondage/forms.py
View file @
bc1dd3fa
...
...
@@ -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 @
bc1dd3fa
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 @
bc1dd3fa
...
...
@@ -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 @
bc1dd3fa
...
...
@@ -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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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