From 6f42052f66add1979bd2951c34998b1be29959c6 Mon Sep 17 00:00:00 2001 From: Zambom Date: Thu, 22 Sep 2016 19:31:37 -0300 Subject: [PATCH] Passing javascript to external static file [Issue: #73] --- amadeus/settings.py | 4 ++++ courses/templates/subject/form_view_teacher.html | 74 +++++--------------------------------------------------------------------- forum/static/js/forum.js | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ forum/templates/forum_list.html | 2 +- forum/templates/post_list.html | 2 +- 5 files changed, 65 insertions(+), 71 deletions(-) create mode 100644 forum/static/js/forum.js diff --git a/amadeus/settings.py b/amadeus/settings.py index 34afcfe..4053e2f 100644 --- a/amadeus/settings.py +++ b/amadeus/settings.py @@ -144,6 +144,10 @@ USE_TZ = True STATIC_URL = '/static/' +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, "static"), +] + # Files MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'uploads') MEDIA_URL = '/uploads/' diff --git a/courses/templates/subject/form_view_teacher.html b/courses/templates/subject/form_view_teacher.html index 71c0666..572d7c7 100644 --- a/courses/templates/subject/form_view_teacher.html +++ b/courses/templates/subject/form_view_teacher.html @@ -1,71 +1,7 @@ {% load static i18n %} {% block javascript %} - + {% endblock %}
@@ -73,7 +9,7 @@
-

{{topic}}

+

{{ topic }}

{% trans "edit" %} @@ -82,8 +18,8 @@
-

{{topic.description|linebreaks}}

- Forum +

{{ topic.description|linebreaks }}

+ Forum
@@ -93,7 +29,7 @@