Skip to content
Extraits de code Groupes Projets

Comparer les révisions

Les modifications sont affichées comme si la révision source était fusionnée avec la révision cible. En savoir plus sur la comparaison des révisions.

Source

Sélectionner le projet cible
No results found

Cible

Sélectionner le projet cible
  • la-quadrature-du-net/memopol/memopol
  • lnclt/political_memory
  • arthur/political_memory
  • agrausem/political_memory
  • periode/memopol
  • Anthony/memopol
  • Porkepix/memopol
  • jaster/memopol
  • luxcem/memopol
  • TAlone/memopol
10 résultats
Afficher les modifications
- extends "base.html"
- block content
%h2= dossier.name
%h3= dossier.title
%p
<strong>{{ dossier.reference }}</strong>
%h3 Votes ({{dossier.proposals.count}})
- for proposal in dossier.proposals.all
%h4
{{ forloop.counter }}.
{{ proposal.recommendation.title }} -
{{ proposal.datetime }} -
{{ proposal.status }}
%p
{{ proposal.title }}
%small
{{ proposal.reference }}
{{ proposal.kind }}
{{ proposal.recommendation.description }}
%p
%h5
For : {{ proposal.total_for }}
%h5
Against : {{ proposal.total_against }}
%h5
Abstain : {{ proposal.total_abstain }}
%p
Participants : {{ proposal.representatives.count }}
- extends "base.html"
- block content
%h1 Dossiers
-# %p
Number of dossier: {{ object_count }}
%table.table
- for dossier in object_list
%tr
%td
%a{'href': "{% url 'votes:dossier-detail' pk=dossier.id %}"}
{{ dossier.name }}
%td= dossier.reference
%td= dossier.proposals.count
- include "core/blocks/pagination.html"
# Create your tests here.
# coding: utf-8
# This file is part of memopol.
#
# memopol is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or any later version.
#
# memopol is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Affero Public
# License along with django-representatives.
# If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2015 Arnaud Fabre <af@laquadrature.net>
from django.conf.urls import url
from . import views
urlpatterns = [
# Dossier detail by dossier pk
url(
r'^(?P<pk>\d+)$',
views.dossier_detail,
name='dossier-detail'
),
# List all dossiers by default
url(
r'',
views.dossier_index,
name='dossier-index'
),
]
# coding: utf-8
# This file is part of memopol.
#
# memopol is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or any later version.
#
# memopol is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Affero Public
# License along with django-representatives.
# If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2015 Arnaud Fabre <af@laquadrature.net>
from __future__ import absolute_import
from django.shortcuts import get_object_or_404, render
from core.utils import render_paginate_list
from .models import MemopolDossier
def dossier_index(request):
dossier_list = MemopolDossier.objects.all()
return render_paginate_list(
request,
dossier_list,
'votes/dossier_index.html'
)
def dossier_detail(request, pk):
dossier = get_object_or_404(MemopolDossier, pk=pk)
return render(
request,
'votes/dossier_detail.html',
{'dossier': dossier}
)