mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-24 16:21:53 +00:00
Update to-do lists and README text
This commit is contained in:
parent
ab8813e389
commit
32e6d5f891
30
README.txt
30
README.txt
@ -1,4 +1,4 @@
|
||||
Updated 23 October 2021
|
||||
Updated 19 February 2022
|
||||
|
||||
Troggle is an application for caving expedition data management,
|
||||
originally created for use on Cambridge University Caving Club (CUCC)expeditions
|
||||
@ -74,8 +74,14 @@ creates a barrier in itself. This is one reason most of us don't use Docker.
|
||||
|
||||
CSS and media files
|
||||
-------------------
|
||||
Temporarily we are not using the STATICFILES capability but are instead
|
||||
serving css files from troggle/media/.. (see urls.py) using
|
||||
We are not using the STATICFILES capability.
|
||||
We are serving css files from troggle/media/.. (see urls.py)
|
||||
|
||||
Plain CSS pages
|
||||
---------------
|
||||
When running the test server
|
||||
manage.py runserver 0.0.0.0:8000
|
||||
and without Apache running, we are serving CSS using using this Django 'view':
|
||||
view_surveys.cssfilessingle
|
||||
i.e.
|
||||
cssfilessingle() in core/view_surveys.py
|
||||
@ -175,20 +181,8 @@ WSGIScriptAlias / /home/expo/troggle/wsgi.py
|
||||
</Files>
|
||||
</Directory>
|
||||
|
||||
Alias /expofiles /home/expo/expofiles
|
||||
Alias /photos /home/expo/webphotos
|
||||
Alias /map /home/expo/expoweb/map
|
||||
Alias /javascript /usr/share/javascript
|
||||
Alias /static/ /home/expo/static/
|
||||
ScriptAlias /repositories /home/expo/config/apache/services/hgweb/hgweb.cgi
|
||||
|
||||
(The last is just for mercurial which will be remoived during 2020).
|
||||
|
||||
These two are not necessary as Django will serve these (see urls.py), but
|
||||
it may be faster for apache to serve them first:
|
||||
Alias /expofiles /home/expo/expofiles
|
||||
Alias /static/ /home/expo/static/
|
||||
|
||||
the instructions for apache Alias commands are in comments at the end of
|
||||
the urls.py file.
|
||||
|
||||
Unlike the django "manage.py runserver" method, apache requires a restart before it will use
|
||||
any changed files:
|
||||
@ -205,7 +199,7 @@ olly: ExecReload=/usr/sbin/apachectl graceful
|
||||
|
||||
Experimental additions
|
||||
----------------------
|
||||
These are untried tools which help us document how troggle works.
|
||||
These are untried tools which may help us document how troggle works in future.
|
||||
|
||||
pip install pygraphviz
|
||||
pip install pyparsing pydot # installs fine
|
||||
|
@ -2,6 +2,15 @@ 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
|
||||
|
@ -133,8 +133,7 @@ INSTALLED_APPS = (
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.admindocs',
|
||||
# 'django.contrib.staticfiles', # Using workarounds with expopages
|
||||
#'registration', # only for expo user. REPLACE using django.contrib.auth
|
||||
# 'django.contrib.staticfiles', # We put our CSS etc explicitly in the right place so do not need this
|
||||
'troggle.core',
|
||||
)
|
||||
|
||||
|
14
urls.py
14
urls.py
@ -177,7 +177,7 @@ trogglepatterns = [
|
||||
# This next set are all intercepted by Apache, if it is running.
|
||||
re_path(r'^photos/(?P<subpath>.*)$', mediapage, {'doc_root': settings.PHOTOS_ROOT}, name="mediapage"), # photo galleries
|
||||
re_path(r'^site_media/(?P<subpath>.*)$', mediapage, {'doc_root': settings.MEDIA_ROOT}, name="mediapage"), # MEDIA_ROOT: CSS and JS
|
||||
re_path(r'^static/(?P<subpath>.*)$', mediapage, {'doc_root': settings.MEDIA_ROOT}, name="mediapage"), # STATIC is in MEDIA now!
|
||||
re_path(r'^static/(?P<subpath>.*)$', mediapage, {'doc_root': settings.MEDIA_ROOT}, name="mediapage"), # STATIC only used by admin pages
|
||||
path('javascript/<path:subpath>', mediapage, {'doc_root': settings.JSLIB_ROOT}, name="mediapage"), # JSLIB_URL
|
||||
re_path(r'^expowebcache/3d/(?P<subpath>.*)$', mediapage, {'doc_root': settings.THREEDCACHEDIR}, name="mediapage"),
|
||||
|
||||
@ -201,7 +201,7 @@ urlpatterns = [
|
||||
|
||||
# NEW apache configurations suggested as of 2 April 2021:
|
||||
# Alias /site-media/ /home/expo/troggle/media/
|
||||
# Alias /robots.txt /home/expo/troggle/media/robots.txt
|
||||
# Alias /robots.txt /home/expo/troggle/media/robots.txt # does not exist!
|
||||
# Alias /favicon.ico /home/expo/troggle/media/favicon.ico # comes from /expoweb/* when running runserver
|
||||
# Alias /javascript /home/expo/troggle/media/jslib # empty
|
||||
|
||||
@ -209,11 +209,11 @@ urlpatterns = [
|
||||
# Alias /expofiles /home/expo/expofiles
|
||||
# Alias /photos /home/expo/webphotos
|
||||
# Alias /map /home/expo/expoweb/map
|
||||
# Alias /javascript /usr/share/javascript # to be changed
|
||||
# Alias /robots.txt /home/expo/static/robots.txt # to be changed
|
||||
# Alias /favicon.ico /home/expo/static/favicon.ico # to be changed
|
||||
# Alias /static/ /home/expo/static/
|
||||
# Alias /javascript /usr/share/javascript # to be changed, see above
|
||||
# Alias /robots.txt /home/expo/static/robots.txt # to be changed, see above
|
||||
# Alias /favicon.ico /home/expo/static/favicon.ico # to be deleted. favicon.ico now in expoweb/
|
||||
# Alias /static/ /home/expo/static/ # only used by Django admin, tinymce
|
||||
|
||||
# ScriptAlias /repositories /home/expo/config/apache/services/hgweb/hgweb.cgi # UPDATE thios for git
|
||||
# ScriptAlias /repositories /home/expo/config/apache/services/hgweb/hgweb.cgi # UPDATE this for git
|
||||
# ScriptAlias /boe /home/expo/boe/boc/boc.pl
|
||||
# ScriptAlias /boe-lastyear /home/expo/boe/boc-previous/boc.pl
|
||||
|
Loading…
Reference in New Issue
Block a user