diff --git a/handbook/troggle/djangostart.html b/handbook/troggle/djangostart.html new file mode 100644 index 000000000..9809e16bd --- /dev/null +++ b/handbook/troggle/djangostart.html @@ -0,0 +1,58 @@ + + +
+ +When first installing Django, the first thing to test is that Django itself is OK. So run this command, and this is the output you should see. +
+$ django-admin + +Type 'django-admin help+' for help on a specific subcommand. + +Available subcommands: + +[django] + check + compilemessages + createcachetable + dbshell + diffsettings + dumpdata + flush + inspectdb + loaddata + makemessages + makemigrations + migrate + runserver + sendtestemail + shell + showmigrations + sqlflush + sqlmigrate + sqlsequencereset + squashmigrations + startapp + startproject + test + testserver +
+Note that only Django core commands are listed as settings are not +properly configured (error: Requested setting INSTALLED_APPS, but +settings are not configured. You must either define the environment +variable DJANGO_SETTINGS_MODULE or call settings.configure() before +accessing settings.). ++
This is not the page you are looking for. -
This will be replaced with the information you want as soon as someone gets around to writing it. Why not find out how to do this yourself ?
All the data of all kinds is stored in files. When troggle starts up it imports that data from the files. There are other scripts doing useful things (folk, wallets) and these too get their data from files. -
There is never any need to back up or archive the database as it is rebuilt from files. Rebuilding troggle and re-importing all the data on the server takes about 10 minutes (as of May 2021). +
There is never any need to back up or archive the database as it is rebuilt from files. Rebuilding troggle and re-importing all the data on the server takes about 5 minutes (as of November 2021).
For troggle itself, you need a linux machine. We all use Debian or Debian-derived machines (Debian itself, Ubuntu, Xubuntu etc.) but other forms of linux may work. Running Debian or Ubuntu under WSL on Windows 10 works fine.
If you want to work on the troggle source code and be able to commit to the server git repo, your account will need to be added to the troggle project members list. Contact wookey at wookware dot org to get this set up. +
You need to already know really quite a lot about what troggle does, and how it is used in practice. Also you will have installed quite a lot of the software such as tunnel, therion, survex etc. as documented in your laptop configuration. In particular read the information there about VS code and git. +
This page is a work in progess. Text will be moved here from
http://expo.survex.com/repositories/troggle/.git/tree/README.txt -handbook/computing/yourlaptop.html@@ -170,7 +173,9 @@ git config --global user.name "Your Name"
django-admin
python manage.py
python manage.py check -v 3 --traceback
-The first line django-admin will complain that it has not got a SETTINGS file, but that's fine. If it crashes though, you have not managed to install the software completely. +
The first line django-admin will complain that it has not got a SETTINGS file, but that's fine. +See django-admin initial output for what you should expect to see at this point. +If it crashes though, you have not managed to install the software completely.
The most important is the python manage.py check. If this works, then you have installed the software correctly. Now we test whether troggle is configured correctly: @@ -185,21 +190,17 @@ python manage.py check -v 3 --traceback
The test suite hardly skims the surface of what troggle does. You need to manually test all these too:
- http://localhost:8000/pathsreport
- http://localhost:8000/stats
-
- http://localhost:8000/people
-
- http://localhost:8000/expedition/2018
+
- http://localhost:8000/people (takes a minute or so)
- http://localhost:8000/expofiles/surveyscans/2019/walletindex.html
-
- http://localhost:8000/survey_scans/
-
- http://localhost:8000/survexfile/caves/
-
- http://localhost:8000/expofiles/rigging_topos/264/entrance_topo_2016.pdf
-
- http://localhost:8000/expofiles/rigging_topos/264/entrance_topo_2016.svg
-
- http://localhost:8000/expofiles/rigging_topos/264/entrance_topo1_2016.jpeg
+<
- http://localhost:8000/survexfile/caves/
- http://localhost:8000/expofiles/training-info/Idiots guide to accessing expo git.pptx
- http://localhost:8000/1623/291/291.htm
- http://localhost:8000/caves
- ttp://localhost:8000/admin/doc/models/core.expedition/ (admin login required)
- http://localhost:8000/survexfile/204
-
-Nearly half the code deals with importing and parsing data, so you need to test that a full data import works. Run the full data import troggle$ python databaseReset.py reset R000. It should take about 5 minutes to import everything.
+
+Nearly half the code deals with importing and parsing data, so you need to test that a full data import works. Run the full data import troggle$ python databaseReset.py reset R000. It should take about 5 minutes to import everything. See Troggle Full Import for what you should expect to see.
You need to know git. Sorry, but there it is. See our git repositories and our git cheat sheet. @@ -209,7 +210,7 @@ Nearly half the code deals with importing and parsing data, so you need to test
The public server uses a MariaDB SQL database and development is usually done using a single-user sqlite database which is a standard Django option.
-You will find it very, very useful to see what is going on if you look directly at the data in the database (just a single file in the sqlite case) and browse the data in the tables. This is vital when doing Django migrations between Django versions. A light-weight, simple db browser is DB Browser for SQLite. Connecting directly the the MariaDB database with a control panel or workbench gives even more tools and documentation capabilities. +You will find it very, very useful to see what is going on if you look directly at the data in the database (just a single file in the sqlite case) and browse the data in the tables. This is vital when doing Django migrations between Django versions. A light-weight, simple db browser is DB Browser for SQLite. Connecting directly the the MariaDB database with a control panel or workbench gives even more tools and documentation capabilities. See the troggle server documentation for how to install MariaDB.