Finished README.

This commit is contained in:
John Washam
2016-07-05 12:42:27 -07:00
parent 6c1e865591
commit 02207c7620
2 changed files with 42 additions and 18 deletions

View File

@@ -20,25 +20,35 @@ Will be able to use it on:
It uses: It uses:
- Python 3 - Python 3
- Flask - Flask
- other things I need to figure out - SQLite
--- ---
To Do: ## How to run it
- [x] Log in 1. Clone project to a directory on your web server.
- [x] Auth 1. Edit the config.txt file. The username and password will be the login
- [x] Auth errors for your site. There is only one user - you.
- [x] Session set 1. Follow this long tutorial to get Flask running. It was way more work than it should be:
- [x] Logout https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-16-04
- [x] Card Area - `wsgy.py` is the entry point. It calls `flash_cards.py`
- [x] List cards - This is my systemd file `/etc/systemd/system/flash_cards.service`: [view](flash_cards.service)
- [x] Add cards - when done with tutorial:
- [x] Edit card ```
- [x] Delete card sudo systemctl restart flash_cards
- Card Memorization sudo systemctl daemon-reload
- [x] Card type toggle ```
- [x] Flip card 1. When you see a login page, you're good to go.
- [x] Mark as known, next card 1. Uncomment the commented block in `flash_cards.py`
- [x] Next card 1. Restart Flask. You have to use `sudo systemctl restart flash_cards`.
- [x] Card filters 1. Hit the URL /initdb on your web server. You'll see a message that the
database has been initialized.
1. Comment that code again.
1. Restart Flask.
1. Go to / on your webserver.
1. Log in.
1. Click the "General" or "Code" button and make a card!
1. When you're ready to start memorizing, click either "General" or "Code"
in the top menu.
*Happy learning!*

14
flash_cards.service Normal file
View File

@@ -0,0 +1,14 @@
[Unit]
Description=uWSGI instance to serve flash_cards
After=network.target
[Service]
User=john
Group=www-data
WorkingDirectory=/var/www/cs_flash_cards
Environment="PATH=/var/www/cs_flash_cards/py3env/bin"
Environment="CARDS_SETTINGS=/var/www/cs_flash_cards/config-personal.txt"
ExecStart=/var/www/cs_flash_cards/py3env/bin/uwsgi --ini flash_cards.ini
[Install]
WantedBy=multi-user.target