Fork of Troggle for complete overhaul of front-end code: Troggle Unchained
Go to file
2020-04-28 18:26:08 +01:00
core Remove mention of obsolete EMAIL_HOST_USER to correspond with change made in pathreport.py 2020-03-09 17:44:29 +00:00
debian Add info to debian instructions on creating troggle logfile (in /var/log) 2019-06-27 00:14:39 +01:00
docker Changes needed to stop the survex parser having to go through the data twice 2020-02-21 15:57:07 +00:00
docsEtc rename troggle paper.odt to troggle_paper.odt as space in repo are a 2015-04-08 03:24:00 +01:00
export no need to export cavetab2 anymore 2012-06-10 17:20:57 +01:00
flatpages implemened NOEDIT as a meta tag and fixed double-menus problem 2020-04-10 13:13:23 +01:00
helper decorator to check if user is logged in if settings.PUBLIC_SITE 2011-05-02 02:13:27 +01:00
imagekit [svn] Switch from photologue to imagekit. Less bloat. 2009-05-13 06:24:52 +01:00
media remove internal copies of jquery, jquiery-forms, jquery-ui+themes, 2014-09-11 07:40:58 +01:00
parsers Understanding and speeding up LoadPos 2020-04-28 18:26:08 +01:00
profiles Django 1.7 mostly working. Big refactor so probably bugs 2018-04-15 16:28:13 +01:00
templates adding sync to databaseRest and cleaning a template 2020-04-19 23:35:41 +01:00
wiki Note that the instructions for adding a survey are all wrong. 2012-08-05 00:35:02 +02:00
__init__.py [svn] Initial troggle checkin 2009-05-13 05:13:38 +01:00
.gitignore installation notes 2020-04-26 00:49:29 +01:00
databaseReset.py Understanding and speeding up LoadPos 2020-04-28 18:26:08 +01:00
dump.py Dumps loaded data into a .sql file 2020-04-16 20:36:42 +01:00
localsettings WSL.py reducing clutter in output 2020-04-28 01:18:57 +01:00
localsettingsdocker.py Bring back TinyMCE for editing flatpages 2019-07-10 12:32:04 +01:00
localsettingspotatohut.py Add the extra setting for the threed cache to all the template configs 2018-04-20 20:58:05 +01:00
localsettingsserver.py Documenting installation 2020-03-14 20:08:44 +00:00
localsettingsubuntu.py Add the extra setting for the threed cache to all the template configs 2018-04-20 20:58:05 +01:00
localsettingswindows.py New vars needed to make django 1.7 and tinymce work 2018-04-15 16:36:23 +01:00
manage.py Django 1.7 mostly working. Big refactor so probably bugs 2018-04-15 16:28:13 +01:00
middleware.py Upgrade to django 1.5, some functions have been changed 2018-04-11 22:02:57 +01:00
modelviz.py Remove .hgignore 2019-07-02 18:14:19 +01:00
pathreport.py another missing code 2020-02-27 01:35:12 +00:00
README.txt installation notes 2020-04-26 00:49:29 +01:00
settings.py 2010 is html format not wiki format. 2020-04-12 23:03:00 +01:00
urls.py New troggle report on defined directory paths 2020-02-27 00:58:09 +00:00
utils.py Remove the redundant render_with_context() as django now does this just with the 2019-03-30 17:02:07 +00:00
wsgi.py Django 1.7 wsgi.py 2018-04-15 16:29:30 +01:00

Troggle is an application for caving expedition data management, originally created for use on Cambridge University Caving Club (CUCC)expeditions and licensed under the GNU Lesser General Public License.

Troggle has been forked into two projects. The original one is maintained by Aron Curtis and is used for Erebus caves. The CUCC variant uses files as the definitive data, not the database and lives at expo.survex.com/troggle.

Troggle setup
==========

Python, Django, and Database setup
-----------------------------------
Troggle requires Django 1.4 or greater, and any version of Python that works with it.
It is currently (Feb.2020) on django 1.7.11  (1.7.11-1+deb8u5).
Install Django with the following command:

sudo apt install python-django  (on debian/ubuntu) -- does not work now as we need specific version

requirements.txt:
Django==1.7.11
django-registration==2.1.2
mysql
#imagekit
django-imagekit
Image
django-tinymce==2.7.0
smartencoding
unidecode

Install like this:
sudo apt install pip       # does not work on WSL1 Ubuntu 20.04. Have to install from source
pip install django==1.7
pip install django-tinymce==2.0.1
sudo apt install libfreetype6-dev
pip install django-registration==2.0
pip install unidecode
pip install --no-cache-dir pillow==2.7.0 # fails horribly on installing Ubuntu20.04 
pip install --no-cache-dir pillow # installs on Ubuntu20.04 , don't know if it works though

If you want to use MySQL or Postgresql, download and install them. 
However, you can also use Django with Sqlite3, which is included in Python and thus requires no extra installation.
pip install pygraphviz
apt install survex

pip install django-extensions
pip install pygraphviz # fails to install
pip install pyparsing pydot # installs fine
django extension graph_models # https://django-extensions.readthedocs.io/en/latest/graph_models.html



Troggle itself
-------------
Choose a directory where you will keep troggle, and git clone Troggle into it using the following command:

git clone git://expo.survex.com/troggle
or more reliably
git clone ssh://expo@expo.survex.com/home/expo/troggle


If you want to work on the source code and be able to commit, your account will need to be added to the troggle project members list. Contact wookey  at wookware dot org to get this set up.

Next, you need to fill in your local settings. Copy either localsettingsubuntu.py or localsettingsserver.py to a new file called localsettings.py. Follow the instructions contained in the file to fill out your settings.

Setting up survex
-----------------
You need to have survex installed as the command line 'cavern' is used as part of the survex
import process.

Setting up tables and importing legacy data
------------------------------------------
Run "python databaseReset.py reset" from the troggle directory.


Once troggle is running, you can also log in and then go to "Import / export" data under "admin" on the menu.

Adding a new year/expedition requires adding a column to the
folk/folk.csv table - a year doesn't exist until that is done.


Running a Troggle server
------------------------
For high volume use, Troggle should be run using a web server like apache. However, a quick way to get started is to use the development server built into Django. This is limited though: directory 
redirection needs apache.

To do this, run "python manage.py runserver" from the troggle directory.


Running a Troggle server with Apache
------------------------------------
Troggle also needs these aliases to be configured. These are set in 
/home/expo/config/apache/expo.conf
on the expo server.

At least these need setting:
DocumentRoot              /home/expo/expoweb
WSGIScriptAlias        /  /home/expo/troggle/wsgi.py
<Directory /home/expo/troggle>
	<Files wsgi.py>
		Require all granted
	</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).

Unlike the "runserver" method, apache requires a restart before it will use
any changed files:

apache2ctl stop
apache2ctl start