Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROD] Django4 Admin geometry fields #2166

Closed
szabozoltan69 opened this issue Jun 4, 2024 · 2 comments
Closed

[PROD] Django4 Admin geometry fields #2166

szabozoltan69 opened this issue Jun 4, 2024 · 2 comments
Assignees
Labels

Comments

@szabozoltan69
Copy link
Contributor

szabozoltan69 commented Jun 4, 2024

Issue

Recently it is not possible to update geometry fields (centroid, boundary box) from Django Admin.

In DJango3 there was also a hidden textarea for e.g. centroids, with id="id_centroid":

<a href="javascript:geodjango_centroid.clearFeatures()" data-jzz-gui-player="true">Delete all Features</a>
<textarea id="id_centroid" class="vWKTField required" cols="150" rows="10" name="centroid">POINT (2245128.33 5034984.47)</textarea>
<script>geodjango_centroid.init();</script>

– but in Django4 they appear as real textareas (with rich text options even) below the maps.
This would be the normal appearance.

In Django4 this is the above quoted code part:

<a href="javascript:geodjango_centroid.clearFeatures()">Delete all Features</a>
<textarea id="id_centroid" class="vWKTField required" cols="150" rows="10" name="centroid" style="display: none;" aria-hidden="true"></textarea><div role="application" class="tox tox-tinymce" style="visibility: hidden; width: 1120px; height: 360px;" aria-disabled="false"><div class="tox-editor-container">...</div></div>
<script>geodjango_centroid.init();</script>
@szabozoltan69
Copy link
Contributor Author

A (local) workaround found: if we remove

    'selector': 'textarea'

from the TINYMCE_DEFAULT_CONFIG setting, everything works fine (with maps). Unfortunately also the other rich text fields converts to simple oldschool HTML textareas.

@szabozoltan69
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants