<div dir="ltr">Hello Julierme,<div>I'm going to start providing to you some pointers on how geonode-project Django template overrides GeoNode core ones.</div><div><br></div><div>1. The main URL entry "site_index.html"</div><div>------------------------------------------------------</div><div><br></div><div>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</div><div><br></div><div><a href="https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/site_index.html">https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/site_index.html</a><br></div><div><br></div><div><br></div><div>2. "site_index.html"</div><div>--------------------------</div><div>This one inherits from GeoNode "index.html"</div><div><br></div><div>see <a href="https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/site_index.html#L1">https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/site_index.html#L1</a></div><div><br></div><div>Nevertheless geonode-project also overrides the "geonode_base.html" (see <a href="https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/geonode_base.html">https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/geonode_base.html</a> ) which inherits the local "site_base.html" (see <a href="https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/site_base.html">https://github.com/geosolutions-it/geonode-project/blob/master/project_name/templates/site_base.html</a> ) </div><div><br></div><div>3. "site_base.html"</div><div>-------------------------</div><div><br></div><div>The geonode-project "site_base.html" inherits the GeoNode "base.html"</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno gio 16 ago 2018 alle ore 22:09 Julierme Pinheiro <<a href="mailto:juliermeopensourcedeveloper@gmail.com">juliermeopensourcedeveloper@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Dear users and contributors,</div><div><br></div><div>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.</div><div><br></div><div>Based on [1] I added the following lines to the geonode.conf which default configuration is found in [2]:</div><div><br></div><div> Alias /static/ /home/geonode/geonode_proj/geonode_proj/static_root/<br> Alias /templates/ /home/geonode/geonode_proj/geonode_proj/templates/<br> Alias /site_index.html /home/geonode/geonode_proj/geonode_proj/templates/site_index.html<br> Alias /site_base.html /home/geonode/geonode_proj/geonode_proj/templates/site_base.html</div><div><br></div><div><br></div><div>############################### New Configuration for site inheritance ###############################<br> <Directory "/home/geonode/geonode_proj/"><br> Order allow,deny<br> Options Indexes FollowSymLinks<br> Allow from all<br> Require all granted<br> </Directory><br><br> <Directory "/home/geonode/geonode_proj/geonode_proj/templates/"><br> Order allow,deny<br> Options Indexes FollowSymLinks<br> Allow from all<br> Require all granted<br> </Directory><br><br> <Directory "/home/geonode/geonode_proj/geonode_proj/static_root/"><br> Order allow,deny<br> Options Indexes FollowSymLinks<br> Allow from all<br> Require all granted<br> </Directory><br><br> <Directory "/home/geonode/geonode_proj/geonode_proj/"><br> <Files wsgi.py><br> Order deny,allow<br> Allow from all<br> Require all granted<br> </Files><br><br> Order allow,deny<br> Options Indexes FollowSymLinks<br> Allow from all<br> IndexOptions FancyIndexing<br> </Directory><br><br>#######################################################################################################3<br></div><div><br></div><div>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.</div><div><br></div><div>I also have to mention that WSGI being used is production WSGIScriptAlias / /home/geonode/my_geonode/my_geonode/wsgi.py.</div><div><br></div><div></div><div>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/. <br></div><div><br></div><div>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. <br></div><div><br></div><div>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.</div><div><br></div><div>Lastly, I have to say that I have production and geonode-project in the same virtualenv. <br></div><div><br></div><div>I am very confused. Could someone give me a hint on that please? And my apologies for bringing this topic to discussion again.</div><div><br></div><div>Thank you for your time in advance</div><div><br></div><div>Kind regards</div><div><br></div><div>Julierme<br></div><div><br></div><br><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>[1] <a href="https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/modwsgi/" target="_blank">https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/modwsgi/</a></div><div>[2] <a href="http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/setup_configure_httpd.html" target="_blank">http://docs.geonode.org/en/master/tutorials/install_and_admin/geonode_install/setup_configure_httpd.html</a><br></div></div>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-size:11pt;white-space:pre-wrap">==</span><br></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Ing. Alessio Fabiani</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">@alfa7691</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Founder/Technical Lead</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">GeoSolutions S.A.S.</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Via di Montramito 3/A - </span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">55054 Massarosa (LU) - </span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">Italy</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">phone: +39 0584 962313</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">fax: +39 0584 1660272</span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">mob: +39 331 6233686</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#222222;background-color:#ffffff;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">-------------------------------------------------------</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">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.</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap">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.</span><span style="font-size:11pt;font-family:Arial;color:#000000;background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap"><br></span></p></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div>