remove Application.poll. projector slide

This commit is contained in:
Oskar Hahn 2012-04-15 11:39:38 +02:00
parent 5678d9dd5e
commit bf5ae10552
3 changed files with 1 additions and 21 deletions

View File

@ -73,7 +73,6 @@
{% if poll.has_vote %}</a>{% endif %} {% if poll.has_vote %}</a>{% endif %}
<a href="{% url application_poll_delete poll.id %}"><img src="{% static 'images/icons/edit-delete.png' %}" title="{% trans 'Delete Vote' %}"></a> <a href="{% url application_poll_delete poll.id %}"><img src="{% static 'images/icons/edit-delete.png' %}" title="{% trans 'Delete Vote' %}"></a>
{% endif %} {% endif %}
<a href="{% url application_poll_activate poll.id %}">{% trans 'project' %}</a>
<br> <br>
{% if poll.has_votes %} {% if poll.has_votes %}
{% with poll.get_options.0 as option %} {% with poll.get_options.0 as option %}

View File

@ -13,7 +13,7 @@
from django.conf.urls.defaults import * from django.conf.urls.defaults import *
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from application.views import ViewPoll, ActivatePoll, ApplicationPDF, ApplicationPollPDF from application.views import ViewPoll, ApplicationPDF, ApplicationPollPDF
urlpatterns = patterns('application.views', urlpatterns = patterns('application.views',
url(r'^$', url(r'^$',
@ -127,11 +127,6 @@ urlpatterns = patterns('application.views',
name='application_poll_view', name='application_poll_view',
), ),
url(r'^poll/(?P<poll_id>\d+)/activate/$',
ActivatePoll.as_view(),
name='application_poll_activate',
),
url(r'^poll/(?P<poll_id>\d+)/del/$', url(r'^poll/(?P<poll_id>\d+)/del/$',
'delete_poll', 'delete_poll',
name='application_poll_delete', name='application_poll_delete',

View File

@ -445,20 +445,6 @@ class ViewPoll(PollFormView):
return '' return ''
class ActivatePoll(RedirectView):
permanent = False
def get_redirect_url(self, **kwargs):
poll = ApplicationPoll.objects.get(pk=self.kwargs['poll_id'])
application = poll.get_application()
return reverse('application_view', args=[application.id])
def get(self, request, *args, **kwargs):
self.poll = ApplicationPoll.objects.get(pk=self.kwargs['poll_id'])
self.poll.set_active()
return super(ActivatePoll, self).get(request, *args, **kwargs)
@permission_required('application.can_manage_application') @permission_required('application.can_manage_application')
def permit_version(request, aversion_id): def permit_version(request, aversion_id):
aversion = AVersion.objects.get(pk=aversion_id) aversion = AVersion.objects.get(pk=aversion_id)