[GeoNode-devel] Geonode notifications (old and new)
cezary.statkiewicz at geo-solutions.it
Fri May 5 05:35:37 PDT 2017
I wanted to use geonode-notification app , but found it won't work with GeoNode master branch. I'd like to list problems I've bumped into and establish if my understanding is correct:
* app code itself seems to be a copy of old version of pinax-notifications (renamed from django-notification) . Besides renaming to geonode-notification, I can't tell if there are any functional differences between those two. Core functionality code seems to be not updated since then.
* settings template (notification/notice_settings.html) is present both in GeoNode  and in app , and are almost the same (except for button element in the bottom). This is clear code duplication.
* settings template inherits from notification/base.html, which inherits from account/base.html template, which is not present anywhere (not in GeoNode, not in geonode-notification/pinax-notifications). Some clue would be dependency on django-user-account in pinax app (which was also copied to geonode-user-accounts app in the past). So, settings view won't work, unless inheritance base is changed to existing template.
* integration code in GeoNode 2.6 ( for example) won't work and won't populate Notification types, because signals binding has different signature. Proper signal binding involves AppConfig instance, which was introduced in Django 1.7. Working integration code is described in updated pinax app (see below for similar problem in master branch).
* Current dev version of GeoNode introduced new notification dispatching mechanism , which uses notification app as a consumer (not directly, but mechanism is used in callbacks ). In GNIP PR, there are traces of refactoring notification app integration: , . Code from  uses deprecated post_syncdb signal . Instead it should use proper AppConfig or, as provided by Pinax app docs . I'm not sure why part of NoticeTypes are created in signal handler, while other are created with script.
* Some work for making this mechanism optional (or co-working with notification app) was started , but that PR seems to be in early stages.
My concerns and questions here are as follows:
1. Why geonode-notification app was created? It doesn't provide any additional functionality over original pinax apps.
2. It seems geonode-notificaiton app is not maintained at all (geonode-user-account app as well). Most of code base is 3-4 years old, written for pre-1.7 Django versions. There were few commits to update code with migrations, but that was whole contribution to this app. There are no issues (active nor solved), no pull requests. Is anyone using this app at all?
3. Wouldn't it be better to advice use of pinax apps directly here? As I wrote before, geonode-notification app for doesn't provide any new functionality.
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.
Senior Software Engineer
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.
More information about the geonode-devel