[GeoNode-devel] [GeoNode-users] template inheritance

Simone Dalmasso simone.dalmasso at gmail.com
Thu Oct 20 04:44:39 PDT 2016


Francesco agree.  Unfortunately it is not possible to use absolute paths in
templates. So the overextend seems a solution.

Il giovedì 20 ottobre 2016, Francesco Bartoli <xbartolone at gmail.com> ha
scritto:

> Hi devs,
>
> I found that circular inheritance from a geonode-project perspective is
> not well managed yet. Just to explain better the issue:
>
> *[geonode]*
> geonode/base/templates/base/resourcebase_info_panel.html
>
> {% block morecontent %}
>
> <some content>
>
> {% endblock %}
>
> *[my_geonode_project]*
> my_geonode_project/templates/base/resourcebase_info_panel.html
>
> {% extends "base/resourcebase_info_panel.html" %}
>
> {% block morecontent %}
>
> {{ block.super }}
> <div>hello geonode developers</div>
>
> {% endblock %}
>
> This configuration ends up in such an error:
>
> "RuntimeError: maximum recursion depth exceeded while calling a Python
> object”
>
> I have tried to adopt this approach [1] but doesn’t resolve in my case,
> the only way is to follow the alternative one with django-overextends
> <http://github.com/stephenmcd/django-overextends>. Long story short I’d
> like to add this latter to geonode-project
> <https://github.com/GeoNode/geonode-project> as dependency and a bit of
> documentation how to use it for extending core templates.
>
> Any objections?
>
> Thanks,
> Francesco
>
> [1] https://code.djangoproject.com/wiki/ExtendingTemplates#
> Extendingtemplates
>
> Il giorno 20/ott/2016, alle ore 10:05, Francesco Bartoli <
> xbartolone at gmail.com
> <javascript:_e(%7B%7D,'cvml','xbartolone at gmail.com');>> ha scritto:
>
> Thanks Simone. I’m going to move this discussion to the dev list because
> at the moment the circular inheritance wouldn’t work well from
> geonode-project, at least from what I investigated so far.
>
> Francesco
>
> Il giorno 20/ott/2016, alle ore 07:23, Simone Dalmasso <
> simone.dalmasso at gmail.com
> <javascript:_e(%7B%7D,'cvml','simone.dalmasso at gmail.com');>> ha scritto:
>
> Francesco, I don't see that harmful. Please go on.
>
> 2016-10-19 9:03 GMT+02:00 Francesco Bartoli <xbartolone at gmail.com
> <javascript:_e(%7B%7D,'cvml','xbartolone at gmail.com');>>:
>
>> Hi all,
>>
>> I'd like to add 'block' syntax to the template of the info panel
>> in the core resourcebase_info_panel.html in order to extend it
>> with additional information. Do you think this can be useful to merge in
>> the core as at the moment I don't know how a sane approach would be from a
>> django-project?
>>
>> Any different idea?
>>
>> Thanks,
>> Francesco
>>
>> Sent from Nylas N1
>> <https://link.nylas.com/link/43o9gzlmd58gqwkxv3di3wjcc/local-b8e3f308-9240/0?redirect=https%3A%2F%2Fnylas.com%2Fn1%3Fref%3Dn1&r=Z2Vvbm9kZS11c2Vyc0BsaXN0cy5vc2dlby5vcmc=>,
>> the extensible, open source mail client.
>> _______________________________________________
>> geonode-users mailing list
>> geonode-users at lists.osgeo.org
>> <javascript:_e(%7B%7D,'cvml','geonode-users at lists.osgeo.org');>
>> http://lists.osgeo.org/mailman/listinfo/geonode-users
>>
>>
>
>
> --
> Simone
>
>
>
>

-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20161020/ed5f70f8/attachment.html>


More information about the geonode-devel mailing list