Skip to content
Extraits de code Groupes Projets
Valider 8c194430 rédigé par Nicolas Joyard's avatar Nicolas Joyard
Parcourir les fichiers

Fix test errors

parent 98a0fae0
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
import csv import csv
import django import django
from django.apps import apps from django.apps import apps
from django.db import transaction
import logging import logging
import sys import sys
import re import re
...@@ -106,4 +105,3 @@ def main(stream=None): ...@@ -106,4 +105,3 @@ def main(stream=None):
imported = imported + 1 imported = imported + 1
logger.info('%d rows imported, %d rows rejected', imported, len(rejected)) logger.info('%d rows imported, %d rows rejected', imported, len(rejected))
...@@ -2,9 +2,9 @@ from django.db import models ...@@ -2,9 +2,9 @@ from django.db import models
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.template.defaultfilters import truncatewords from django.template.defaultfilters import truncatewords
from taggit.managers import TaggableManager from taggit.managers import TaggableManager
from representatives.models import Representative from representatives.models import Representative
class Position(models.Model): class Position(models.Model):
representative = models.ForeignKey(Representative, representative = models.ForeignKey(Representative,
related_name='positions') related_name='positions')
......
# coding: utf-8
# flake8: noqa
dossier_mappings = {
"Resolution on Anti-Counterfeiting Trade Agreement (ACTA)":
"Resolution on the Anti-Counterfeiting Trade Agreement (ACTA)",
"Rapport Bono on cultural industries in Europe":
"Cultural industries in Europe",
"Rapport Gallo on enforcement of intellectual property rights in the internal market":
"Enforcement of intellectual property rights in the internal market",
"Rapport Lambrinidis on strengthening security and fundamental freedoms on the Internet":
"Strengthening security and fundamental freedoms on the Internet",
"Criminal measures aimed at ensuring the enforcement of intellectual property rights (IPRED 2), 1st reading":
"Criminal measures aimed at ensuring the enforcement of intellectual property rights"
}
...@@ -3,27 +3,15 @@ ...@@ -3,27 +3,15 @@
import csv import csv
import django import django
from django.apps import apps from django.apps import apps
from django.db import transaction
import logging import logging
import sys import sys
from representatives_recommendations.models import Recommendation from representatives_recommendations.models import Recommendation
from representatives_votes.models import Dossier, Proposal from representatives_votes.models import Dossier, Proposal
logger = logging.getLogger(__name__) from .dossier_mappings import dossier_mappings
dossier_mappings = { logger = logging.getLogger(__name__)
"Resolution on Anti-Counterfeiting Trade Agreement (ACTA)":
"Resolution on the Anti-Counterfeiting Trade Agreement (ACTA)",
"Rapport Bono on cultural industries in Europe":
"Cultural industries in Europe",
"Rapport Gallo on enforcement of intellectual property rights in the internal market":
"Enforcement of intellectual property rights in the internal market",
"Rapport Lambrinidis on strengthening security and fundamental freedoms on the Internet":
"Strengthening security and fundamental freedoms on the Internet",
"Criminal measures aimed at ensuring the enforcement of intellectual property rights (IPRED 2), 1st reading":
"Criminal measures aimed at ensuring the enforcement of intellectual property rights"
}
class RecommendationImporter: class RecommendationImporter:
...@@ -124,4 +112,3 @@ def main(stream=None): ...@@ -124,4 +112,3 @@ def main(stream=None):
imported = imported + 1 imported = imported + 1
logger.info('%d rows imported, %d rows rejected', imported, len(rejected)) logger.info('%d rows imported, %d rows rejected', imported, len(rejected))
...@@ -44,8 +44,8 @@ setup(name='political-memory', ...@@ -44,8 +44,8 @@ setup(name='political-memory',
}, },
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'memopol_import_positions = representatives_positions.contrib.import_positions:main', 'memopol_import_positions = representatives_positions.contrib.import_positions:main', # noqa
'memopol_import_recommendations = representatives_recommendations.contrib.import_recommendations:main', 'memopol_import_recommendations = representatives_recommendations.contrib.import_recommendations:main', # noqa
] ]
} }
) )
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter