Skip to content

Commit f975781

Browse files
authored
[Fixes #13183] Removing DEBUG_STATIC setting (#13189)
* removing the DEBUG_STATIC setting * replacing the remaining libs with their minified versions * remove more unused JS and CSS libraries from the code
1 parent 7190d3c commit f975781

7 files changed

Lines changed: 8 additions & 63 deletions

File tree

geonode/catalogue/templates/geonode_metadata_full.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99
<title>{{ resource.title }}</title>
1010
{% block head %}
11-
{% if DEBUG_STATIC %}
12-
<link href="{% static "lib/css/jquery.dataTables.css" %}" rel="stylesheet" />
13-
<link href="{% static "lib/css/select2.css" %}" rel="stylesheet"/>
14-
<link href="{% static "lib/css/bootstrap.css" %}" rel="stylesheet"/>
15-
<link href="{% static "lib/css/jquery-ui.css" %}" rel="stylesheet"/>
16-
<link href="{% static "lib/css/bootstrap-datetimepicker.css" %}" rel="stylesheet" />
17-
{% else %}
18-
<link href="{% static "lib/css/assets.min.css" %}" rel="stylesheet"/>
19-
{% endif %}
2011
<link href="{% static "geonode/css/base.css" %}" rel="stylesheet"/>
2112
<style type="text/css">[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}</style>
2213
<style>

geonode/context_processors.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def resource_urls(request):
5555
INSTALLED_APPS=settings.INSTALLED_APPS,
5656
THEME_ACCOUNT_CONTACT_EMAIL=settings.THEME_ACCOUNT_CONTACT_EMAIL,
5757
TINYMCE_DEFAULT_CONFIG=settings.TINYMCE_DEFAULT_CONFIG,
58-
DEBUG_STATIC=getattr(settings, "DEBUG_STATIC", False),
5958
PROXY_URL=getattr(settings, "PROXY_URL", "/proxy/?url="),
6059
DISPLAY_SOCIAL=getattr(settings, "DISPLAY_SOCIAL", False),
6160
DISPLAY_RATINGS=getattr(settings, "DISPLAY_RATINGS", False),

geonode/settings.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@
5959
# present pretty error pages.
6060
DEBUG = ast.literal_eval(os.getenv("DEBUG", "True"))
6161

62-
# Set to True to load non-minified versions of (static) client dependencies
63-
# Requires to set-up Node and tools that are required for static development
64-
# otherwise it will raise errors for the missing non-minified dependencies
65-
DEBUG_STATIC = ast.literal_eval(os.getenv("DEBUG_STATIC", "False"))
66-
6762
FORCE_SCRIPT_NAME = os.getenv("FORCE_SCRIPT_NAME", "")
6863

6964
# Define email service on GeoNode

geonode/templates/admin/base_site.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ <h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('G
88
{% endblock %}
99

1010
{% block extrahead %}
11-
<script src="{% static "lib/js/assets.min.js" %}"></script>
11+
{# <script src="{% static "lib/js/assets.min.js" %}"></script> #}
1212

1313
<style type="text/css">
1414
#grp-content {

geonode/templates/base.html

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,12 @@
3434
<title>{% block title %}{{ SITE_NAME }}{% endblock %}</title>
3535

3636
<link rel="shortcut icon" href="{% static 'geonode/img/favicon.ico' %}" />
37-
<link href="{% static "lib/css/ol.css" %}" rel="stylesheet" />
38-
<script src="{% static "lib/js/ol.js" %}"></script>
3937
<link rel="preload" as="style" href="{% static "geonode/css/font-awesome.min.css" %}" />
4038
<link rel="preload" as="font" href="{% static "geonode/fonts/lato_regular.ttf" %}" crossorigin="" />
4139
<link rel="preload" as="font" href="{% static "geonode/fonts/lato_bold.ttf" %}" crossorigin="" />
4240
<link rel="preload" as="font" href="{% static "geonode/fonts/lato_light.ttf" %}" crossorigin="" />
4341

4442
{% block head %}
45-
46-
{% if DEBUG_STATIC %}
47-
<link href="{% static "lib/css/jquery.dataTables.css" %}" rel="stylesheet" />
48-
<link href="{% static "lib/css/select2.css" %}" rel="stylesheet"/>
49-
<link href="{% static "lib/css/bootstrap.css" %}" rel="stylesheet"/>
50-
<link href="{% static "lib/css/bootstrap-treeview.css" %}" rel="stylesheet"/>
51-
<link href="{% static "lib/css/jquery-ui.theme.min.css" %}" rel="stylesheet"/>
52-
<link href="{% static "lib/css/jquery-ui.structure.min.css" %}" rel="stylesheet"/>
53-
<link href="{% static "lib/css/bootstrap-treeview.css" %}" rel="stylesheet"/>
54-
{% else %}
55-
<link href="{% static "lib/css/assets.min.css" %}" rel="stylesheet"/>
56-
{% endif %}
5743
<link href="{% static "geonode/css/base.css" %}" rel="stylesheet"/>
5844
<link rel='stylesheet' id='cookie-law-info-css' href="{% static "geonode/css/cookie-law-info/cookie-law-info-public.css" %}" type='text/css' media='all' />
5945
<link rel='stylesheet' id='cookie-law-info-gdpr-css' href="{% static "geonode/css/cookie-law-info/cookie-law-info-gdpr.css" %}" type='text/css' media='all' />
@@ -77,11 +63,7 @@
7763
{% get_current_language_bidi as LANGUAGE_BIDI %}
7864
{% if LANGUAGE_BIDI %}
7965
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-rtl/3.3.4/css/bootstrap-rtl.min.css">
80-
{% if DEBUG_STATIC %}
81-
<link rel="stylesheet" type="text/css" href="{% static "geonode/css/geonode-rtl.css" %}">
82-
{% else %}
83-
<link rel="stylesheet" type="text/css" href="{% static "geonode/css/geonode-rtl.min.css" %}">
84-
{% endif %}
66+
<link rel="stylesheet" type="text/css" href="{% static "geonode/css/geonode-rtl.min.css" %}">
8567
{% endif %}
8668
</head>
8769

@@ -115,26 +97,12 @@
11597

11698
{% block footer %}{% endblock footer %}
11799

118-
{% if DEBUG_STATIC %}
119-
<script src="{% static "lib/js/jquery.js" %}"></script>
120-
<script src="{% static "lib/js/jquery.dataTables.js" %}"></script>
100+
<script src="{% static "lib/js/jquery.min.js" %}"></script>
101+
<script src="{% static "lib/js/jquery-ui.min.js" %}"></script>
102+
<script src="{% static "lib/js/bootstrap.min.js" %}"></script>
121103
<script src="{% static "lib/js/bootstrap-treeview.js" %}"></script>
122-
<script src="{% static "lib/js/bootstrap-tokenfield.js" %}"></script>
123-
<script src="{% static "lib/js/fastselect.standalone.js" %}"></script>
124-
<script src="{% static "lib/js/select2.full.js" %}"></script>
125-
<script src="{% static "lib/js/jquery.timeago.js" %}"></script>
126-
<script src="{% static "lib/js/jq-ajax-progress.js" %}"></script>
127-
<script src="{% static "lib/js/jquery-ui.js" %}"></script>
128-
<script src="{% static "lib/js/jquery.raty.js" %}"></script>
129-
<script src="{% static "lib/js/bootstrap.js" %}"></script>
130-
<script src="{% static "lib/js/moment-with-locales.js" %}"></script>
131-
<script src="{% static "lib/js/bootstrap-datetimepicker.js" %}"></script>
132-
<script src="{% static "lib/js/json2.js" %}"></script>
133-
<script src="{% static "lib/js/waypoints.js" %}"></script>
134-
<script src="{% static "lib/js/underscore.js" %}"></script>
135-
{% else %}
136-
<script src="{% static "lib/js/assets.min.js" %}"></script>
137-
{% endif %}
104+
105+
138106
<script src="{% static "geonode/js/utils/utils.js" %}"></script>
139107
<script src="{% static "geonode/js/base/base.js" %}"></script>
140108
<script type="text/javascript" src="{% url "javascript-catalog" %}"></script>

geonode/templates/metadata_base.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
{% load static %}
88

99
{% block head %}
10-
<script src="{% static "lib/js/jquery.js" %}"></script>
11-
<script src="{% static "lib/js/moment-with-locales.js" %}"></script>
12-
<script src="{% static "lib/js/bootstrap-datetimepicker.js" %}"></script>
13-
<link rel="stylesheet" href="{% static "lib/css/bootstrap-datetimepicker.css" %}" />
1410
<script type="text/javascript" src={% static "tinymce/tinymce.min.js" %}></script>
1511
<script type="text/javascript" src={% static "django_tinymce/init_tinymce.js" %}></script>
1612
<link rel="stylesheet" type="text/css" id="mce-u0" href= {% static "tinymce/skins/ui/oxide/skin.min.css" %}>

geonode/templates/search/search_scripts.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
{% load base_tags %}
22
{% load static %}
33

4-
{% if DEBUG_STATIC %}
5-
<script src="{% static "lib/js/angular.js" %}"></script>
4+
<script src="{% static "lib/js/angular.min.js" %}"></script>
65
<script src="{% static "lib/js/angular-cookies.js" %}"></script>
7-
<script src={% static "lib/js/angular-sanitize.min.js" %}></script>
8-
<script src="{% static "lib/js/angular-openlayers-directive.min.js" %}"></script>
9-
{% endif %}
106

117
{% if include_spatial == 'true' %}
128
<style>

0 commit comments

Comments
 (0)