Skip to content

Commit

Permalink
Use Python/Django fontawesomefree library to support CSS; remove djan…
Browse files Browse the repository at this point in the history
…go-npm
  • Loading branch information
ssciolla committed Apr 8, 2022
1 parent f38413a commit eb3492d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 87 deletions.
10 changes: 2 additions & 8 deletions dashboard/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@
'constance',
'constance.backends.database',
'import_export',
'rangefilter'
'rangefilter',
'fontawesomefree'
]

# The order of this MIDDLEWARE is important
Expand Down Expand Up @@ -180,10 +181,6 @@
}
}

NPM_FILE_PATTERNS = {
'@fortawesome': ['fontawesome-free/*']
}

ROOT_URLCONF = 'dashboard.urls'

WSGI_APPLICATION = 'dashboard.wsgi.application'
Expand Down Expand Up @@ -266,14 +263,11 @@
# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'

NPM_ROOT_PATH = BASE_DIR

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'npm.finders.NpmFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

Expand Down
5 changes: 2 additions & 3 deletions dashboard/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{% static '@fortawesome/fontawesome-free/css/all.css' %}">
<link rel="stylesheet" type="text/css" href="{% static '@fortawesome/fontawesome-free/css/fontawesome.css' %}">
<link rel="stylesheet" type="text/css" href="{% static '@fortawesome/fontawesome-free/css/fontawesome.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'fontawesomefree/css/all.min.css' %}">
<script src="{% static 'fontawesomefree/js/all.min.js' %}"></script>
<link rel="shortcut icon" href="{% static 'images/favicon.ico' %}">
<style>
.django-su-warning {
Expand Down
71 changes: 0 additions & 71 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"license": "Apache-2.0",
"dependencies": {
"@apollo/client": "^3.5.10",
"@fortawesome/fontawesome-free": "6.1.1",
"@fortawesome/fontawesome-svg-core": "6.1.1",
"@fortawesome/react-fontawesome": "0.1.18",
"clsx": "^1.1.1",
"d3": "^5.16.0",
"d3-tip": "~0.9.1",
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ whitenoise==5.3.0
django-registration==3.2
# No update since 2018
django-cron==0.5.1
# No update since 2016
django-npm==1.0.0
django-watchman==1.2.0
django-su==0.9.0
django-mysql==3.12.0
Expand All @@ -17,6 +15,8 @@ django-webpack-loader==1.5.0
django-csp==3.7
django-import-export==2.6.0
django-admin-rangefilter==0.8.1
# Django/Python fontawesome library supporting CSS in UI
fontawesomefree==6.1.1

# graphql
graphene-django==2.15.0
Expand Down

0 comments on commit eb3492d

Please sign in to comment.