diff options
author | Sashi20 | 2022-01-17 15:37:41 +0530 |
---|---|---|
committer | GitHub | 2022-01-17 15:37:41 +0530 |
commit | 0c8ed0a055aeae554f3772c5e2ee040baa222c42 (patch) | |
tree | b9df72a267f3f803b054e58c7727405ee55d48f3 | |
parent | 5d32758d9e229edc9d568bd2904068a296a42d28 (diff) | |
parent | 9a42f0c85394225155400c999be49c5cd563b5df (diff) | |
download | Mapathon-0c8ed0a055aeae554f3772c5e2ee040baa222c42.tar.gz Mapathon-0c8ed0a055aeae554f3772c5e2ee040baa222c42.tar.bz2 Mapathon-0c8ed0a055aeae554f3772c5e2ee040baa222c42.zip |
Merge pull request #10 from Sashi20/main
Allow uploading css, font files to static folder
-rwxr-xr-x | cms/models.py | 6 | ||||
-rwxr-xr-x | cms/templates/cms_base.html | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/cms/models.py b/cms/models.py index 3b04752..452a81c 100755 --- a/cms/models.py +++ b/cms/models.py @@ -70,6 +70,12 @@ def get_filename(instance, _): subdir = 'images' elif extension == '.pdf': subdir = 'pdf' + elif extension == '.css': + subdir = 'css' + elif extension == '.js': + subdir = 'js' + elif extension == '.ttf': + subdir = 'fonts' # Add more print(extension, subdir) return os.path.join('static/cms/uploads', subdir, str(instance.filename)) diff --git a/cms/templates/cms_base.html b/cms/templates/cms_base.html index cd38c3e..f6e0607 100755 --- a/cms/templates/cms_base.html +++ b/cms/templates/cms_base.html @@ -11,17 +11,18 @@ <meta name="author" content="FOSSEE web team"> <meta name="keywords" content="Mapathon, QGIS, competition"> <meta name="keywords" - content="ISRO, IIT Bombay, Remote Sensing, Mapping, Open source, software"> + content="IIT Bombay, Remote Sensing, Mapping, Open source, software"> <link rel="icon" href="{% static 'cms/uploads/images/favicon.png' %}"> - <title>IITB-ISRO-AICTE Mapathon</title> + <title>IITB-AICTE Mapathon</title> <link href="{% static 'cms/bootstrap-4.5.0/css/bootstrap.min.css' %}" rel="stylesheet"> <link href="{% static 'cms/fontawesome/css/all.css' %}" rel="stylesheet"> <!-- <link href="css/custom.css?ver=1.4" rel="stylesheet"> --> - <link href="{% static 'cms/css/custom.css' %}" rel="stylesheet"> + <link href="{% static 'cms/uploads/css/custom.css' %}" rel="stylesheet"> <script src="{% static 'cms/js/jquery-3.2.1.min.js' %}"></script> <script src="{% static 'cms/js/popper.min.js' %}"></script> <script src="{% static 'cms/bootstrap-4.5.0/js/bootstrap.min.js' %}"></script> <script src="{% static 'cms/js/holder.min.js' %}"></script> + <script src="{% static 'cms/uploads/js/custom.js' %}"></script> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-85GKJCKTG0"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-85GKJCKTG0'); </script> </head> <body> |