From 0502a6148582a88eb26d40489aed28442714eb00 Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Fri, 2 Sep 2016 15:45:50 -0500 Subject: [PATCH 01/59] added legislatura field to models --- proyectos_de_ley/pdl/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/proyectos_de_ley/pdl/models.py b/proyectos_de_ley/pdl/models.py index c27840d..8ec8b52 100644 --- a/proyectos_de_ley/pdl/models.py +++ b/proyectos_de_ley/pdl/models.py @@ -6,6 +6,7 @@ # Create your models here. class Proyecto(models.Model): codigo = models.CharField(max_length=20) + legislatura = models.IntegerField(max_length=4) # e.g. 2011, 2016 numero_proyecto = models.CharField(max_length=50) short_url = models.CharField(max_length=20) congresistas = models.TextField(blank=True) From 64c2f0754f15ed3659669e32ca900a180a1a98d5 Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Fri, 2 Sep 2016 15:50:56 -0500 Subject: [PATCH 02/59] migrations --- .../migrations/0002_proyecto_legislatura.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 proyectos_de_ley/pdl/migrations/0002_proyecto_legislatura.py diff --git a/proyectos_de_ley/pdl/migrations/0002_proyecto_legislatura.py b/proyectos_de_ley/pdl/migrations/0002_proyecto_legislatura.py new file mode 100644 index 0000000..f73ae07 --- /dev/null +++ b/proyectos_de_ley/pdl/migrations/0002_proyecto_legislatura.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2016-09-02 20:49 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pdl', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='proyecto', + name='legislatura', + field=models.IntegerField(default=2011, max_length=4), + preserve_default=False, + ), + ] From 6fb639e8f830cdd52bd564afe184bfa0d6f80796 Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Fri, 2 Sep 2016 23:56:47 -0500 Subject: [PATCH 03/59] sort projects by legislatura --- proyectos_de_ley/pdl/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proyectos_de_ley/pdl/views.py b/proyectos_de_ley/pdl/views.py index 6244e82..38a94e8 100644 --- a/proyectos_de_ley/pdl/views.py +++ b/proyectos_de_ley/pdl/views.py @@ -14,7 +14,7 @@ def index(request): - all_items = Proyecto.objects.all().order_by('-codigo') + all_items = Proyecto.objects.all().order_by('-legislatura', '-codigo') obj = do_pagination(request, all_items) # sin fusionar From 15bd353d57a6db1efb6a1a69118f0951aad178fc Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Sat, 3 Sep 2016 10:38:59 -0500 Subject: [PATCH 04/59] removed max length from integer field in model --- .../pdl/migrations/0003_auto_20160903_1537.py | 20 +++++++++++++++++++ proyectos_de_ley/pdl/models.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 proyectos_de_ley/pdl/migrations/0003_auto_20160903_1537.py diff --git a/proyectos_de_ley/pdl/migrations/0003_auto_20160903_1537.py b/proyectos_de_ley/pdl/migrations/0003_auto_20160903_1537.py new file mode 100644 index 0000000..6fd80a2 --- /dev/null +++ b/proyectos_de_ley/pdl/migrations/0003_auto_20160903_1537.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2016-09-03 15:37 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pdl', '0002_proyecto_legislatura'), + ] + + operations = [ + migrations.AlterField( + model_name='proyecto', + name='legislatura', + field=models.IntegerField(), + ), + ] diff --git a/proyectos_de_ley/pdl/models.py b/proyectos_de_ley/pdl/models.py index 8ec8b52..659ff1b 100644 --- a/proyectos_de_ley/pdl/models.py +++ b/proyectos_de_ley/pdl/models.py @@ -6,7 +6,7 @@ # Create your models here. class Proyecto(models.Model): codigo = models.CharField(max_length=20) - legislatura = models.IntegerField(max_length=4) # e.g. 2011, 2016 + legislatura = models.IntegerField() # e.g. 2011, 2016 numero_proyecto = models.CharField(max_length=50) short_url = models.CharField(max_length=20) congresistas = models.TextField(blank=True) From ed90feaa4ec40d3b59f3b223b099cbe8cb468520 Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Sat, 3 Sep 2016 10:41:48 -0500 Subject: [PATCH 05/59] updated front page --- proyectos_de_ley/pdl/templates/pdl/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proyectos_de_ley/pdl/templates/pdl/index.html b/proyectos_de_ley/pdl/templates/pdl/index.html index 6405724..a7f5e4a 100644 --- a/proyectos_de_ley/pdl/templates/pdl/index.html +++ b/proyectos_de_ley/pdl/templates/pdl/index.html @@ -10,7 +10,7 @@

Proyectos recientes

-

(Legislatura 2011—2016)

+

(Legislatura 2016—2021)

{% endif %} - {% if item.iniciativas_agrupadas|length > 1 %} + {% if item.iniciativas_agrupadas|length > 0 %}
Iniciativas agrupadas diff --git a/proyectos_de_ley/seguimientos/views.py b/proyectos_de_ley/seguimientos/views.py index 5c82905..e10890e 100644 --- a/proyectos_de_ley/seguimientos/views.py +++ b/proyectos_de_ley/seguimientos/views.py @@ -11,9 +11,10 @@ def index(request, short_url): short_url = re.sub("/seguimiento/", "", short_url) item = utils.get_proyecto_from_short_url(short_url) item.expediente_events = utils.get_events_from_expediente(item.id) - - # TODO: arreglar esto para cuanto tengamos proyectos de la legislatura 2016 - friendly_code = str(item.codigo) + '-2011' + friendly_code = "{}-{}".format( + item.codigo, + item.legislatura, + ) return render(request, "seguimientos/index.html", { "item": item, From e1e8fe3536fc9390d8ba20d8570e6902542984c4 Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Sun, 4 Sep 2016 14:37:07 -0500 Subject: [PATCH 24/59] simple search: show only recent legislature --- proyectos_de_ley/pdl/search_indexes.py | 13 ++++- .../pdl/templates/pdl/listado.html | 44 ++++++++++++++++ .../pdl/templates/pdl/search.html | 16 +++++- .../search/indexes/pdl/proyecto_text.txt | 1 + proyectos_de_ley/pdl/urls.py | 8 ++- proyectos_de_ley/pdl/views.py | 50 ++++++++++++++++--- 6 files changed, 121 insertions(+), 11 deletions(-) create mode 100644 proyectos_de_ley/pdl/templates/pdl/listado.html diff --git a/proyectos_de_ley/pdl/search_indexes.py b/proyectos_de_ley/pdl/search_indexes.py index 391ec09..10e510e 100644 --- a/proyectos_de_ley/pdl/search_indexes.py +++ b/proyectos_de_ley/pdl/search_indexes.py @@ -7,6 +7,7 @@ class ProyectoIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) codigo = indexes.CharField(model_attr='codigo', null=True) + legislatura = indexes.CharField(model_attr='legislatura', null=True) numero_proyecto = indexes.CharField(model_attr='numero_proyecto', null=True) short_url = indexes.CharField(model_attr='short_url', null=True) congresistas = indexes.EdgeNgramField(model_attr='congresistas', null=True) @@ -18,8 +19,16 @@ def get_model(self): return Proyecto def prepare_text(self, obj): - fields = [obj.codigo, obj.numero_proyecto, obj.short_url, obj.congresistas, - obj.titulo, obj.titulo_de_ley, obj.numero_de_ley] + fields = [ + obj.codigo, + str(obj.legislatura), + obj.numero_proyecto, + obj.short_url, + obj.congresistas, + obj.titulo, + obj.titulo_de_ley, + obj.numero_de_ley, + ] data = [i for i in fields if i is not None] original = ' '.join(data) slugified = slugify(original) diff --git a/proyectos_de_ley/pdl/templates/pdl/listado.html b/proyectos_de_ley/pdl/templates/pdl/listado.html new file mode 100644 index 0000000..7d0e456 --- /dev/null +++ b/proyectos_de_ley/pdl/templates/pdl/listado.html @@ -0,0 +1,44 @@ +{% extends "pdl/base.html" %} +{% load humanize %} + +{% block title %} +Proyectos de ley emitidos por el Congreso de la República del Perú | About +{% endblock %} + + +{% block content %} +
+ {% if not pretty_items and not items_previous_legislatures %} +

No se encontraron resultados.

+ {% else %} +

Resultados de búsqueda: {{ extra_result_msg }} {{ result_count|intcomma }}
+ Legislatura 2011 +

+ + {% if items_previous_legislatures %} +

+ Se encontraron proyectos en + + previas legislaturas + +

+ {% endif %} + + {% for i in pretty_items %} + {{ i|safe }} + {% endfor %} + {% endif %} +
+ + {% if last_page > 2 %} + {% include "pdl/pagination_search.html" %} + {% endif %} +{% endblock %} + + + +{% block highlight_keyword %} + +{% endblock %} diff --git a/proyectos_de_ley/pdl/templates/pdl/search.html b/proyectos_de_ley/pdl/templates/pdl/search.html index 233c44c..55c7544 100644 --- a/proyectos_de_ley/pdl/templates/pdl/search.html +++ b/proyectos_de_ley/pdl/templates/pdl/search.html @@ -8,10 +8,22 @@ {% block content %}
- {% if pretty_items|length < 1 %} + {% if not pretty_items and not items_previous_legislatures %}

No se encontraron resultados.

{% else %} -

Resultados de búsqueda: {{ extra_result_msg }} {{ result_count|intcomma }}

+

Resultados de búsqueda: {{ extra_result_msg }} {{ result_count|intcomma }}
+ Legislatura 2016 +

+ + {% if items_previous_legislatures %} +

+ Se encontraron proyectos en + + previas legislaturas + +

