diff --git a/handbook/troggle/troglaptop.html b/handbook/troggle/troglaptop.html index 0c0eb4ee1..0a3dbd870 100644 --- a/handbook/troggle/troglaptop.html +++ b/handbook/troggle/troglaptop.html @@ -187,7 +187,7 @@ The version number is the version of Django you have installed. Double check tha
Now try -
python manage.py/code>
+python manage.py
You will get an error: No module named 'localsettings'. Fixing this is described below, but for now try:
@@ -195,15 +195,50 @@ You will get an error: No module named 'localsettings'. Fixing this is described
The next task is to edit the SETTINGS files to match your machine and folder structure. So find the appropriate copy of the localsettings in /_deploy/ and copy it into the main troggle folder:
cp _deploy/wsl/localsettingsWSL.py localsettings.py
-Now edit it and insert useful values for EXPOUSERPASS [e.g. cavey:beery], EXPOADMINUSERPASS [e.g. beery:cavey], SECRET_KEY and make sure that LIBDIR refers to the actual version of python you are using (sorry, this should be automatic). -
Check that FILES and EXPOFILES are set to wherever you have put /expofiles/ or set 'EXPOFILESREMOTE = False' which will use expofiles on expo.survex.com instead. +The git repo copies have got munged passwords. +localsettings.py is not stored in git, but the copy on the server does have the correct passwords. +So use sFTP to download localsettings.py from expo.survex.com to get these. +
+We have at one time made localsettings in /_deploy/ appropriate for +
+WARNING: only the WSL and debian variants are current in October 2021. All the others are so old that +they will need serious work to be useable. Copy what you need from WSL and debian variants of +localsettings.py + +
Now edit localsettings.py and insert useful values for EXPOUSERPASS [e.g. cavey:beery], EXPOADMINUSERPASS [e.g. beery:cavey], SECRET_KEY. SECRET_KEY can be anything, it just has to be unique to each installation and invisible to anyone not a developer. +
Set EMAIL_HOST and EMAIL_HOST_PASSWORD to an email account you control that can send email. Then troggle can email you when some things go wrong. This may mean having to set EMAIL_PORT and MAIL_USE_TLS too (this is not used in troggle currently). Set EXPOUSER_EMAIL and EXPOADMINUSER_EMAIL to your own email address while you are doing software development. All these will be different when troggle is deployed on the public server. +
+Now you need to edit the following settings in your localsettings.py file to match your +development machine, e.g. if you have /expofiles/ mounted on another disc: + + +
FILES = Path('/mnt/f/expofiles/')
+EXPOFILES = Path('/mnt/f/expofiles/')
++All the other settings (drawings, expoweb etc.) will work fine if they are parallel directories +to the directory you installed troggle into. The troggle code can find out itself where it +is living. +
+If you do not have a local copy of /expofiles/ (40 GB), you can use the expo server copy if +you set: +
EXPOFILESREMOTE = TRUE
+and then the FILES and EXPOFILES setings will be ignored.
+
Now try this again:
python manage.py
-and in additon to the [django] command list, you will now gets command lists for [auth],
+and in addition to the [django] command list, you will now gets command lists for [auth],
[contenttypes], [core], and [sessions]. These are the modules (plugins) loaaded into django.
[core] is the core of troggle (but not all of it: the input file parsers are not in [core]).
@@ -279,6 +314,9 @@ python manage.py test -v 2
Yeah if you were paying attention, you will see that this has done a git commit for a test file
in the drawings repo locally.
Sorry about that. the test harness does not yet undo that. So you will need ot manually reverse that commit: go into your favourite git tool. In VS code the command is Commit: Undo last commit
+
+If you have run the test suite several times you will need to undo several commits (and delete the files producd by the test suite).
+
The test suite has over 70 tests but does not cover all of what troggle does and does not use any real data. You need to manually test these too, after you have done a full data import:
- http://localhost:8000/pathsreport