Minor fixes.

This commit is contained in:
Emanuel Schuetze 2012-04-14 19:14:51 +02:00
parent aea3b5803a
commit 09d2c3112d
3 changed files with 6 additions and 8 deletions

View File

@ -49,7 +49,7 @@
<h4>{% trans "Vote results" %}:</h4>
{% with application.polls as polls %}
{% if polls.exists %}
{% if not polls.exists %}
{% if perms.application.can_manage_application %}
{% if "genpoll" in actions %}
<a href='{% url application_gen_poll application.id %}'>

View File

@ -391,7 +391,7 @@ def view_poll(request, poll_id):
view a poll for this application.
"""
poll = ApplicationPoll.objects.get(pk=poll_id)
#ballot = poll.ballot
ballot = poll.ballot
options = poll.get_options()
if request.user.has_perm('application.can_manage_application'):
if request.method == 'POST':
@ -425,7 +425,7 @@ def view_poll(request, poll_id):
'poll': poll,
'form': form,
'options': options,
#'ballot': ballot,
'ballot': ballot,
}
@ -608,7 +608,6 @@ class ApplicationPDF(PDFView):
permission_required = 'application.can_manage_application'
filename = u'filename=%s.pdf;' % _("Applications")
top_space = 0
document_title = ''
def append_to_pdf(self, story):
try:

View File

@ -277,17 +277,16 @@ class AssignmentPollDelete(DeleteView):
super(AssignmentPollDelete, self).pre_post_redirect(request, *args, **kwargs)
def set_assignment(self):
self.assignment = self.object.assignment
self.assignment = self.object.assignment
def get_redirect_url(self, **kwargs):
return reverse('assignment_view', args=[self.assignment.id])
return reverse('assignment_view', args=[self.assignment.id])
class AssignmentPDF(PDFView):
permission_required = 'assignment.can_manage_assignment'
filename = u'filename=%s.pdf;' % _("Elections")
top_space = 0
document_title = None
def append_to_pdf(self, story):
try: