geonode-client icon indicating copy to clipboard operation
geonode-client copied to clipboard

Can't view map template

Open bssher opened this issue 6 years ago • 8 comments

I did the following.

Add django-geonode-client to your requirements.txt Add geonode-client to your INSTALLED_APPS

For GeoNode Change the LAYER_PREVIEW_LIBRARY to react

But I don't see the react map template in my new maps. What step am I missing?

bssher avatar Aug 20 '18 20:08 bssher

Update, I got the template to load, but receive the following error. I am using Geonode 2.9

TemplateSyntaxError at /maps/new

'future' is not a registered tag library. Must be one of:

bssher avatar Aug 21 '18 17:08 bssher

It is not a GeoNode issue but a geonode-client one.

It depends on this

https://github.com/GeoNode/geonode-client/blob/master/geonode-client/templates/geonode-client/map_new.html#L2

future is not allowed anymore on Django 1.11.11 as far as I know.

afabiani avatar Aug 22 '18 08:08 afabiani

sorry, closed by mistake. reopening

afabiani avatar Aug 22 '18 08:08 afabiani

@milafrerichs any ideas on this one?

bartvde avatar Aug 22 '18 08:08 bartvde

Since it seems to be removed with Django 1.9, GeoNode 2.8 should work without problems (@bssher can you confirm?) . For 2.9 we could check if we can just remove it and use url directly as the error suggests?

t-book avatar Aug 23 '18 07:08 t-book

I don’t have any installs of 2.8. I removed the future tag fromc2.9 with no luck, but maybe not in the correct place?

On Thu, Aug 23, 2018 at 12:16 AM Toni [email protected] wrote:

Since it seems to be removed since Django 1.9 GeoNode 2.8 should work without problems (@bssher https://github.com/bssher can you confirm?) . For 2.9 we could check if we just remove it and use url directly as the error suggests?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/GeoNode/geonode-client/issues/191#issuecomment-415316379, or mute the thread https://github.com/notifications/unsubscribe-auth/ATiztklqnXhG_kPHMqrNuRzqY3nl3kZQks5uTlbdgaJpZM4WEsdw .

bssher avatar Aug 23 '18 12:08 bssher

@bssher since Django 1.9 url is autoloaded. Just tested with master branch - as said you have to remove the future tag.

  • For map_detail remove this line https://github.com/GeoNode/geonode-client/blob/master/geonode-client/templates/geonode-client/map_detail.html#L2
  • for the creation of new map here: https://github.com/GeoNode/geonode-client/blob/master/geonode-client/templates/geonode-client/map_new.html#L2

In 2.8.0 this problem does not occur as here Django 1.8 is in use. I do not want to make a PR right now as this would break 2.8 ?! @bartvde @milafrerichs maybe it would be good to setup a branch for each target version or some conditional import?

t-book avatar Aug 23 '18 13:08 t-book

hi, thanks for reporting this. I will take a look and maybe prepare a PR and tags for specific versions.

milafrerichs avatar Aug 24 '18 07:08 milafrerichs