<div dir="ltr">correct but is a big and heavy work. as said, creating you own fork of GeoNode may be a better solution! </div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-02 12:02 GMT+01:00 Toni Schönbuchner <span dir="ltr"><<a href="mailto:toni.schoenbuchner@csgis.de" target="_blank">toni.schoenbuchner@csgis.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Dear Simone,<div><br></div><div>thanks for your fast reply! Would you kindly check if I understood your advise correctly and picked the right places?</div><div><br></div><div><blockquote type="cite"><div dir="ltr"><div>You have to define your own url, views etc. </div></div></blockquote></div><div><br></div><div>The metadata page is managed in first instance of layers app. </div><div><ul class="m_-3504203023084774167MailOutline"><li>layers/urls.py points to layers/views.py </li><li>layers/views.py uses layers/models.py </li><li>layers/model.py inherits from <b>base</b>/models.py</li></ul></div><div><br></div><div>This means it could work like this:</div><div><br></div><div><ol class="m_-3504203023084774167MailOutline"><li>copy apps: <b>/base</b> and <b>/layers</b> to <b>/var/www/my_project</b></li><li>Routing views: change <b> <b>my_project/</b>layers/<wbr>urls.py</b> to use <b>my_project/layers/views.py</b></li><ol><li> <a href="https://github.com/GeoNode/geonode/blob/2.4.x/geonode/layers/urls.py#L30" target="_blank">https://github.com/GeoNode/<wbr>geonode/blob/2.4.x/geonode/<wbr>layers/urls.py#L30</a> </li></ol><li>models: change <b><b>my_project</b>/layers/<wbr>views.py</b> to use <b>my_project/layers/models.py</b></li><ol><li><a href="https://github.com/GeoNode/geonode/blob/2.4.x/geonode/layers/views.py#L47" target="_blank">https://github.com/GeoNode/<wbr>geonode/blob/2.4.x/geonode/<wbr>layers/views.py#L47</a></li></ol><li>change <b>my_project/models.py</b> to use <b>my_project/base/models.py</b></li><ol><li><a href="https://github.com/GeoNode/geonode/blob/2.4.x/geonode/layers/models.py#L33" target="_blank">https://github.com/GeoNode/<wbr>geonode/blob/2.4.x/geonode/<wbr>layers/models.py#L33</a></li></ol></ol></div><div><br></div><div>Correct?</div><div><br></div><div><div>Thanks a lot,</div><div><br></div><div>Toni</div>
<br><div><blockquote type="cite"><div>Am 02.02.2017 um 10:53 schrieb Simone Dalmasso <<a href="mailto:simone.dalmasso@gmail.com" target="_blank">simone.dalmasso@gmail.com</a>>:</div><br class="m_-3504203023084774167Apple-interchange-newline"><div><div dir="ltr">Hi, the way to use your own models instead of the default ones is quite tricky.<div><br></div><div>You have to define your own url, views etc. This is one of the cases where a fork could be an option to consider.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-02 10:26 GMT+01:00 Toni Schönbuchner <span dir="ltr"><<a href="mailto:toni.schoenbuchner@csgis.de" target="_blank">toni.schoenbuchner@csgis.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear List,<br>
<br>
on Geonode 2.4 (Ubuntu 14.04) I´d like to extend the metadata details page (route /metadata).<br>
This works perfectly by extending the base model which lives under:<br>
<br>
/usr/local/lib/python2.7/dist-<wbr>packages/geonode/base/models.p<wbr>y<br>
<br>
To not hack the core we created a new project under /var/www/my_project<br>
and copied the base app there (/var/www/my_project/base).<br>
<br>
Template overrides work as expected but unfortunately it seems project models are ignored<br>
(and still the core model is utilized).<br>
<br>
What is the recommended way to customize models without changing the core?<br>
<br>
Thanks,<br>
<br>
Toni<br>
______________________________<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/mailma<wbr>n/listinfo/geonode-users</a><br>
</blockquote></div><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_-3504203023084774167gmail_signature" data-smartmail="gmail_signature">Simone </div>
</font></span></div>
</div></blockquote></div><br></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Simone </div>
</div>