2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-24 16:21:53 +00:00

add mysql startup documentation

This commit is contained in:
Philip Sargent 2020-05-14 19:37:46 +01:00
parent cc4017e481
commit 931aa4e3cb
2 changed files with 23 additions and 5 deletions

View File

@ -25,7 +25,7 @@ smartencoding
unidecode
Install like this:
sudo apt install pip # does not work on WSL1 Ubuntu 20.04. Have to install from source
sudo apt install pip # does not work on Ubuntu 20.04. Have to install from source. Use 18.04
pip install django==1.7
pip install django-tinymce==2.0.1
sudo apt install libfreetype6-dev
@ -44,7 +44,25 @@ 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
MariaDB database
----------------
Start it up with
$ sudo mysql -u -p
when it will prompt you to type in the password. Get this by reading the settings.py file in use on the server.
then
> CREATE DATABASE troggle;
> use troggle;
> exit;
Note the semicolons.
You can check the status of the db service:
$ sudo systemctl status mysql
You can start and stop the db service with
$ sudo systemctl restart mysql.service
$ sudo systemctl stop mysql.service
$ sudo systemctl start mysql.service
Troggle itself
-------------
@ -66,7 +84,7 @@ import process.
Setting up tables and importing legacy data
------------------------------------------
Run "python databaseReset.py reset" from the troggle directory.
Run "sudo 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.

View File

@ -138,7 +138,7 @@ def GetPersonExpeditionNameLookup(expedition):
res = { }
duplicates = set()
print("Calculating GetPersonExpeditionNameLookup for " + expedition.year)
#print("Calculating GetPersonExpeditionNameLookup for " + expedition.year)
personexpeditions = models.PersonExpedition.objects.filter(expedition=expedition)
htmlparser = HTMLParser()
for personexpedition in personexpeditions: