From 43985d1f9295b854b50ca954b9241a0b8a009783 Mon Sep 17 00:00:00 2001 From: Serghei MIHAI Date: Fri, 24 Oct 2014 18:29:35 +0200 Subject: [PATCH] tipi plugin replaced by a blurp Closes #5613 --- .../0003_remove_text_plugin_wrapper.py | 20 ++ compte_agglo_montpellier/settings.py | 20 +- .../templates/blurps/tipi.html | 225 ++++++++++++++++++ compte_agglo_montpellier/urls.py | 6 + requirements.txt | 2 - setup.py | 1 - 6 files changed, 270 insertions(+), 4 deletions(-) create mode 100644 compte_agglo_montpellier/migrations/0003_remove_text_plugin_wrapper.py create mode 100644 compte_agglo_montpellier/templates/blurps/tipi.html diff --git a/compte_agglo_montpellier/migrations/0003_remove_text_plugin_wrapper.py b/compte_agglo_montpellier/migrations/0003_remove_text_plugin_wrapper.py new file mode 100644 index 0000000..dbdedb1 --- /dev/null +++ b/compte_agglo_montpellier/migrations/0003_remove_text_plugin_wrapper.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from south.utils import datetime_utils as datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + db.delete_column('djangocms_text_ckeditor_text', 'wrapper') + + def backwards(self, orm): + pass + + models = { + + } + + complete_apps = ['compte_agglo_montpellier'] diff --git a/compte_agglo_montpellier/settings.py b/compte_agglo_montpellier/settings.py index 872aa87..192cbd9 100644 --- a/compte_agglo_montpellier/settings.py +++ b/compte_agglo_montpellier/settings.py @@ -188,7 +188,6 @@ INSTALLED_APPS = ( 'portail_citoyen.apps.auquotidien_plugin', 'portail_citoyen.apps.passerelle_register_plugin', 'compte_agglo_montpellier', - 'tipi_payment_plugin', ) MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' @@ -562,3 +561,22 @@ if USE_DEBUG_TOOLBAR: INSTALLED_APPS += ('debug_toolbar',) except ImportError: print "Debug toolbar missing, not loaded" + +try: + import cmsplugin_blurp + INSTALLED_APPS += ( + 'cmsplugin_blurp', + ) +except ImportError: + pass + +CMS_PLUGIN_BLURP_RENDERERS = { + 'tipi': { + 'name': 'Formulaire de paiement TIPI', + 'class': 'cmsplugin_blurp.renderers.template.TemplateRenderer', + 'refresh': 3600, + 'template': 'tipi', + 'template_name': 'blurps/tipi.html', + 'ajax': False, + }, +} diff --git a/compte_agglo_montpellier/templates/blurps/tipi.html b/compte_agglo_montpellier/templates/blurps/tipi.html new file mode 100644 index 0000000..5cb8c7e --- /dev/null +++ b/compte_agglo_montpellier/templates/blurps/tipi.html @@ -0,0 +1,225 @@ +{% load sekizai_tags %} +{% load i18n %} + +{% addtoblock "js" %} + +{% endaddtoblock %} +{% addtoblock "css" %} + +{% endaddtoblock %} + + +
+

Paiement en ligne

+ +

Vous pouvez payer ici les factures émises par Montpellier Agglomération (service Téléalarme, déchets verts,...)

+ +

Après avoir rempli les champs du formulaire ci-dessous et cliqué sur le bouton "Payer", vous serez redirigé vers le serveur de paiement sécurisé de la direction générale des finances publiques sur lequel vous pourrez finaliser votre paiement grâce à votre carte bancaire. Vous recevrez ensuite un courriel de confirmation de la transaction.

+
+
+

{% trans "Paiement en cours..." %}

+
+
+
    +
  • + + +
  • +
  • + + - + - + + {% trans "numéro invalide" %} +
  • +
  • + + , + € + {% trans "montant invalide" %} +
  • +
  • + + + {% trans "courriel invalide" %}
  • +
  • + +
  • +
+
+
+
diff --git a/compte_agglo_montpellier/urls.py b/compte_agglo_montpellier/urls.py index 61636e5..3ecc23c 100644 --- a/compte_agglo_montpellier/urls.py +++ b/compte_agglo_montpellier/urls.py @@ -1,5 +1,6 @@ from django.conf.urls import include, patterns, url from django.shortcuts import redirect +from django.conf import settings from portail_citoyen.urls import urlpatterns as pc_urls @@ -17,6 +18,11 @@ urlpatterns = patterns('', url('^announces/', include('portail_citoyen_announces.urls')), ) +if 'cmsplugin_blurp' in settings.INSTALLED_APPS: + urlpatterns += patterns('', + url('^blurps/', include('cmsplugin_blurp.urls')), + ) + urlpatterns += patterns('', url(r'^captcha/', include('captcha.urls')), url(r'^cms-ajax-text-plugin/', include('cms_ajax_text_plugin.urls')), diff --git a/requirements.txt b/requirements.txt index 02eb55a..dc8f851 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,10 @@ --allow-all-external --allow-unverified django-admin-tools -f https://repos.entrouvert.org/python-entrouvert.git/ --f http://repos.entrouvert.org/tipi-payment-plugin.git/ python-entrouvert git+git://repos.entrouvert.org/wcsinst#egg=wcsinst-0.9999999999<1.0 git+git://repos.entrouvert.org/portail-citoyen git+git://repos.entrouvert.org/portail-citoyen-announces#egg=portail-citoyen-announces-0.1.99999>=0.1,<0.2 -tipi-payment-plugin cmsplugin-embedded-menu==0.0.7 gunicorn demjson diff --git a/setup.py b/setup.py index a70b0ab..590fcda 100755 --- a/setup.py +++ b/setup.py @@ -137,7 +137,6 @@ setup(name="compte-agglo-montpellier", 'django-cms-ajax-text-plugin>=2.1.0' 'djangocms-link', 'djangocms-video', - 'tipi-payment-plugin', ], dependency_links = [ 'git+git://repos.entrouvert.org/portail-citoyen#egg=portail-citoyen-0.1.99999',