+ {% endif %} + {% for i in pretty_items %} {{ i|safe }} {% endfor %} diff --git a/proyectos_de_ley/pdl/templates/search/indexes/pdl/proyecto_text.txt b/proyectos_de_ley/pdl/templates/search/indexes/pdl/proyecto_text.txt index cb66e73..ec3a4b0 100644 --- a/proyectos_de_ley/pdl/templates/search/indexes/pdl/proyecto_text.txt +++ b/proyectos_de_ley/pdl/templates/search/indexes/pdl/proyecto_text.txt @@ -1,4 +1,5 @@ {{ object.codigo }} +{{ object.legislatura }} {{ object.numero_proyecto }} {{ object.short_url }} {{ object.fecha_presentacion }} diff --git a/proyectos_de_ley/pdl/urls.py b/proyectos_de_ley/pdl/urls.py index 62c0d4e..f044c27 100644 --- a/proyectos_de_ley/pdl/urls.py +++ b/proyectos_de_ley/pdl/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import url -from .views import index, about, search, congresista, proyecto +from .views import index, about, search, congresista, proyecto, listado urlpatterns = [ @@ -8,6 +8,12 @@ url(r'^$', index, name='index'), url(r'^about/$', about, name='about'), url(r'^search/$', search, name='search'), + url( + r'^listado/', + #r'^listado/\?keywords=(?P.+)$', + listado, + name='listado', + ), url( r'^congresista/(?P.*)$', congresista, diff --git a/proyectos_de_ley/pdl/views.py b/proyectos_de_ley/pdl/views.py index 807e18c..3715ece 100644 --- a/proyectos_de_ley/pdl/views.py +++ b/proyectos_de_ley/pdl/views.py @@ -1,4 +1,5 @@ # -*- encoding: utf-8 -*- +import ast import re from django.shortcuts import render @@ -12,14 +13,15 @@ from pdl.forms import SimpleSearchForm from stats.models import Dispensed +LEGISLATURE = 2016 def index(request): - all_items = Proyecto.objects.filter(legislatura=2016).order_by('-codigo') + all_items = Proyecto.objects.filter(legislatura=LEGISLATURE).order_by('-codigo') obj = do_pagination(request, all_items) # sin fusionar numero_de_proyectos = len(all_items) - with_iniciativas = Proyecto.objects.filter(legislatura=2016).exclude( + with_iniciativas = Proyecto.objects.filter(legislatura=LEGISLATURE).exclude( iniciativas_agrupadas__isnull=True).exclude( iniciativas_agrupadas__exact='').count() without_iniciativas = numero_de_proyectos - with_iniciativas @@ -27,11 +29,11 @@ def index(request): # no son ley projects_empty_title = Proyecto.objects.filter( titulo_de_ley='', - legislatura=2016, + legislatura=LEGISLATURE, ).count() projects_null_title = Proyecto.objects.filter( titulo_de_ley__isnull=True, - legislatura=2016, + legislatura=LEGISLATURE, ).count() are_not_law = projects_empty_title + projects_null_title @@ -79,6 +81,31 @@ def about(request): return render(request, "pdl/about.html") +def listado(request): + keywords = ast.literal_eval( + request.GET.get('keywords', ''), + ) + project_codes = request.GET.get('list', '').split(",") + all_items = Proyecto.objects.filter( + codigo__in=project_codes, + ).exclude(legislatura=LEGISLATURE) # exclude projects in current legislature + obj = do_pagination(request, all_items, search=True, advanced_search=True) + + return render(request, "pdl/listado.html", { + "result_count": len(all_items), + "items": obj['items'], + "pretty_items": obj['pretty_items'], + "first_half": obj['first_half'], + "second_half": obj['second_half'], + "first_page": obj['first_page'], + "last_page": obj['last_page'], + "current": obj['current'], + "keywords": keywords, + "query": "query", + "pagination_keyword": "query", + }) + + @csrf_exempt def search(request): if 'q' not in request.GET: @@ -90,13 +117,24 @@ def search(request): form = SimpleSearchForm(request.GET) all_items = form.search() - obj = do_pagination(request, all_items, search=True) + items_current_legislature = [ + i + for i in all_items + if i.legislatura == str(LEGISLATURE) + ] + items_previous_legislatures = [ + i.codigo + for i in all_items + if i.legislatura != str(LEGISLATURE) + ] + obj = do_pagination(request, items_current_legislature, search=True) keywords = clean_my_query(query) return render(request, "pdl/search.html", { - "result_count": len(all_items), + "result_count": len(items_current_legislature), "items": obj['items'], + "items_previous_legislatures": ",".join(items_previous_legislatures), "pretty_items": obj['pretty_items'], "first_half": obj['first_half'], "second_half": obj['second_half'], From 2c8e40e03ae1c8f7bf36b337eb3fc7467a8e96e9 Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Sun, 4 Sep 2016 15:22:54 -0500 Subject: [PATCH 25/59] fixed showing projects from past and new legislature in advanced-search --- proyectos_de_ley/pdl/views.py | 18 ++- .../templates/search_advanced/index.html | 18 ++- proyectos_de_ley/search_advanced/views.py | 105 +++++++++++------- 3 files changed, 89 insertions(+), 52 deletions(-) diff --git a/proyectos_de_ley/pdl/views.py b/proyectos_de_ley/pdl/views.py index 3715ece..1c4b101 100644 --- a/proyectos_de_ley/pdl/views.py +++ b/proyectos_de_ley/pdl/views.py @@ -82,9 +82,17 @@ def about(request): def listado(request): - keywords = ast.literal_eval( - request.GET.get('keywords', ''), - ) + try: + keywords = ast.literal_eval( + request.GET.get('keywords', ''), + ) + except ValueError: + keywords = request.GET.get('keywords', '') + + if isinstance(keywords, list): + query = " ".join(keywords) + else: + query = " ".join([keywords]) project_codes = request.GET.get('list', '').split(",") all_items = Proyecto.objects.filter( codigo__in=project_codes, @@ -101,8 +109,8 @@ def listado(request): "last_page": obj['last_page'], "current": obj['current'], "keywords": keywords, - "query": "query", - "pagination_keyword": "query", + "query": query, + "pagination_keyword": query, }) diff --git a/proyectos_de_ley/search_advanced/templates/search_advanced/index.html b/proyectos_de_ley/search_advanced/templates/search_advanced/index.html index 07aebe5..70fe0b4 100644 --- a/proyectos_de_ley/search_advanced/templates/search_advanced/index.html +++ b/proyectos_de_ley/search_advanced/templates/search_advanced/index.html @@ -20,7 +20,7 @@ {% block content %}
- {% if not items %} + {% if not items and not items_previous_legislatures %}

Búsqueda avanzada

@@ -38,7 +38,6 @@

{{ info_msg }}

{% endif %} -

Palabra clave

@@ -144,9 +143,20 @@

Por grupo parlamentario

-{% if items %} +{% if items or items_previous_legislatures %}
-

Resultados de búsqueda: {{ extra_result_msg }} {{ result_count|intcomma }}

+

Resultados de búsqueda: {{ extra_result_msg }} {{ result_count|intcomma }}
+ Legislatura 2016 +

+ + {% if items_previous_legislatures %} +

+ Se encontraron proyectos en + + previas legislaturas + +

+ {% endif %} {% if results == 'No se encontraron resultados.' %}

{{ results }}

diff --git a/proyectos_de_ley/search_advanced/views.py b/proyectos_de_ley/search_advanced/views.py index dd8b710..4304425 100644 --- a/proyectos_de_ley/search_advanced/views.py +++ b/proyectos_de_ley/search_advanced/views.py @@ -9,13 +9,14 @@ from pdl.models import Seguimientos from pdl.utils import do_pagination +LEGISLATURE = 2016 def index(request): if request.method == 'GET': form = SearchAdvancedForm(request.GET) if form.is_valid(): keywords = clean_keywords_for_combined_search(form.cleaned_data) - if len(keywords) > 0: + if keywords: return combined_search(keywords, form, request) # requests from stats view @@ -63,57 +64,36 @@ def clean_keywords_for_combined_search(cleaned_data): def combined_search(keywords, form, request): - msg = '' - queryset = Proyecto.objects.all().order_by('-codigo') - if 'query' in keywords: - query = keywords['query'] - msg = "Número de proyectos encontrados" - queryset = queryset.filter(titulo__icontains=keywords['query']) - else: - query = "" - - if 'date_to' and 'date_from' in keywords: - msg = "Número de proyectos entre fecha indicada" - queryset = queryset.filter(fecha_presentacion__range=(keywords['date_from'], keywords['date_to'])) - - if 'congresista' in keywords: - msg = "Número de proyectos de congresista {}".format(keywords['congresista']) - queryset = queryset.filter(congresistas__icontains=keywords['congresista']) - - try: - congresista = request.GET['congresista'] - except KeyError: - congresista = "" - - if 'grupo_parlamentario' in keywords: - msg = "Número de proyectos de bancada {}".format(keywords['grupo_parlamentario']) - queryset = queryset.filter(grupo_parlamentario=keywords['grupo_parlamentario']) - grupo_parlamentario = keywords['grupo_parlamentario'] - else: - grupo_parlamentario = "" - - if 'comision' in keywords: - comision = keywords['comision'] - msg = "Número de proyectos de comisión {}".format(keywords['comision']) - queryset = filter_by_comision(keywords, queryset) - else: - comision = "" - - if len(keywords) > 1: - msg = "Número de proyectos encontrados" - + print("########## keywords", keywords) + queryset1 = Proyecto.objects.filter(legislatura=LEGISLATURE).order_by('-codigo') + queryset2 = Proyecto.objects.all().order_by('-codigo').exclude(legislatura=LEGISLATURE) + comision, congresista, grupo_parlamentario, msg, query, queryset2 = filter_queryset( + keywords, + request, + queryset2, + ) + comision, congresista, grupo_parlamentario, msg, query, queryset1 = filter_queryset( + keywords, + request, + queryset1, + ) date_from, date_to = convert_to_iso_dates(keywords) - if queryset: - obj = do_pagination(request, queryset, search=True, advanced_search=True) + if queryset1 or queryset2: + if queryset2: + items_previous_legislatures = ",".join([i.codigo for i in queryset2]) + else: + items_previous_legislatures = "" + obj = do_pagination(request, queryset1, search=True, advanced_search=True) return render(request, "search_advanced/index.html", { "query": query, "comision": comision, "congresista": congresista, "grupo_parlamentario": grupo_parlamentario, + "items_previous_legislatures": items_previous_legislatures, "date_from": date_from, "date_to": date_to, - "result_count": len(queryset), + "result_count": len(queryset1), "extra_result_msg": msg, "items": obj['items'], "pretty_items": obj['pretty_items'], @@ -131,6 +111,45 @@ def combined_search(keywords, form, request): }) +def filter_queryset(keywords, request, queryset): + msg = "" + if 'query' in keywords: + query = keywords['query'] + msg = "Número de proyectos encontrados" + queryset = queryset.filter(titulo__icontains=keywords['query']) + print(len(queryset), queryset) + else: + query = "" + if 'date_to' in keywords and 'date_from' in keywords: + msg = "Número de proyectos entre fecha indicada" + queryset = queryset.filter(fecha_presentacion__range=( + keywords['date_from'], keywords['date_to'])) + if 'congresista' in keywords: + msg = "Número de proyectos de congresista {}".format( + keywords['congresista']) + queryset = queryset.filter( + congresistas__icontains=keywords['congresista']) + try: + congresista = request.GET['congresista'] + except KeyError: + congresista = "" + if 'grupo_parlamentario' in keywords: + msg = "Número de proyectos de bancada {}".format( + keywords['grupo_parlamentario']) + queryset = queryset.filter( + grupo_parlamentario=keywords['grupo_parlamentario']) + grupo_parlamentario = keywords['grupo_parlamentario'] + else: + grupo_parlamentario = "" + if 'comision' in keywords: + comision = keywords['comision'] + msg = "Número de proyectos de comisión {}".format(keywords['comision']) + queryset = filter_by_comision(keywords, queryset) + else: + comision = "" + return comision, congresista, grupo_parlamentario, msg, query, queryset + + def convert_to_iso_dates(keywords): try: date_from = datetime.datetime.strftime(keywords['date_from'], '%m/%d/%Y') From ae900aa5d4b2c080b142306595962a75f2943e4c Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Sun, 4 Sep 2016 15:44:00 -0500 Subject: [PATCH 26/59] fixed tests for stats --- proyectos_de_ley/stats/tests/test_custom_commands.py | 4 ++-- proyectos_de_ley/stats/tests/test_views.py | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/proyectos_de_ley/stats/tests/test_custom_commands.py b/proyectos_de_ley/stats/tests/test_custom_commands.py index bd1c86e..eaaebcc 100644 --- a/proyectos_de_ley/stats/tests/test_custom_commands.py +++ b/proyectos_de_ley/stats/tests/test_custom_commands.py @@ -12,7 +12,7 @@ class TestCustomCommand(TestCase): def setUp(self): self.b = Proyecto(**{ 'codigo': '00586', - 'legislatura': 2011, + 'legislatura': 2016, 'numero_proyecto': '00586/2011-CR', 'fecha_presentacion': '2010-10-10', 'short_url': '4huj5x', @@ -22,7 +22,7 @@ def setUp(self): }) b1 = Proyecto(**{ 'codigo': '00001', - 'legislatura': 2011, + 'legislatura': 2016, 'numero_proyecto': '00001/2011-CR', 'fecha_presentacion': '2010-10-10', 'short_url': '4auj5a', diff --git a/proyectos_de_ley/stats/tests/test_views.py b/proyectos_de_ley/stats/tests/test_views.py index 7c3cde5..2a82a70 100644 --- a/proyectos_de_ley/stats/tests/test_views.py +++ b/proyectos_de_ley/stats/tests/test_views.py @@ -17,6 +17,13 @@ def setUp(self): 'fecha_presentacion': '2010-10-10', 'titulo_de_ley': 'Ley No 2261', }) + Proyecto.objects.create(**{ + 'numero_proyecto': '02764', + 'legislatura': 2016, + 'time_created': datetime.datetime.now(), + 'fecha_presentacion': '2010-10-10', + 'titulo_de_ley': 'Ley No 2261', + }) Dispensed.objects.create(**{ 'total_approved': 1444, 'total_dispensed': 864, @@ -36,7 +43,7 @@ def test_index(self): def test_dame_sin_tramitar(self): numero_de_proyectos = Proyecto.objects.all().count() - expected = (100.0, 1) + expected = (100.0, 2) result = views.dame_sin_tramitar(numero_de_proyectos) self.assertEqual(expected, result) From a53577af70329cd2e63d4278bf4175dd20405b94 Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Sun, 4 Sep 2016 15:47:05 -0500 Subject: [PATCH 27/59] fixed test for advanced search --- proyectos_de_ley/pdl/tests/dummy_db.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proyectos_de_ley/pdl/tests/dummy_db.json b/proyectos_de_ley/pdl/tests/dummy_db.json index 4c1dda7..54664f1 100644 --- a/proyectos_de_ley/pdl/tests/dummy_db.json +++ b/proyectos_de_ley/pdl/tests/dummy_db.json @@ -37,7 +37,7 @@ }, { "codigo": "03773", - "legislatura": 2011, + "legislatura": 2016, "congresistas": "Chihuan Ramos, Leyla Felicita; Schaefer Cuculiza, Karla Melissa; Bardalez Cochagne, Aldo Maximiliano; Reátegui Flores, Rolando; Cuculiza Torre, Luisa María; Kobashigawa Kobashigawa, Ramon; Salazar Miranda, Octavio Edilberto", "expediente": "http://www2.congreso.gob.pe/sicr/tradocestproc/Expvirt_2011.nsf/visbusqptramdoc/03773?opendocument", "fecha_presentacion": "2014-09-05", From 4d96f4524a65565f3cf5fb5e76d51a9248efd72c Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Sun, 4 Sep 2016 15:49:53 -0500 Subject: [PATCH 28/59] fixed test for api --- proyectos_de_ley/api/tests/test_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proyectos_de_ley/api/tests/test_utils.py b/proyectos_de_ley/api/tests/test_utils.py index 8a23163..a28f2cf 100644 --- a/proyectos_de_ley/api/tests/test_utils.py +++ b/proyectos_de_ley/api/tests/test_utils.py @@ -16,7 +16,7 @@ def setUp(self): proyecto = Proyecto(**{ "numero_proyecto": "02764/2013-CR", "codigo": "02764", - 'legislatura': 2011, + 'legislatura': 2016, "short_url": "4zhube", "titulo": "Propone Ley Universitaria", "iniciativas_agrupadas": ['01790', '01800'], @@ -51,6 +51,7 @@ def test_prepare_json_for_d3(self): item = Object() item.numero_proyecto = "02764/2013-CR" item.codigo = "02764" + item.legislatura = 2016 item.titulo = "Propone Ley Universitaria" item.iniciativas_agrupadas = '{02764}' @@ -62,6 +63,7 @@ def test_prepare_json_for_d3_no_project(self): item = Object() item.numero_proyecto = "02764/2013-CR" item.codigo = "02764" + item.legislatura = 2016 item.titulo = "Propone Ley Universitaria" item.iniciativas_agrupadas = '{027640000}' From 056345218d0e18f78ebd02e8f5be9f9ab6595851 Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Sun, 4 Sep 2016 15:54:36 -0500 Subject: [PATCH 29/59] added to history --- HISTORY.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 6f4d3c4..13e59c6 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,10 @@ History ======= +v2.2.0 (2016-09-xx +~~~~~~~~~~~~~~~~~~ +* agregar capacidad de soportar proyectos de Legislatura 2011 y 2016. + v2.1.1 (2015-10-29) ~~~~~~~~~~~~~~~~~~~ * script para hacer backups de base de datos From cd27b06889c9e6b9169731130eea7a3b109e3283 Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Sun, 4 Sep 2016 15:55:58 -0500 Subject: [PATCH 30/59] added to history --- HISTORY.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 13e59c6..10934c0 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,7 +3,8 @@ History v2.2.0 (2016-09-xx ~~~~~~~~~~~~~~~~~~ -* agregar capacidad de soportar proyectos de Legislatura 2011 y 2016. +* agregada capacidad de soportar proyectos de Legislatura 2011 y 2016. +* agregada interface administrador en Django. v2.1.1 (2015-10-29) ~~~~~~~~~~~~~~~~~~~ From 70238473c39d79137d6e863417ceb885515ba77b Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Sun, 4 Sep 2016 15:57:24 -0500 Subject: [PATCH 31/59] added to history --- HISTORY.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 10934c0..2a58bd0 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -5,6 +5,8 @@ v2.2.0 (2016-09-xx ~~~~~~~~~~~~~~~~~~ * agregada capacidad de soportar proyectos de Legislatura 2011 y 2016. * agregada interface administrador en Django. +* mostrar proyectos de actual legislatura y menor prominencia a proyectos de + legislaturas pasadas. v2.1.1 (2015-10-29) ~~~~~~~~~~~~~~~~~~~ From 25ba3e07dafa4c6fd1fed5a73997883578502d3a Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Sun, 4 Sep 2016 16:13:44 -0500 Subject: [PATCH 32/59] fixed showing proyects from graphs in stats page --- proyectos_de_ley/search_advanced/views.py | 76 +++++++++++++++++------ 1 file changed, 58 insertions(+), 18 deletions(-) diff --git a/proyectos_de_ley/search_advanced/views.py b/proyectos_de_ley/search_advanced/views.py index 4304425..c980b32 100644 --- a/proyectos_de_ley/search_advanced/views.py +++ b/proyectos_de_ley/search_advanced/views.py @@ -45,7 +45,6 @@ def index(request): "form": form, }) else: - print(form.errors) return render(request, "search_advanced/index.html", { "form": form, }) @@ -64,7 +63,6 @@ def clean_keywords_for_combined_search(cleaned_data): def combined_search(keywords, form, request): - print("########## keywords", keywords) queryset1 = Proyecto.objects.filter(legislatura=LEGISLATURE).order_by('-codigo') queryset2 = Proyecto.objects.all().order_by('-codigo').exclude(legislatura=LEGISLATURE) comision, congresista, grupo_parlamentario, msg, query, queryset2 = filter_queryset( @@ -170,8 +168,14 @@ def filter_by_comision(keywords, queryset): def search_dispensados_todos(form, request): - total_dispensed = [i.proyecto for i in Seguimientos.objects.select_related('proyecto').filter( - evento__icontains='dispensado 2da')] + total_dispensed = [ + i.proyecto + for i in Seguimientos.objects.select_related('proyecto').filter( + evento__icontains='dispensado 2da', + ).filter( + proyecto__legislatura=LEGISLATURE, + ) + ] obj = do_pagination(request, total_dispensed, search=True, advanced_search=True) return render(request, "search_advanced/index.html", { @@ -191,8 +195,12 @@ def search_dispensados_todos(form, request): def search_total_leyes(form, request): are_law = Proyecto.objects.exclude( - titulo_de_ley__isnull=True).exclude( - titulo_de_ley__exact='') + titulo_de_ley__isnull=True, + ).exclude( + titulo_de_ley__exact='', + ).filter( + legislatura=LEGISLATURE, + ) obj = do_pagination(request, are_law, search=True, advanced_search=True) return render(request, "search_advanced/index.html", { @@ -211,8 +219,14 @@ def search_total_leyes(form, request): def search_exonerados_dictamen(form, request): - exonerado_de_dictamen = [i.proyecto for i in Seguimientos.objects.select_related('proyecto').filter( - evento__icontains='exoneración de dictamen').distinct()] + exonerado_de_dictamen = [ + i.proyecto + for i in Seguimientos.objects.select_related('proyecto').filter( + evento__icontains='exoneración de dictamen', + ).filter( + proyecto__legislatura=LEGISLATURE, + ).distinct() + ] exonerado_de_dictamen = list(set(exonerado_de_dictamen)) obj = do_pagination(request, exonerado_de_dictamen, search=True, advanced_search=True) @@ -232,8 +246,14 @@ def search_exonerados_dictamen(form, request): def search_total_aprobados(form, request): - total_approved = [i.proyecto for i in Seguimientos.objects.select_related('proyecto').filter( - Q(evento__icontains='promulgado') | Q(evento__icontains='publicado'))] + total_approved = [ + i.proyecto + for i in Seguimientos.objects.select_related('proyecto').filter( + Q(evento__icontains='promulgado') | Q(evento__icontains='publicado'), + ).filter( + proyecto__legislatura=LEGISLATURE, + ) + ] total_approved = list(set(total_approved)) obj = do_pagination(request, total_approved, search=True, advanced_search=True) @@ -253,8 +273,16 @@ def search_total_aprobados(form, request): def search_dispensados_acuerdo_pleno(form, request): - dispensed_by_plenary = [i.proyecto for i in Seguimientos.objects.select_related('proyecto').filter( - evento__icontains='dispensado 2da').filter(evento__icontains='pleno')] + dispensed_by_plenary = [ + i.proyecto + for i in Seguimientos.objects.select_related('proyecto').filter( + evento__icontains='dispensado 2da', + ).filter( + evento__icontains='pleno', + ).filter( + proyecto__legislatura=LEGISLATURE, + ) + ] obj = do_pagination(request, dispensed_by_plenary, search=True, advanced_search=True) return render(request, "search_advanced/index.html", { @@ -273,8 +301,14 @@ def search_dispensados_acuerdo_pleno(form, request): def search_dispensados_junta_portavoces(form, request): - dispensed_by_spokesmen = [i.proyecto for i in Seguimientos.objects.select_related('proyecto').filter( - evento__icontains='dispensado 2da').filter(evento__icontains='portavoces')] + dispensed_by_spokesmen = [ + i.proyecto + for i in Seguimientos.objects.select_related('proyecto').filter( + evento__icontains='dispensado 2da', + ).filter( + evento__icontains='portavoces', + ) + ] obj = do_pagination(request, dispensed_by_spokesmen, search=True, advanced_search=True) return render(request, "search_advanced/index.html", { @@ -293,10 +327,16 @@ def search_dispensados_junta_portavoces(form, request): def search_dispensados_otros(form, request): - otros_dispensados = [i.proyecto for i in Seguimientos.objects.select_related('proyecto').filter( - evento__icontains='dispensado 2da').exclude( - evento__icontains='pleno').exclude( - evento__icontains='portavoces')] + otros_dispensados = [ + i.proyecto + for i in Seguimientos.objects.select_related('proyecto').filter( + evento__icontains='dispensado 2da', + ).exclude( + evento__icontains='pleno', + ).exclude( + evento__icontains='portavoces', + ) + ] obj = do_pagination(request, otros_dispensados, search=True, advanced_search=True) return render(request, "search_advanced/index.html", { From 3527b53c7c8f730820fb973c6a74ca09ca5409f1 Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Mon, 5 Sep 2016 00:41:51 -0500 Subject: [PATCH 33/59] fixed api for timeline --- proyectos_de_ley/api/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/proyectos_de_ley/api/views.py b/proyectos_de_ley/api/views.py index 21c0315..f23e8c9 100644 --- a/proyectos_de_ley/api/views.py +++ b/proyectos_de_ley/api/views.py @@ -475,9 +475,12 @@ def seguimientos_list(request, codigo): paramType: path required: true """ - codigo = re.sub('-[0-9]+', '', codigo) + codigo, legislatura = codigo.split("-") try: - proy = Proyecto.objects.get(numero_proyecto__startswith=codigo) + proy = Proyecto.objects.get( + codigo=codigo, + legislatura=legislatura, + ) except Proyecto.DoesNotExist: msg = {'error': 'proyecto no existe'} return HttpResponse(json.dumps(msg), content_type='application/json') From 2902b5701d5627dfca22a1f8ad17782aab9bf478 Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Mon, 5 Sep 2016 00:50:17 -0500 Subject: [PATCH 34/59] for each congress person show only projects of recent legislature --- proyectos_de_ley/pdl/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proyectos_de_ley/pdl/views.py b/proyectos_de_ley/pdl/views.py index 1c4b101..04aea96 100644 --- a/proyectos_de_ley/pdl/views.py +++ b/proyectos_de_ley/pdl/views.py @@ -170,7 +170,10 @@ def congresista(request, congresista_slug): congresista_name = find_slug_in_db(congresista_slug) if congresista_name is not None: all_items = Proyecto.objects.filter( - congresistas__icontains=congresista_name).order_by('-codigo') + congresistas__icontains=congresista_name, + ).filter( + legislatura=LEGISLATURE, + ).order_by('-codigo') obj = do_pagination(request, all_items) return render(request, "pdl/congresista.html", { "items": obj['items'], From 89b67b6ceb18bb764de18d36b1d8f8f20981d17c Mon Sep 17 00:00:00 2001 From: carlosp420 Date: Tue, 6 Sep 2016 14:39:25 -0500 Subject: [PATCH 35/59] use our own logo --- proyectos_de_ley/pdl/static/img/pdl2.png | Bin 6877 -> 9959 bytes proyectos_de_ley/pdl/templates/pdl/base.html | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/proyectos_de_ley/pdl/static/img/pdl2.png b/proyectos_de_ley/pdl/static/img/pdl2.png index 649fce4dfdb97ac09f1a6adc92ed2be66b224ffe..4554eac1546b9f717f434dbe405f3a8573027f85 100644 GIT binary patch delta 7384 zcmZX21yCGOm-XNf0t5*XAh=s_f;&Nj2M80K!3pj(1b6q~uEE_CT!Z^S(BSUOEZOh> zt9EOvt8SmVeP5rhdauv9bysM6de@=LSU2i zZK$DAe*us<%jh_3*qb}M89ADPBuwp%%_!wVQdGe{4%diT!S*XwDOVa=3ygXQQf_OwP^&frtC0vIYG;-U)ax(9bi$ohI&g|qst8LHw?B##*qYsb3-dcPfd-@V+<$K(NM>YuMv+*(BPTyp={hRE7}uelJx{Y zFW9N4{RU$Y+64l{Dj~meC2u5egQ0^64niplT?)*ap)vMp=ubQ%pNmb(`v|^mxh3#- zqULPhD0X9`l{`?EdjS#3LH+D&m7rjPyXX>%A)GtYgD`&(%)U5Jx9F)ntL9!Z z3yE_Vx$V4!kd0N6AI-VU`|ZAlqxim?lU}^lU-|RFT7WQGCU60JO8@$fzJ}4n_|e6f z0p?^rTi}{}*%&Tua>9saGU^Qt??(0cvWu;BuP*F#Nv3Ev(g3_30OC*gE-vJvte6V= zi8)3ON?(nhCVHrh^FPE_k1t5rA(JyrxJ9#8WGOCpEz}Syabl0-dimr+_Z*I(RnBi# zgJ8&pyGvF0!A2H)sJi~TI=PYJa*WSg8jCxOK8F5Il7vb(mv>;JB-~W75edP$OYdtW zEla$uh*HhVgl{x6{)rvm4I$`rfjwxGD3RQ5vfH=^rBS zpMv3P*souQzU`ZA_H$t!Bz15y7JYrp_ZikgctA-ti6pm?0W5I)PYhj)i^&L3qs1eCv^yVr7dl|oa{lG;S=Q&D5)%+@O$j)Sv-H|X3;Ey_U9Zm=oLt)Tle z4+LxNIvjUOvYK*aFc#_Jj&O1Y!WtU-u~5B|q;P&v%uA)-H(6JsWJ}0 z?R%4`@WJ`>EqbRBA!ettVyWVK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)) zqHOZ{RgN^~hCOXk5EG%fpo&nMbq5)7&W~q8*uVgV88%0+P41JkK{6{_jK-D|z3p4f zwe$K9GihM?%enrEAWGFm=Fv_&*fJD}0Er8vGnc#O+iCSnn zQDVE!`1u{|CjEKh^rZ_w;zZGt8}IF!o(^+L3zd1_tvO$DC>x$*aKYt;j89*CFZLtU$OtpI9cz8QYA2(^~?!kj71UlAVyYVJp*(bqwn1zEZ!8coj+IM z89gFJi39p%m8%;(GN57>`Qm%=^D!nX&THquKTW0oMSdEp5i?vFkla;OcA`Y^4Rk{H zQw@!RlW%XD&aZIdly_)Y>1BA(7P=@lIVq`0>1ey|N*K?&S#tFs?fsSA!65$Uhvr}X zgxloWt%vXLBzxyf2fL5@q5&4wdl-+IPYcRk@ z{K)3GOnl+95I8MECs_^=db!z_dQYV-9V=(+zXAKteN+3ig3hlE*4^s$eC^p88+3GL zr!~pL_Hfbj{oLWh&hj-ZW-+gTkdyQ6qUryE<_?g&mu#_MVC(|n`S)9}G`B&$Hocno EKM-Fe^Z)<= diff --git a/proyectos_de_ley/pdl/templates/pdl/base.html b/proyectos_de_ley/pdl/templates/pdl/base.html index dd9d6ec..d1de86c 100644 --- a/proyectos_de_ley/pdl/templates/pdl/base.html +++ b/proyectos_de_ley/pdl/templates/pdl/base.html @@ -95,7 +95,7 @@ Proyectos de Ley + width="300px" height="50px" src="{% static 'img/pdl2.png' %}" alt="Proyectos de Ley" />