troggle-unchained/media/js
2021-10-24 19:17:02 +03:00
..
removed culling unused JS 2021-04-01 02:44:49 +01:00
jquery.formset.min.js Added files for jQuery to allow for UI and dynamic formsets. 2011-05-01 19:15:34 +01:00
QM_helper.js [svn] * Make Q< wikilinks work again 2009-07-06 08:31:24 +01:00
readme.txt Caveview docum added 2021-10-24 19:17:02 +03:00

This folder is NOT LINKED IN TO troggle

settings.JSLIB_URL == /JAVASCRIPT/
http://localhost:8000/pathsreport to check
JSLIB_ROOT	/mnt/c/EXPO/troggle/media/jslib	
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 %}

<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
<script src="{{ settings.JSLIB_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<!--<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>-->
{% endblock %}
{% block content %}
etc

{% endblock %}