2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-12-12 03:22:18 +00:00
troggle/media
2024-07-22 13:58:55 +02:00
..
admin Needed for django 4.2 admin pages 2023-03-05 17:46:01 +00:00
codemirror Added come mirror for the edit page, including some buttons to make html 2022-06-24 14:39:09 +01:00
css link to mugshots 2024-07-22 13:58:55 +02:00
js Javascript how it is. 2023-11-07 18:35:21 +02:00
jslib fix error on first creating new ent 2023-11-08 02:12:37 +02:00
204plan.gif [svn] 2009-05-13 06:18:54 +01:00
eieshole.jpg
expoBanner.gif [svn] Interface improvements. Code will need some cleaning up. 2009-05-13 06:19:45 +01:00
goesser.jpg
icon_addlink.gif [svn] 2009-06-09 23:13:11 +01:00
icon_changelink.gif [svn] 2009-06-09 23:13:11 +01:00
icon_deletelink.gif [svn] 2009-06-09 23:13:11 +01:00
loserBanner.jpg
nav-bg.gif [svn] 2009-06-09 23:13:11 +01:00
open-quote.gif
readme.txt Update to-do lists and README text 2022-02-20 00:21:56 +00:00
survex.lang survex syntax colouring - local copies 2021-03-21 01:36:08 +00:00
survex.xml survex syntax colouring - local copies 2021-03-21 01:36:08 +00:00
surveyHover.gif [svn] Improve registration system. 2009-05-13 06:22:07 +01:00
timemachine.gif [svn] 2009-05-13 06:20:26 +01:00

Confusions and incompatibilities when migrating to Django 1.10
meant conslidating the places we get CSS files and site media such as gifs 
for page annoations.

Situation as of 19/2/2022:
The only use of STATIC or the /static/ path is by Django-provided admin pages which 
we cannot chnage.
Locations of files are documented by comments at the bootom of the urls.py file.

flatviews, flatpages are now called expoviews, expopages.

we no longer load or use django.contrib.staticfiles

Situation as of 17/6/2020:
We have 3 folders for CSS files in 3 very different places:
1 in expoweb repo
1 in troggle repo
1 not in either repo but intimately needed by troggle

These are (in /home/expo/ ):
1. expoweb/css/ (used by the handbook)
2. troggle/media/css/ (used by troggle pages)
3. static/admin/css (used by django control panel and django plugins)

1. expoweb/css/        flatviews.flatpage      - the url is /css/main2.css
2. troggle/media/css/  MEDIA_ROOT, MEDIA_URL   - the url is /site_media/css/main3.css
3. static/admin/css    STATIC_ROOT, STATIC_URL - the url is /static/admin/css/base.css

After installing Django, we need to manually copy its CSS etc. files from,
e.g. /usr/lib/python3.7/site-packages/django/contrib/admin/static/admin/css
to
/static/admin/css/base.css
if there are changes. But our old set of gifs is probably better.

from django.contrib.staticfiles import views as staticviews
from flatpages import views as flatviews

1.    url(r'^(.*)$', flatviews.flatpage, name="flatpage"),

2.    url(r'^site_media/(?P<path>.*)$', staticviews.serve,  {'document_root': settings.MEDIA_ROOT, 
            'show_indexes': True}),
3.    url(r'^static/(?P<path>.*)$',     staticviews.serve,  {'document_root': settings.STATIC_ROOT,
            'show_indexes': True}),

Also (for development only):
    url(r'^expofiles/(?P<path>.*)$',  staticviews.serve,  {'document_root': settings.EXPOFILES, 
            'show_indexes': True}),