[GeoNode-devel] Practices on maintaining a geonode project, PR: "Align to GeoNode master 4.2.0"

Toni Schönbuchner toni.schoenbuchner at csgis.de
Mon Jul 31 09:36:15 PDT 2023


Hi Henning,

Geonode-project offers an easier setup for development, allowing you to add your own URLs, apps, and more on top of the Geonode core. However, there are some downsides of using geonode-project, such as the potential issues with upgrading outdated projects, which can become cumbersome. In the best-case scenario, you may only need to rebuild your containers, but sometimes, I have had to compare a fresh project with mine to identify changes, typically related to setting variables. Another approach I've used is creating patch files using diff, which works but can be time-consuming in certain situations.

For the sake of completeness:

You could also fork the project, and locally replace needed parts with smudge and clean filters when deploying:
[filter "updateProjectName"]
	smudge = sed \"s/{{[[:blank:]]*project_name[[:blank:]]*}}/my_geonode/g\"
	clean = sed  \“s/my_geonode/{{project_name}}/g\“ 

Doing so you can keep the git history of the upstream project!
This is what I used for years. But which in the end felt not intuitiv …
(Read more about it here: https://bignerdranch.com/blog/git-smudge-and-clean-filters-making-changes-so-you-dont-have-to/)

Finally I switched from geonode-project to using the core for all clients. Here I prefer avoiding forking whenever possible, opting instead to extend geonode with a custom app where I can include my code, override things and patch settings using apps.py, among other things.

I have an example of how to inject your own URLs and middleware without modifying urls.py or the middleware from geonode core. You can find it in this gist on GitHub: https://gist.github.com/t-book/b0ef421d16bcd67f494b3e2943c44ad4
By the way, this is how geonode-mapstore-client integrates itself.

Hope this helps a bit.

Best regards,

Toni




> I just read the pull requests "Align to GeoNode master (4.2.0) and improve/fix docker initialization" on geonode-project [0] and geonode upstream [1]. They include a lot of good changes on configuration and Docker setup. I added my question as a comment [2], but we may discuss this right here, as well. What are your experience on using geonode-project, in particular with regard on updating it to use a new GeoNode version? To my understanding, you would have to track the commits since your project initialization and apply all the changes manually. Is there better way to maintain a geonode-project, and do you have good reasons to prefer geonode-project over a simple geonode fork? Looking forward to read your opinions and shared experience.




-----------------------------------------------
CSGIS

-----------------------------------------------
Spinnereistraße 7
Halle 18 04179 Leipzig
-----------------------------------------------
Web https://csgis.de
-----------------------------------------------

Hinweis gemäß § 33 BDSG
Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist ausschließlich für den 
Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie diese E-Mail versehentlich 
erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und löschen Sie diese Nachricht 
von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung, Vervielfältigung, Veränderung, 
Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.



More information about the geonode-devel mailing list