<div dir="ltr">Hi Cezary,<div><br></div><div>thanks for the good summary of issues, this will be useful.</div><div>As you said the notification app will be completely rewritten soon and I think that your suggestions are precious.</div><div><br></div><div>Have you tried the 2.6.x branch too?</div><div><br></div><div>To answer your questions, the reason of forking the apps was for two reasons:</div><div>- we needed to change few small things to make them compatible with geonode like [1]</div><div>- we needed to push them to pypi and launchpad as packages.</div><div><br></div><div>and some of them didn't seem maintained anymore when we did it.</div><div>They are all used by the geonode ubuntu installer and python installer.</div><div><br></div><div>[1] <a href="https://github.com/GeoNode/geonode-notification/commit/41b1b9acbb4ba9f621c1adcdceef692144959b51">https://github.com/GeoNode/geonode-notification/commit/41b1b9acbb4ba9f621c1adcdceef692144959b51</a></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-05 14:35 GMT+02:00 Cezary Statkiewicz <span dir="ltr"><<a href="mailto:cezary.statkiewicz@geo-solutions.it" target="_blank">cezary.statkiewicz@geo-solutions.it</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Hi,<br>
<br>
I wanted to use geonode-notification app [1], 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:<br>
<br>
* app code itself seems to be a copy of old version of pinax-notifications (renamed from django-notification) [2]. 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.<br>
<br>
* settings template (notification/notice_settings.<wbr>html) is present both in GeoNode [3] and in app [4], and are almost the same (except for button element in the bottom). This is clear code duplication.<br>
<br>
* 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-<wbr>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.<br>
<br>
* integration code in GeoNode 2.6 ([5] 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).<br>
<br>
* Current dev version of GeoNode introduced new notification dispatching mechanism [6], which uses notification app as a consumer (not directly, but mechanism is used in callbacks [13]). In GNIP PR, there are traces of refactoring notification app integration: [7], [8]. Code from [7] uses deprecated post_syncdb signal [9][10]. Instead it should use proper AppConfig or, as provided by Pinax app docs [11]. I'm not sure why part of NoticeTypes are created in signal handler, while other are created with script.<br>
<br>
* Some work for making this mechanism optional (or co-working with notification app) was started [12], but that PR seems to be in early stages.<br>
<br>
My concerns and questions here are as follows:<br>
<br>
1. Why geonode-notification app was created? It doesn't provide any additional functionality over original pinax apps.<br>
<br>
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?<br>
<br>
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.<br>
<br>
References:<br>
<br>
[1] <a href="https://github.com/GeoNode/geonode-notification" rel="noreferrer" target="_blank">https://github.com/GeoNode/<wbr>geonode-notification</a><br>
[2] <a href="https://github.com/pinax/pinax-notifications" rel="noreferrer" target="_blank">https://github.com/pinax/<wbr>pinax-notifications</a><br>
[3] <a href="https://github.com/GeoNode/geonode/blob/2.6.x/geonode/templates/notification/notice_settings.html" rel="noreferrer" target="_blank">https://github.com/GeoNode/<wbr>geonode/blob/2.6.x/geonode/<wbr>templates/notification/notice_<wbr>settings.html</a><br>
[4] <a href="https://github.com/GeoNode/geonode-notification/blob/master/notification/templates/notification/notice_settings.html" rel="noreferrer" target="_blank">https://github.com/GeoNode/<wbr>geonode-notification/blob/<wbr>master/notification/templates/<wbr>notification/notice_settings.<wbr>html</a><br>
[5] <a href="https://github.com/GeoNode/geonode/blob/5bd1bfa794d92bb47b2e113f22a1fe1ed1257ff4/geonode/layers/management/__init__.py#L55" rel="noreferrer" target="_blank">https://github.com/GeoNode/<wbr>geonode/blob/<wbr>5bd1bfa794d92bb47b2e113f22a1fe<wbr>1ed1257ff4/geonode/layers/<wbr>management/__init__.py#L55</a><br>
[6] <a href="https://github.com/GeoNode/geonode/issues/2889" rel="noreferrer" target="_blank">https://github.com/GeoNode/<wbr>geonode/issues/2889</a><br>
[7] <a href="https://github.com/GeoNode/geonode/pull/2911/files#diff-3efadb31867c7c011d76f234bf4f3cf9R27" rel="noreferrer" target="_blank">https://github.com/GeoNode/<wbr>geonode/pull/2911/files#diff-<wbr>3efadb31867c7c011d76f234bf4f3c<wbr>f9R27</a><br>
[8] <a href="https://github.com/GeoNode/geonode/pull/2911/files#diff-2e37d4a8264969d920999e14976b60a1R129" rel="noreferrer" target="_blank">https://github.com/GeoNode/<wbr>geonode/pull/2911/files#diff-<wbr>2e37d4a8264969d920999e14976b60<wbr>a1R129</a><br>
[9] <a href="https://github.com/GeoNode/geonode/pull/2911/files#diff-3efadb31867c7c011d76f234bf4f3cf9R35" rel="noreferrer" target="_blank">https://github.com/GeoNode/<wbr>geonode/pull/2911/files#diff-<wbr>3efadb31867c7c011d76f234bf4f3c<wbr>f9R35</a><br>
[10] <a href="https://docs.djangoproject.com/en/1.8/ref/signals/#post-syncdb" rel="noreferrer" target="_blank">https://docs.djangoproject.<wbr>com/en/1.8/ref/signals/#post-<wbr>syncdb</a><br>
[11] <a href="https://github.com/pinax/pinax-notifications/blob/master/docs/usage.md#creating-notice-types" rel="noreferrer" target="_blank">https://github.com/pinax/<wbr>pinax-notifications/blob/<wbr>master/docs/usage.md#creating-<wbr>notice-types</a><br>
[12] <a href="https://github.com/GeoNode/geonode/pull/2995" rel="noreferrer" target="_blank">https://github.com/GeoNode/<wbr>geonode/pull/2995</a><br>
[13] <a href="https://github.com/GeoNode/geonode/pull/2911/files#diff-65e028487582782a9d3e44fb6a9884bcL165" rel="noreferrer" target="_blank">https://github.com/GeoNode/<wbr>geonode/pull/2911/files#diff-<wbr>65e028487582782a9d3e44fb6a9884<wbr>bcL165</a><br>
<br>
<br>
Best Regards,<br>
Cezary Statkiewicz<br>
<br>
--<br>
==<br>
GeoServer Professional Services from the experts!<br>
Visit <a href="http://goo.gl/it488V" rel="noreferrer" target="_blank">http://goo.gl/it488V</a> for more information.<br>
==<br>
Cezary Statkiewicz<br>
Senior Software Engineer<br>
<br>
GeoSolutions S.A.S.<br>
Via di Montramito 3/A<br>
55054 Massarosa (LU)<br>
Italy<br>
phone: <a href="tel:%2B39%200584%20962313" value="+390584962313">+39 0584 962313</a><br>
fax: <a href="tel:%2B39%200584%201660272" value="+3905841660272">+39 0584 1660272</a><br>
<br>
<a href="http://www.geo-solutions.it" rel="noreferrer" target="_blank">http://www.geo-solutions.it</a><br>
<a href="http://twitter.com/geosolutions_it" rel="noreferrer" target="_blank">http://twitter.com/<wbr>geosolutions_it</a><br>
<br>
------------------------------<wbr>-------------------------<br>
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003<br>
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.<br>
<br>
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.<br>
______________________________<wbr>_________________<br>
geonode-devel mailing list<br>
<a href="mailto:geonode-devel@lists.osgeo.org">geonode-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/geonode-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Simone </div>
</div>