[GeoNode-users] Geonode-Project Inherited by Geonode Production

Alessio Fabiani alessio.fabiani at geo-solutions.it
Fri Aug 17 01:32:07 PDT 2018


Hello Julierme,
I'm going to start providing to you some pointers on how geonode-project
Django template overrides GeoNode core ones.

1. The main URL entry "site_index.html"
------------------------------------------------------

This is the very first thing to consider. geonode-project overrides the
default GeoNode main index through the "urls.py" file. Instead of using the
default GeoNode one, it says to Django to use its own defined here

https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/site_index.html


2. "site_index.html"
--------------------------
This one inherits from GeoNode "index.html"

see
https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/site_index.html#L1

Nevertheless geonode-project also overrides the "geonode_base.html" (see
https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/geonode_base.html
) which inherits the local "site_base.html" (see
https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/site_base.html
)

3. "site_base.html"
-------------------------

The geonode-project "site_base.html" inherits the GeoNode "base.html"



Il giorno gio 16 ago 2018 alle ore 22:09 Julierme Pinheiro <
juliermeopensourcedeveloper at gmail.com> ha scritto:

> Dear users and contributors,
>
> I am still trying to figure out the way Apache2/geonode.conf is configured
> in order to have geonode production inheriting the changes in
> geonode-project, mainly ./geonode_proj/static_root/css/site_base.css and
> ./geonode_proj/templates/site_index.html and site_base.html.
>
> Based on [1]  I added the following lines to  the geonode.conf which
> default configuration is found in [2]:
>
>     Alias /static/ /home/geonode/geonode_proj/geonode_proj/static_root/
>     Alias /templates/ /home/geonode/geonode_proj/geonode_proj/templates/
>     Alias /site_index.html
> /home/geonode/geonode_proj/geonode_proj/templates/site_index.html
>     Alias /site_base.html
> /home/geonode/geonode_proj/geonode_proj/templates/site_base.html
>
>
> ############################### New Configuration for site inheritance
> ###############################
>     <Directory "/home/geonode/geonode_proj/">
>         Order allow,deny
>         Options Indexes FollowSymLinks
>         Allow from all
>         Require all granted
>     </Directory>
>
>     <Directory "/home/geonode/geonode_proj/geonode_proj/templates/">
>         Order allow,deny
>         Options Indexes FollowSymLinks
>         Allow from all
>         Require all granted
>     </Directory>
>
>     <Directory "/home/geonode/geonode_proj/geonode_proj/static_root/">
>         Order allow,deny
>         Options Indexes FollowSymLinks
>         Allow from all
>         Require all granted
>     </Directory>
>
>     <Directory "/home/geonode/geonode_proj/geonode_proj/">
>          <Files wsgi.py>
>              Order deny,allow
>              Allow from all
>              Require all granted
>          </Files>
>
>         Order allow,deny
>         Options Indexes FollowSymLinks
>         Allow from all
>         IndexOptions FancyIndexing
>     </Directory>
>
>
> #######################################################################################################3
>
> Within this configuration, geonode production is inheriting the
> site_base.css in ./geonode-proj/static_root/css/, but site_index.html and
> site_base.html.
>
> I also have to mention that WSGI being used is production WSGIScriptAlias
> / /home/geonode/my_geonode/my_geonode/wsgi.py.
>
> My first guest is: although I have created all the Alias path (including
> the templates directory) as showed above, Apache2 still looking for the
> site_index.html and site_base.html in the production folder
> /home/geonode/my_geonode/my_geonode/templates/.
>
> One thing I can not understand is: I created the Alias for geonode-project
> static_root and Apache is doing exactly what I want: getting the
> site_base.css. But why is not doing for the geonode_project templates.
>
> To test my first guest, I copied site_index.html and site_base.html to
> production path /home/geonode/my_geonode/my_geonode/templates and the
> response was a request to site_base.html, but site_index.html.
>
> Lastly, I have to say that I have production and geonode-project in the
> same virtualenv.
>
> I am very confused. Could someone give me a hint on that please? And my
> apologies for bringing this topic to discussion again.
>
> Thank you for your time in advance
>
> Kind regards
>
> Julierme
>
>
>
>
>
>
>
>
> [1] https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/modwsgi/
> [2]
> http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/setup_configure_httpd.html
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-users
>


-- 

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==
Ing. Alessio Fabiani

@alfa7691
Founder/Technical Lead


GeoSolutions S.A.S.
Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686


http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.


This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20180817/116c4f3b/attachment-0001.html>


More information about the geonode-users mailing list