Skip to content

Remove DEBUG_STATIC logic and unused JS libraries #13183

Description

@Gpetrak

The DEBUG_STATIC setting is currently used in templates (e.g. base.html) to conditionally include individual JavaScript libraries during development:

{% if DEBUG_STATIC %}
    <script src="{% static "lib/js/jquery.js" %}"></script>
    <script src="{% static "lib/js/jquery.dataTables.js" %}"></script>
    <script src="{% static "lib/js/bootstrap-treeview.js" %}"></script>
    <script src="{% static "lib/js/bootstrap-tokenfield.js" %}"></script>
    <script src="{% static "lib/js/fastselect.standalone.js" %}"></script>
    <script src="{% static "lib/js/select2.full.js" %}"></script>
    <script src="{% static "lib/js/jquery.timeago.js" %}"></script>
    <script src="{% static "lib/js/jq-ajax-progress.js" %}"></script>
    <script src="{% static "lib/js/jquery-ui.js" %}"></script>
    <script src="{% static "lib/js/jquery.raty.js" %}"></script>
    <script src="{% static "lib/js/bootstrap.js" %}"></script>
    <script src="{% static "lib/js/moment-with-locales.js" %}"></script>
    <script src="{% static "lib/js/bootstrap-datetimepicker.js" %}"></script>
    <script src="{% static "lib/js/json2.js" %}"></script>
    <script src="{% static "lib/js/waypoints.js" %}"></script>
    <script src="{% static "lib/js/underscore.js" %}"></script>
    {% else %}
    <script src="{% static "lib/js/assets.min.js" %}"></script>
    {% endif %}

However, this setup appears to be outdated and possibly unused:

  • The DEBUG_STATIC setting is no longer clearly documented or used actively.
  • Many of the conditionally included libraries seem to be legacy JS

Proposed steps:

  1. Remove the DEBUG_STATIC setting and all related conditional logic from templates.
  2. Investigate the listed JS libraries to determine whether they are still used anywhere on GeoNode.
  3. Remove unused or redundant legacy JS libraries from the code

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions