<div dir="ltr"><div>Hi Alessio,</div><div><br></div><div>Thank you very much for your reply and explanation. I can see all your highlights when, according to [1] / fourth marker bullet, I use the WSGI.py of geonode-project <WSGIScriptAlias / /home/geonode/geonode_proj/<wbr>geonode_proj/wsgi.py>. I see site_base.css, site_index.html and site_base.html being used. However, pointing to geonode-project wsgi.py, it will retrieve geonode-project settings.py. And there is a problem, because I need the production settings.py. <br></div><div><br></div><div>In the other hand, If I point to geonode production wsgi.py, it will retrieve production settings.py, and that is what I want. Furthermore, yet, using production wsgi.py, I created an Alias to geonode-project static_root folder in order to have apache2 retrieving site_base.css <Alias /static/ /home/geonode/geonode_proj/<wbr>geonode_proj/static_root> and fine, site_base.css is being inherited, while production wsgi.py is being used. <br></div><div><br></div><div>The same analogy, pointing to production wsgi.py which retrieves production's settings.py, I created an Alias to geonode_project subdirectories in order to get its urls.py and templates and I added the <Directory>:<br></div><div> <br></div><div> Alias /geonode_proj/ /home/geonode/geonode_proj/geonode_proj/<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<br> Alias /geonode_base.html /home/geonode/geonode_proj/geonode_proj/templates/geonode_base.htm</div><div> Alias /static/ /home/geonode/geonode_proj/geonode_proj/static_root/<br></div><div><br></div><div> <Directory "/home/geonode/geonode_proj/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></div><div><br></div><div> <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></div><div><br></div><div>Final Response: Using geonode production wsgi.py, and Alias to geonode_project/static_root and Alias to geonode_project/templates, geonode production retrieves site_base.css in geonode_project, but geonode_project site_index.html, site_base.html and geonode_base.html.</div><div><br></div><div>Hypotheses: geonode-production still using its default site_index.html, site_base.html and geonode_base.html.</div><div><br></div><div>Test: I copied geonode-project site_index.html, site_base.html to geonode-production's template folder. <br></div><div><br></div><div><br></div><div>Result: geonode-production site changed. <br></div><div><br></div><div><br></div><div><br></div><div>Conclusions: according to the Result, Test and Final Response, I concluded that using geonode-production's wsgi, and Alias to geonode-project static_root and templates, geonode-production changes its css, but its templates (index and base (footer and header)).</div><div><br></div><div><br></div><div>What I understood so far:</div><div><br></div><div>1 - Geonode Production installed in a virtualenv</div><div><br></div><div>2 - Geonode Project installed in the same Geonode Production virtualenv</div><div><br></div><div>3 - How to change Production site</div><div> </div><div>3.1 - Edit site_base.css in geonode_project/static</div><div>3.2 - Edit site_index.html and site_base.html in geonode_project/templates</div><div>3.3 - Collect the files through python manage.py collectstatic</div><div><br></div><div>4 - Edit geonode.conf # <a href="http://geonode.org/dev-workshop/#/8/3">http://geonode.org/dev-workshop/#/8/3</a></div><div><br></div><div>4.1 .Fourth bullet in # <a href="http://geonode.org/dev-workshop/#/8/3">http://geonode.org/dev-workshop/#/8/3</a>. - edit <code>/etc/apache2/sites-enabled/geonode.conf</code> replacing the wsgi path to the <code>my_geonode/my_geonode/wsgi.py</code><br></div><div><br></div><div>In here, says to point to geonode-project wsgi.py, but doing that, production settings.py is out of the flow, if I am not wrong. Though I see all the changes done through site_base.css, site_index.html, site_base.html.</div><div><br></div><div>4.2. Fifth bullet in # <a href="http://geonode.org/dev-workshop/#/8/3">http://geonode.org/dev-workshop/#/8/3</a> - <pre><code class="gmail-lang-conf"><Directory "/path/to/my_geonode/">
Order allow,deny
Require all granted
</Directory></code></pre></div><div><br></div><div>I did all that except, I am pointing to geonode production wsgi.py in order to use production settings.py. Besides the Alias created to geonode-project to have its static_root and templates. CSS is being retrieved, but site_index.html and site_base.html.</div><div><br></div><div><br></div><div>Thank you very much for your time and patience.<br></div><div><br></div><div>Kind regards</div><div><br></div><div>Julierme<br></div><div><br></div><div><br></div><div><br></div><div>[1] <a href="http://geonode.org/dev-workshop/#/8/3">http://geonode.org/dev-workshop/#/8/3</a><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 17, 2018 at 5:32 AM, Alessio Fabiani <span dir="ltr"><<a href="mailto:alessio.fabiani@geo-solutions.it" target="_blank">alessio.fabiani@geo-solutions.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>------------------------------<wbr>------------------------</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" target="_blank">https://github.com/<wbr>geosolutions-it/geonode-<wbr>project/blob/master/project_<wbr>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" target="_blank">https://github.com/<wbr>geosolutions-it/geonode-<wbr>project/blob/master/project_<wbr>name/templates/site_index.<wbr>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" target="_blank">https://github.com/<wbr>geosolutions-it/geonode-<wbr>project/blob/master/project_<wbr>name/templates/geonode_base.<wbr>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" target="_blank">https://github.com/<wbr>geosolutions-it/geonode-<wbr>project/blob/master/project_<wbr>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><div class="h5"><div dir="ltr">Il giorno gio 16 ago 2018 alle ore 22:09 Julierme Pinheiro <<a href="mailto:juliermeopensourcedeveloper@gmail.com" target="_blank">juliermeopensourcedeveloper@<wbr>gmail.com</a>> ha scritto:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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/<wbr>css/site_base.css and ./geonode_proj/templates/site_<wbr>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/<wbr>geonode_proj/static_root/<br> Alias /templates/ /home/geonode/geonode_proj/<wbr>geonode_proj/templates/<br> Alias /site_index.html /home/geonode/geonode_proj/<wbr>geonode_proj/templates/site_<wbr>index.html<br> Alias /site_base.html /home/geonode/geonode_proj/<wbr>geonode_proj/templates/site_<wbr>base.html</div><div><br></div><div><br></div><div>##############################<wbr># New Configuration for site inheritance ##############################<wbr>#<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/<wbr>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/<wbr>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/<wbr>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>##############################<wbr>##############################<wbr>##############################<wbr>#############3<br></div><div><br></div><div>Within this configuration, geonode production is inheriting the site_base.css in ./geonode-proj/static_root/<wbr>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_<wbr>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_<wbr>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_<wbr>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.<wbr>com/en/2.1/howto/deployment/<wbr>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/<wbr>master/tutorials/install_and_<wbr>admin/geonode_install/setup_<wbr>configure_httpd.html</a><br></div></div></div></div>
______________________________<wbr>_________________<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/<wbr>mailman/listinfo/geonode-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-151137419098826897gmail_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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;white-space:pre-wrap"><a href="https://maps.google.com/?q=Via+di+Montramito+3/A+-++55054+%C2%A0Massarosa&entry=gmail&source=g">Via di Montramito 3/A - </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-wrap;white-space:pre-wrap"><a href="https://maps.google.com/?q=Via+di+Montramito+3/A+-++55054+%C2%A0Massarosa&entry=gmail&source=g">55054 Massarosa</a> (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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;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-wrap;white-space:pre-wrap"><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/<wbr>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-wrap;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-wrap;white-space:pre-wrap">------------------------------<wbr>-------------------------</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-wrap;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-wrap;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-wrap;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-wrap;white-space:pre-wrap"><br></span></p></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br></div>