From 3b3ffbf24326a37bf4b9a597cd02e2c1fda1ed43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 16 Jan 2016 17:34:10 +0100 Subject: [PATCH] initial version --- MANIFEST.in | 7 ++ README | 33 ++++++ passerelle_imio_liege_lisrue/__init__.py | 28 +++++ passerelle_imio_liege_lisrue/forms.py | 30 +++++ .../locale/fr/LC_MESSAGES/django.po | 88 +++++++++++++++ .../migrations/0001_initial.py | 30 +++++ .../migrations/__init__.py | 0 passerelle_imio_liege_lisrue/models.py | 57 ++++++++++ .../passerelle_imio_liege_lisrue/base.html | 8 ++ .../imioliegelisrue_confirm_delete.html | 16 +++ .../imioliegelisrue_detail.html | 44 ++++++++ .../imioliegelisrue_form.html | 34 ++++++ passerelle_imio_liege_lisrue/urls.py | 44 ++++++++ passerelle_imio_liege_lisrue/views.py | 83 ++++++++++++++ setup.py | 105 ++++++++++++++++++ 15 files changed, 607 insertions(+) create mode 100644 MANIFEST.in create mode 100644 README create mode 100644 passerelle_imio_liege_lisrue/__init__.py create mode 100644 passerelle_imio_liege_lisrue/forms.py create mode 100644 passerelle_imio_liege_lisrue/locale/fr/LC_MESSAGES/django.po create mode 100644 passerelle_imio_liege_lisrue/migrations/0001_initial.py create mode 100644 passerelle_imio_liege_lisrue/migrations/__init__.py create mode 100644 passerelle_imio_liege_lisrue/models.py create mode 100644 passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/base.html create mode 100644 passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_confirm_delete.html create mode 100644 passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_detail.html create mode 100644 passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_form.html create mode 100644 passerelle_imio_liege_lisrue/urls.py create mode 100644 passerelle_imio_liege_lisrue/views.py create mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..13b01eb --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,7 @@ +recursive-include passerelle_imio_liege_lisrue/static *.css *.png +recursive-include passerelle_imio_liege_lisrue/templates *.html *.txt +recursive-include passerelle_imio_liege_lisrue/locale *.po *.mo +include MANIFEST.in +include COPYING +include VERSION +include README diff --git a/README b/README new file mode 100644 index 0000000..0ca05ca --- /dev/null +++ b/README @@ -0,0 +1,33 @@ +Passerelle connector to Liege Lisrue service +============================================ + +Installation +------------ + + - add to Passerelle installed apps settings: + INSTALLED_APPS += ('passerelle_imio_liege_lisrue',) + + - enable module: + PASSERELLE_APP_PASSERELLE_IMIO_LIEGE_LISRUE_ENABLED = True + + +Usage +----- + + - create and configure new connector + - Title/description: whatever you want + - URL: https://e-services.liege.be:8443/ + - Certificate check: uncheck if the service has no valid certificate + + - test service by clicing on the available links + - the /voies/ endpoint may take some time as it will query for everything + (but will be cut at 51 items) + - the /voies/?q=... endoint is set with an example string, feel free to + change it. + + +Usage in w.c.s. +--------------- + + - configure a list field with a jsonp datasource, with the "/voies/" endpoint + URL as value. diff --git a/passerelle_imio_liege_lisrue/__init__.py b/passerelle_imio_liege_lisrue/__init__.py new file mode 100644 index 0000000..2f24a1d --- /dev/null +++ b/passerelle_imio_liege_lisrue/__init__.py @@ -0,0 +1,28 @@ +# passerelle-imio-liege-lisrue - passerelle connector to Lisrue webservice +# Copyright (C) 2016 Entr'ouvert +# +# This program 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 +# (at your option) any later version. +# +# This program 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 Affero General Public License +# along with this program. If not, see . + +import django.apps + +class AppConfig(django.apps.AppConfig): + + name = 'passerelle_imio_liege_lisrue' + verbose_name = 'Liege Lisrue' + + def get_after_urls(self): + from . import urls + return urls.urlpatterns + +default_app_config = 'passerelle_imio_liege_lisrue.AppConfig' diff --git a/passerelle_imio_liege_lisrue/forms.py b/passerelle_imio_liege_lisrue/forms.py new file mode 100644 index 0000000..9f13e33 --- /dev/null +++ b/passerelle_imio_liege_lisrue/forms.py @@ -0,0 +1,30 @@ +# passerelle-imio-liege-lisrue - passerelle connector to Lisrue webservice +# Copyright (C) 2016 Entr'ouvert +# +# This program 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 +# (at your option) any later version. +# +# This program 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 Affero General Public License +# along with this program. If not, see . + +from django.utils.text import slugify +from django import forms + +from .models import ImioLiegeLisrue + +class ImioLiegeLisrueForm(forms.ModelForm): + class Meta: + model = ImioLiegeLisrue + exclude = ('slug', 'users') + + def save(self, commit=True): + if not self.instance.slug: + self.instance.slug = slugify(self.instance.title) + return super(ImioLiegeLisrueForm, self).save(commit=commit) diff --git a/passerelle_imio_liege_lisrue/locale/fr/LC_MESSAGES/django.po b/passerelle_imio_liege_lisrue/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 0000000..bd43913 --- /dev/null +++ b/passerelle_imio_liege_lisrue/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,88 @@ +# French translation of passerelle-imio-liege-lisrue +# Copyright (C) 2016 Entr'ouvert +# This file is distributed under the same license as the +# passerelle-imio-liege-lisrue package. +# Frédéric Péters , 2016 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: passerelle-imio-liege-lisrue 0\n" +"POT-Creation-Date: 2016-01-16 17:28+0100\n" +"PO-Revision-Date: 2016-01-16 17:28+0100\n" +"Last-Translator: Frédéric Péters \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: models.py:13 +msgid "Service URL" +msgstr "URL du service" + +#: models.py:14 +msgid "SIG Web Service URL (ex: https://e-services.liege.be:8443/)" +msgstr "URL du webservice du SIG (ex: https://e-services.liege.be:8443/)" + +#: models.py:16 +msgid "Check HTTPS Certificate validity" +msgstr "Verification de la validité du certificat HTTPS" + +#: models.py:18 +msgid "Geographic information system" +msgstr "Système d'information géographique" + +#: models.py:21 +msgid "Liege Lisrue Service" +msgstr "Service Lisrue de Liège" + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_confirm_delete.html:12 +msgid "Confirm Deletion" +msgstr "Confirmer la suppression" + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_confirm_delete.html:13 +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_form.html:26 +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_form.html:28 +msgid "Cancel" +msgstr "Annuler" + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_detail.html:7 +msgid "edit" +msgstr "modifier" + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_detail.html:10 +msgid "delete" +msgstr "supprimer" + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_detail.html:20 +msgid "Endpoints" +msgstr "Points d'accès" + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_detail.html:22 +msgid "Listing streets:" +msgstr "Lister les rues :" + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_detail.html:25 +msgid "Listing streets containing string:" +msgstr "Lister les rues contenant la chaîne :" + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_detail.html:34 +msgid "Security" +msgstr "Sécurité" + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_detail.html:37 +msgid "Accessing the listings is open." +msgstr "L'accès aux listes est ouvert." + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_form.html:7 +msgid "Add Liege Lisrue Connector" +msgstr "Ajouter un connecteur Liege Lisrue" + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_form.html:12 +msgid "New" +msgstr "Nouveau" + +#: templates/passerelle_imio_liege_lisrue/imioliegelisrue_form.html:24 +msgid "Save" +msgstr "Enregistrer" diff --git a/passerelle_imio_liege_lisrue/migrations/0001_initial.py b/passerelle_imio_liege_lisrue/migrations/0001_initial.py new file mode 100644 index 0000000..c4756cb --- /dev/null +++ b/passerelle_imio_liege_lisrue/migrations/0001_initial.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('base', '0002_auto_20151009_0326'), + ] + + operations = [ + migrations.CreateModel( + name='ImioLiegeLisrue', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('title', models.CharField(max_length=50)), + ('slug', models.SlugField()), + ('description', models.TextField()), + ('service_url', models.CharField(help_text='SIG Web Service URL (ex: https://e-services.liege.be:8443/)', max_length=128, verbose_name='Service URL')), + ('verify_cert', models.BooleanField(default=True, verbose_name='Check HTTPS Certificate validity')), + ('users', models.ManyToManyField(to='base.ApiUser', blank=True)), + ], + options={ + 'verbose_name': 'Liege Lisrue Service', + }, + bases=(models.Model,), + ), + ] diff --git a/passerelle_imio_liege_lisrue/migrations/__init__.py b/passerelle_imio_liege_lisrue/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/passerelle_imio_liege_lisrue/models.py b/passerelle_imio_liege_lisrue/models.py new file mode 100644 index 0000000..b581729 --- /dev/null +++ b/passerelle_imio_liege_lisrue/models.py @@ -0,0 +1,57 @@ +# passerelle-imio-liege-lisrue - passerelle connector to Lisrue webservice +# Copyright (C) 2016 Entr'ouvert +# +# This program 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 +# (at your option) any later version. +# +# This program 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 Affero General Public License +# along with this program. If not, see . + +import urlparse +import requests + +from django.core.urlresolvers import reverse +from django.db import models +from django.utils.translation import ugettext_lazy as _ + +from passerelle.base.models import BaseResource + + +class ImioLiegeLisrue(BaseResource): + service_url = models.CharField(max_length=128, blank=False, + verbose_name=_('Service URL'), + help_text=_('SIG Web Service URL (ex: https://e-services.liege.be:8443/)')) + verify_cert = models.BooleanField(default=True, + verbose_name=_('Check HTTPS Certificate validity')) + + category = _('Geographic information system') + + class Meta: + verbose_name = _('Liege Lisrue Service') + + def get_absolute_url(self): + return reverse('imio-liege-lisrue-view', kwargs={'slug': self.slug}) + + def sig_request(self, endpoint, **kwargs): + if not self.verify_cert: + kwargs['verify'] = False + return requests.get(self.service_url + '/adresse/rest/' + endpoint, **kwargs).json() + + @classmethod + def get_add_url(cls): + return reverse('imio-liege-lisrue-add') + + @classmethod + def get_verbose_name(cls): + return cls._meta.verbose_name + + @classmethod + def get_icon_class(cls): + return 'gis' diff --git a/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/base.html b/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/base.html new file mode 100644 index 0000000..6c10e11 --- /dev/null +++ b/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/base.html @@ -0,0 +1,8 @@ +{% extends "passerelle/manage.html" %} + +{% block breadcrumb %} +{{ block.super }} +{% if object.id %} +{{ object.title }} +{% endif %} +{% endblock %} diff --git a/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_confirm_delete.html b/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_confirm_delete.html new file mode 100644 index 0000000..a24c185 --- /dev/null +++ b/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_confirm_delete.html @@ -0,0 +1,16 @@ +{% extends "passerelle_imio_liege_lisrue/base.html" %} +{% load i18n %} + +{% block appbar %} +

Lisrue - {{ object.title }}

+{% endblock %} + +{% block content %} +
+ {% csrf_token %} +
+ + {% trans 'Cancel' %} +
+
+{% endblock %} diff --git a/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_detail.html b/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_detail.html new file mode 100644 index 0000000..26f5b42 --- /dev/null +++ b/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_detail.html @@ -0,0 +1,44 @@ +{% extends "passerelle_imio_liege_lisrue/base.html" %} +{% load i18n passerelle %} + +{% block appbar %} +

Lisrue - {{ object.title }}

+{% if perms.passerelle_imio_liege_lisrue.change_passerelle_imio_liege_lisrue %} +{% trans 'edit' %} +{% endif %} +{% if perms.passerelle_imio_liege_lisrue.delete_passerelle_imio_liege_lisrue %} +{% trans 'delete' %} +{% endif %} +{% endblock %} + +{% block content %} +

+Service URL : {{ object.service_url }} +

+ +
+

{% trans 'Endpoints' %}

+ +
+ +{% if perms.base.view_accessright %} +
+

{% trans "Security" %}

+ +

+{% trans 'Accessing the listings is open.' %} +

+ +{% endif %} + +
+ +{% endblock %} diff --git a/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_form.html b/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_form.html new file mode 100644 index 0000000..9766769 --- /dev/null +++ b/passerelle_imio_liege_lisrue/templates/passerelle_imio_liege_lisrue/imioliegelisrue_form.html @@ -0,0 +1,34 @@ +{% extends "passerelle_imio_liege_lisrue/base.html" %} +{% load i18n %} + +{% block more-user-links %} +{{ block.super }} +{% if not object.id %} +{% trans 'Add Liege Lisrue Connector' %} +{% endif %} +{% endblock %} + +{% block appbar %} +

Lisrue - {% if object.id %}{{ object.title }}{% else %}{% trans 'New' %}{% endif %}

+{% endblock %} + +{% block content %} + +
+
+ {% csrf_token %} + {{ form.as_p }} +
+ {% block buttons %} +
+ + {% if object.id %} + {% trans 'Cancel' %} + {% else %} + {% trans 'Cancel' %} + {% endif %} +
+ {% endblock %} +
+ +{% endblock %} diff --git a/passerelle_imio_liege_lisrue/urls.py b/passerelle_imio_liege_lisrue/urls.py new file mode 100644 index 0000000..93b0750 --- /dev/null +++ b/passerelle_imio_liege_lisrue/urls.py @@ -0,0 +1,44 @@ +# passerelle-imio-liege-lisrue - passerelle connector to Lisrue webservice +# Copyright (C) 2016 Entr'ouvert +# +# This program 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 +# (at your option) any later version. +# +# This program 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 Affero General Public License +# along with this program. If not, see . + +from django.conf.urls import patterns, include, url +from django.contrib.auth.decorators import login_required + +from passerelle.urls_utils import decorated_includes, required, app_enabled + +from views import * + + +public_urlpatterns = patterns('', + url(r'^(?P[\w,-]+)/$', SigDetailView.as_view(), name='imio-liege-lisrue-view'), + + url(r'^(?P[\w,-]+)/voies/$', VoiesView.as_view(), name='imio-liege-lisrue-voies'), +) + +management_urlpatterns = patterns('', + url(r'^add$', SigCreateView.as_view(), name='imio-liege-lisrue-add'), + url(r'^(?P[\w,-]+)/edit$', SigUpdateView.as_view(), name='imio-liege-lisrue-edit'), + url(r'^(?P[\w,-]+)/delete$', SigDeleteView.as_view(), name='imio-liege-lisrue-delete'), +) + +urlpatterns = required( + app_enabled('passerelle_imio_liege_lisrue'), + patterns('', + url(r'^imio-liege-lisrue/', include(public_urlpatterns)), + url(r'^manage/imio-liege-lisrue/', + decorated_includes(login_required, include(management_urlpatterns))), + ) +) diff --git a/passerelle_imio_liege_lisrue/views.py b/passerelle_imio_liege_lisrue/views.py new file mode 100644 index 0000000..13b24a2 --- /dev/null +++ b/passerelle_imio_liege_lisrue/views.py @@ -0,0 +1,83 @@ +# passerelle-imio-liege-lisrue - passerelle connector to Lisrue webservice +# Copyright (C) 2016 Entr'ouvert +# +# This program 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 +# (at your option) any later version. +# +# This program 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 Affero General Public License +# along with this program. If not, see . + +import requests +import unicodedata + +from django.views.generic.detail import SingleObjectMixin, DetailView +from django.views.generic.edit import CreateView, UpdateView, DeleteView +from django.views.generic.base import View, RedirectView +from django.core.urlresolvers import reverse +from django.http import HttpResponseBadRequest + +from passerelle import utils + +from .models import ImioLiegeLisrue +from .forms import ImioLiegeLisrueForm + +class SigCreateView(CreateView): + model = ImioLiegeLisrue + form_class = ImioLiegeLisrueForm + template_name = 'passerelle/manage/service_form.html' + + +class SigUpdateView(UpdateView): + model = ImioLiegeLisrue + form_class = ImioLiegeLisrueForm + + +class SigDeleteView(DeleteView): + model = ImioLiegeLisrue + + def get_success_url(self): + return reverse('manage-home') + + +class SigDetailView(DetailView): + model = ImioLiegeLisrue + + +class VoiesView(View, SingleObjectMixin): + model = ImioLiegeLisrue + + def get(self, request, *args, **kwargs): + url = self.get_object().service_url + url += 'jsonlisrue/' + + if 'q' in request.GET and request.GET['q']: + q = unicodedata.normalize('NFKD', request.GET['q']).encode('ascii', 'ignore') + url += q.lower() + + result = requests.get(url, headers={'Accept': 'application/json'}, + verify=self.get_object().verify_cert).json() + if isinstance(result['findResponse'], list): + lisrues = result['findResponse'] + elif isinstance(result['findResponse'], dict) and 'return' in result['findResponse']: + lisrues = [result['findResponse']['return']] + else: + lisrues = [] + + streets = [] + for item in lisrues: + name = item.get('particuleMinuscule') or '' + if name and not name.endswith("'"): + name += ' ' + name += item.get('libelleMinuscule') + streets.append({ + 'id': item.get('id'), + 'text': name}) + + return utils.response_for_json(request, {'data': streets}) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..441b74c --- /dev/null +++ b/setup.py @@ -0,0 +1,105 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- + +import glob +import os +import re +import subprocess +import sys + +from setuptools.command.install_lib import install_lib as _install_lib +from distutils.command.build import build as _build +from distutils.command.sdist import sdist +from distutils.cmd import Command +from setuptools import setup, find_packages + +class eo_sdist(sdist): + def run(self): + if os.path.exists('VERSION'): + os.remove('VERSION') + version = get_version() + version_file = open('VERSION', 'w') + version_file.write(version) + version_file.close() + sdist.run(self) + if os.path.exists('VERSION'): + os.remove('VERSION') + +def get_version(): + if os.path.exists('VERSION'): + version_file = open('VERSION', 'r') + version = version_file.read() + version_file.close() + return version + if os.path.exists('.git'): + p = subprocess.Popen(['git', 'describe', '--dirty', '--match=v*'], stdout=subprocess.PIPE) + result = p.communicate()[0] + if p.returncode == 0: + version = result.split()[0][1:] + version = version.replace('-', '.') + return version + return '0' + + +class compile_translations(Command): + description = 'compile message catalogs to MO files via django compilemessages' + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + try: + from django.core.management import call_command + for path, dirs, files in os.walk('passerelle_imio_liege_lisrue'): + if 'locale' not in dirs: + continue + curdir = os.getcwd() + os.chdir(os.path.realpath(path)) + call_command('compilemessages') + os.chdir(curdir) + except ImportError: + sys.stderr.write('!!! Please install Django >= 1.4 to build translations\n') + + +class build(_build): + sub_commands = [('compile_translations', None)] + _build.sub_commands + + +class install_lib(_install_lib): + def run(self): + self.run_command('compile_translations') + _install_lib.run(self) + + +setup( + name='passerelle-liege-imio-lisrue', + version=get_version(), + author='Frederic Peters', + author_email='fpeters@entrouvert.com', + packages=find_packages(), + include_package_data=True, + url='https://dev.entrouvert.org/projects/imio/', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Environment :: Web Environment', + 'Framework :: Django', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + ], + install_requires=['django>=1.7, <1.8', + ], + zip_safe=False, + cmdclass={ + 'build': build, + 'compile_translations': compile_translations, + 'install_lib': install_lib, + 'sdist': eo_sdist, + } +)