mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-21 23:01:55 +00:00
improving install docum
This commit is contained in:
parent
e9eac4c730
commit
f63c4bdbfc
58
handbook/troggle/djangostart.html
Normal file
58
handbook/troggle/djangostart.html
Normal file
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Handbook Troggle Django install</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../css/main2.css" />
|
||||
</head>
|
||||
<body><style>body { background: #fff url(/images/style/bg-system.png) repeat-x 0 0 }</style>
|
||||
<h2 id="tophead">CUCC Expedition Handbook</h2>
|
||||
<h1>Handbook Troggle installing Django</h1>
|
||||
<p>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.
|
||||
<pre>
|
||||
$ django-admin
|
||||
|
||||
Type 'django-admin help <subcommand>' for help on a specific subcommand.
|
||||
|
||||
Available subcommands:
|
||||
|
||||
<font color="red">[django]</font>
|
||||
check
|
||||
compilemessages
|
||||
createcachetable
|
||||
dbshell
|
||||
diffsettings
|
||||
dumpdata
|
||||
flush
|
||||
inspectdb
|
||||
loaddata
|
||||
makemessages
|
||||
makemigrations
|
||||
migrate
|
||||
runserver
|
||||
sendtestemail
|
||||
shell
|
||||
showmigrations
|
||||
sqlflush
|
||||
sqlmigrate
|
||||
sqlsequencereset
|
||||
squashmigrations
|
||||
startapp
|
||||
startproject
|
||||
test
|
||||
testserver
|
||||
</pre>
|
||||
<font color="red"><pre>
|
||||
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.).
|
||||
</pre></font>
|
||||
<hr />
|
||||
Return to: <a href="troglaptop.html">Troggle laptop</a><br />
|
||||
Troggle index:
|
||||
<a href="trogindex.html">Index of all troggle documents</a><br />
|
||||
<hr />
|
||||
</body>
|
||||
</html>
|
@ -10,8 +10,6 @@
|
||||
<h1>Handbook Troggle XXX</h1>
|
||||
<a href="https://www.goodreads.com/book/show/1155986.The_Tricky_Troggle">
|
||||
<img border="1" class="onright" width="150px" src='tricky-troggle.jpg' alt='git logo'/></a>
|
||||
<p>This is not the page you are looking for.
|
||||
<p>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 ?
|
||||
|
||||
<hr />
|
||||
Go on to: <a href="trogarch.html">Troggle architecture</a><br />
|
||||
|
@ -25,7 +25,10 @@
|
||||
<li><a href="trogspeculate.html">Troggle Architecture Speculations</a> - as in April 2020<br>
|
||||
<li><a href="trog2030.html">Troggle in 2025-2030</a> - architectural evolution proposal<br>
|
||||
</ul>
|
||||
<a href="troglaptop.html">Troggle laptop configuration</a> - how to gset up a software development machine<br>
|
||||
<a href="troglaptop.html">Troggle laptop configuration</a> - how to set up a software development machine<br>
|
||||
<ul>
|
||||
<li><a href="djangostart.html">Django initial installation</a> - what django-start should do<br>
|
||||
</ul>
|
||||
<a href="serverconfig.html">Troggle server configuration</a> - how to get troggle running on a new machine (incomplete!)<br>
|
||||
<a href="trogimport.html">Troggle - Data Import</a> - reset and import data<br>
|
||||
<ul>
|
||||
|
@ -68,7 +68,7 @@ how to use it</a> and <em>how to tidy up afterwards</em>].
|
||||
<p>
|
||||
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.
|
||||
|
||||
<p>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).
|
||||
<p>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).
|
||||
|
||||
<hr />
|
||||
Go on to:
|
||||
|
@ -1,4 +1,4 @@
|
||||
pythin<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
@ -11,16 +11,19 @@ pythin<!DOCTYPE html>
|
||||
<h1>Troggle - software development laptop</h1>
|
||||
<img src="https://www.python.org/favicon.ico" width=64 hspace="20" align="right" alt='python logo'>
|
||||
|
||||
|
||||
<h2>Software development machine</h2>
|
||||
<p>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.
|
||||
<p>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.
|
||||
|
||||
<h3>Prerequisites</h3>
|
||||
<p>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 <a href="../computing/yourlaptop.html">your laptop configuration</a>. In particular read the information there about VS code and git.
|
||||
|
||||
<p>This page is a work in progess. Text will be moved here from
|
||||
|
||||
<pre>
|
||||
http://expo.survex.com/repositories/troggle/.git/tree/README.txt
|
||||
handbook/computing/yourlaptop.html
|
||||
</pre>
|
||||
<img src="https://www.debian.org/logos/openlogo-100.jpg" align="right" hspace="20" alt='debian logo'>
|
||||
|
||||
@ -170,7 +173,9 @@ git config --global user.name "Your Name"</code></pre>
|
||||
<pre><code>django-admin
|
||||
python manage.py
|
||||
python manage.py check -v 3 --traceback</code></pre>
|
||||
<p>The first line <var>django-admin</var> 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.
|
||||
<p>The first line <var>django-admin</var> will complain that it has not got a SETTINGS file, but that's fine.
|
||||
See <a href="djangostart.html">django-admin initial output</a> for what you should expect to see at this point.
|
||||
If it crashes though, you have not managed to install the software completely.
|
||||
<p>The most important is the <var>python manage.py check</var>. 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</code></pre>
|
||||
<p>The test suite hardly skims the surface of what troggle does. You need to manually test all these too:
|
||||
<br>- <var><a href="http://localhost:8000/pathsreport">http://localhost:8000/pathsreport</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/stats">http://localhost:8000/stats</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/people">http://localhost:8000/people</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/expedition/2018">http://localhost:8000/expedition/2018</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/people">http://localhost:8000/people</a></var> (takes a minute or so)
|
||||
<br>- <var><a href="http://localhost:8000/expofiles/surveyscans/2019/walletindex.html">http://localhost:8000/expofiles/surveyscans/2019/walletindex.html</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/survey_scans/">http://localhost:8000/survey_scans/</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/survexfile/caves/">http://localhost:8000/survexfile/caves/</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/expofiles/rigging_topos/264/entrance_topo_2016.pdf">http://localhost:8000/expofiles/rigging_topos/264/entrance_topo_2016.pdf</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/expofiles/rigging_topos/264/entrance_topo_2016.svg">http://localhost:8000/expofiles/rigging_topos/264/entrance_topo_2016.svg</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/expofiles/rigging_topos/264/entrance_topo1_2016.jpeg">http://localhost:8000/expofiles/rigging_topos/264/entrance_topo1_2016.jpeg</a></var>
|
||||
<<br>- <var><a href="http://localhost:8000/survexfile/caves/">http://localhost:8000/survexfile/caves/</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/expofiles/training-info/Idiots guide to accessing expo git.pptx">http://localhost:8000/expofiles/training-info/Idiots guide to accessing expo git.pptx</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/1623/291/291.html">http://localhost:8000/1623/291/291.htm</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/caves">http://localhost:8000/caves</a></var>
|
||||
<br>- <var><a href="http://localhost:8000/admin/doc/models/core.expedition/">ttp://localhost:8000/admin/doc/models/core.expedition/</a></var> (admin login required)
|
||||
<br>- <var><a href="http://localhost:8000/survexfile/204">http://localhost:8000/survexfile/204</a></var>
|
||||
|
||||
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 <var>troggle$ python databaseReset.py reset R000</var>. It should take about 5 minutes to import everything.
|
||||
<h4>Check parsing and importing</h4>
|
||||
<p>
|
||||
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 <var>troggle$ python databaseReset.py reset R000</var>. It should take about 5 minutes to import everything. See <a href="trogimport.html">Troggle Full Import</a> for what you should expect to see.
|
||||
|
||||
<h4>Use git to commit your edits</h4>
|
||||
<p>You need to know git. Sorry, but there it is. See <a href="../computing/repos.html">our git repositories</a> and <a href="../computing/qstart-git.html">our git cheat sheet</a>.
|
||||
@ -209,7 +210,7 @@ Nearly half the code deals with importing and parsing data, so you need to test
|
||||
<img class="onright" width = "80px" src="https://sqlite.org/images/sqlite370_banner.gif">
|
||||
<p>The public server uses a <a href="https://mariadb.org/about/">MariaDB SQL database</a> and development is usually done using a single-user <a href="https://sqlite.org/about.html">sqlite database</a> which is a standard Django option.
|
||||
<p>
|
||||
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 <a href="https://sqlitebrowser.org/">DB Browser for SQLite</a>. Connecting directly the the MariaDB database with a control panel or <a href="https://www.mysql.com/products/workbench/">workbench</a> 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 <a href="https://sqlitebrowser.org/">DB Browser for SQLite</a>. Connecting directly the the MariaDB database with a control panel or <a href="https://www.mysql.com/products/workbench/">workbench</a> gives even more tools and documentation capabilities. See the <a href="serverconfig.html">troggle server documentation</a> for how to install MariaDB.
|
||||
|
||||
<hr />
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user