<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Stefano,</p>
<p><br>
</p>
<p>You don't have to name site_base.html or index.html the base
templates of your apps. You should name them in a way like:
app1_base.html. So your directory tree will look like this:</p>
<p><font size="2"><font face="Arial">-virtual_environment<br>
-geonode<br>
-geonode<br>
-templates<br>
-base.html<br>
-index.html<br>
-custom_project<br>
-app1<br>
-templates<br>
-app1_base.html (extends site_base.html which
extends base.html)<br>
-app1_index.html (if It's required)(extends
site_index.html which extends index.html)<br>
-app2<br>
-templates<br>
</font></font><font size="2"><font face="Arial">-app2_base.html
(extends site_base.html which extends base.html)<br>
-app2_index.html </font></font><font size="2"><font
face="Arial"><font size="2"><font face="Arial"> (if It's
required)</font></font> (extends site_index.html which
extends index.html)</font></font></p>
<p><font size="2"><font face="Arial"><br>
</font></font></p>
<p><font size="2"><font face="Arial">As GeoNode is composed of many
apps see for example the directory structure of "layers" app</font></font></p>
<p><font size="2"><font face="Arial"><br>
</font></font></p>
<p><font size="2"><font face="Arial">site_base.html and index_base.html
is the base template of your GeoNode project in order to
customize your site.</font></font></p>
<p><font size="2"><font face="Arial"><br>
</font></font></p>
<p><font size="2"><font face="Arial">Best Regards,</font></font></p>
<p><font size="2"><font face="Arial">George<br>
</font></font></p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 14/11/2017 02:48 μμ,
<a class="moz-txt-link-abbreviated" href="mailto:Stefano.LUONI@ext.ec.europa.eu">Stefano.LUONI@ext.ec.europa.eu</a> wrote:<br>
</div>
<blockquote type="cite"
cite="mid:3AFFFE5797956B4383DADD653F22BD09A5990F@S-DC-ESTJ02-J.net1.cec.eu.int">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;"><font size="2"><font face="Arial">Hi
everyone,
<br>
<br>
I know that it sounds more of a Django related question, but
as a non Django expert I'm a bit confused about the ways to
extend templates.<br>
<br>
<u>The problem</u><br>
In a development environment, suppose we have created a new
app and suppose we call it
<b>app1</b>; we can customise the page look by editing <b>site_base.html
</b>for global parts,
<b>index.html </b>or other specific templates, knowing that
site_base will extend
<b>base.html </b>from geonode/templates folder, and so on.<br>
What if we create another custom app and we call it <b>app2</b>:
how can we define templates that could inherit from what was
already defined by
<b>app1</b>?<br>
<br>
The directory tree looks like this:<br>
<br>
-virtual_environment<br>
-geonode<br>
-geonode<br>
-templates<br>
-base.html<br>
-index.html<br>
-custom_project<br>
-app1<br>
-templates<br>
-site_base.html (extends base.html)<br>
-site_index.html (extends index.html)<br>
-app2<br>
-templates<br>
-new_template => how to extend
site_base.html?<br>
<br>
The issue I'm facing is that as soon as I enable
context_processors in my settings.py, I get an error because
the Geonode base.html template is not found (from extends
base.html in geonode/base/templates/geonode_base.html).<br>
I tried using different configurations with loaders like
app_namespace or apptemplates with no luck.<br>
<br>
Do you have any suggestions for solving this?<br>
<br>
Thanks,<br>
<br>
Stefano<br>
<br>
<br>
<br>
<br>
</font></font></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
geonode-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:geonode-users@lists.osgeo.org">geonode-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/geonode-users">https://lists.osgeo.org/mailman/listinfo/geonode-users</a>
</pre>
</blockquote>
<br>
</body>
</html>