mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Election bdd + first view
This commit is contained in:
19
election/views.py
Normal file
19
election/views.py
Normal file
@ -0,0 +1,19 @@
|
||||
from django.shortcuts import render
|
||||
from django.views.generic import ListView, DetailView, RedirectView
|
||||
from django.views.generic.edit import UpdateView, CreateView, DeleteView, FormView
|
||||
from django.core.urlresolvers import reverse_lazy, reverse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.conf import settings
|
||||
|
||||
from core.views import CanViewMixin, CanEditMixin, CanEditPropMixin, CanCreateMixin
|
||||
from election.models import Election, Responsability, Candidate
|
||||
|
||||
# Display elections
|
||||
|
||||
|
||||
class ElectionsListView(CanViewMixin, ListView):
|
||||
"""
|
||||
A list with all responsabilities and their candidates
|
||||
"""
|
||||
model = Election
|
||||
template_name = 'election/election_list.jinja'
|
Reference in New Issue
Block a user