From c3c222e0455b161e670879a5e55954ad5895563e Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Wed, 5 May 2021 17:56:05 +0100 Subject: [PATCH] docm on JS files --- media/js/readme.txt | 33 +++++++++++++++++++++++++++++++++ media/jslib/readme.txt | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 media/js/readme.txt create mode 100644 media/jslib/readme.txt diff --git a/media/js/readme.txt b/media/js/readme.txt new file mode 100644 index 0000000..da81031 --- /dev/null +++ b/media/js/readme.txt @@ -0,0 +1,33 @@ +settings.JSLIB_URL == /JAVASCRIPT/ + +links to JS files are in the ../templates/*.html files + +but _also_, and peculiarly, in the troggle/admin.py files +e.g. +class TroggleModelAdmin(admin.ModelAdmin): + + def save_model(self, request, obj, form, change): + """overriding admin save to fill the new_since parsing_field""" + obj.new_since_parsing=True + obj.save() + + class Media: + js = ('jquery/jquery.min.js','js/QM_helper.js') + +NB any *Admin class is used in the Django control panel only. + +templates/editentrance.html: + +{% extends "cavebase.html" %} + +{% block title %}Edit Entrance{% endblock %} +{% block extraheaders %} + + + + +{% endblock %} +{% block content %} +etc + +{% endblock %} \ No newline at end of file diff --git a/media/jslib/readme.txt b/media/jslib/readme.txt new file mode 100644 index 0000000..da81031 --- /dev/null +++ b/media/jslib/readme.txt @@ -0,0 +1,33 @@ +settings.JSLIB_URL == /JAVASCRIPT/ + +links to JS files are in the ../templates/*.html files + +but _also_, and peculiarly, in the troggle/admin.py files +e.g. +class TroggleModelAdmin(admin.ModelAdmin): + + def save_model(self, request, obj, form, change): + """overriding admin save to fill the new_since parsing_field""" + obj.new_since_parsing=True + obj.save() + + class Media: + js = ('jquery/jquery.min.js','js/QM_helper.js') + +NB any *Admin class is used in the Django control panel only. + +templates/editentrance.html: + +{% extends "cavebase.html" %} + +{% block title %}Edit Entrance{% endblock %} +{% block extraheaders %} + + + + +{% endblock %} +{% block content %} +etc + +{% endblock %} \ No newline at end of file