Commit 2d2c50cc975e20d71bd47f5bd4a6b4ca8812c5b2
1 parent
a7099dd7a4
Exists in
master
updated README.md
Showing 1 changed file with 57 additions and 32 deletions Inline Diff
README.md
View file @
2d2c50c
# flashy.cards | 1 | 1 | # Flashy | |
2 | 2 | |||
All of these commands should be run from this directory (the one containing README.md) | 3 | 3 | Flashy is a realtime collaborative flashcard sharing app combined | |
4 | 4 | with a spaced-repetition study system. Flashy was developed by | ||
## Installing Flashy on Ubuntu 14.04 | 5 | 5 | CSE 110 students in spring quarter 2015: | |
6 | 6 | |||
Ubuntu 14.04 is the officially supported platform for the | 7 | 7 | - lhawkins | |
8 | - ckwang | |||
9 | - arnog | |||
10 | - abuss | |||
11 | - rray | |||
12 | - rlee | |||
13 | - mjeng | |||
14 | - kmach | |||
15 | - mrahman | |||
16 | - namtran | |||
17 | ||||
18 | Flashy officially supports Ubuntu 14.04 | |||
8 | 19 | |||
Before running the setup process below, observe the following prerequisites: | 9 | 20 | ## Installing Flashy on Ubuntu 14.04 (development/testing) | |
- Python 2 must be installed. To avoid issues | 10 | |||
11 | ||||
12 | 21 | |||
## Setup | 13 | 22 | We recommend installing Flashy on a fresh installation of Ubuntu 14.04. | |
23 | Before installing, make sure all packages are up to date: | |||
14 | 24 | |||
Flashy requires Python 2. Install this, and pip. | 15 | 25 | sudo apt-get update | |
26 | sudo apt-get upgrade | |||
27 | ||||
28 | It is important that Python 3 *not* be installed, as this causes issues | |||
29 | when creating the virtualenv. | |||
30 | ||||
31 | ### Install required packages | |||
16 | 32 | |||
Flashy also requires a running Redis server. | 17 | 33 | sudo apt-get install python-virtualenv redis-server git python-dev | |
34 | ||||
35 | ### Prepare installation directory | |||
18 | 36 | |||
Virtualenv for Windows creates a dir inexplicably named scripts rather than bin. So substitute venv/bin for venv/scripts if you are on Windows. | 19 | 37 | mkdir ~/flashy/ | |
38 | cd ~/flashy/ | |||
39 | ||||
40 | ### Retrieve source | |||
20 | 41 | |||
Install virtualenv before continuing. This is most easily accomplished with: | 21 | 42 | Clone the two repositories. Provide credentials in each case. | |
22 | 43 | |||
pip install virtualenv | 23 | 44 | git clone https://git.ucsd.edu/110swag/flashy-frontend | |
45 | git clone https://git.ucsd.edu/110swag/flashy-backend | |||
46 | ||||
47 | ### Prepare backend environment | |||
24 | 48 | |||
Set up the environment by running: | 25 | 49 | When running the setup script, gevent may take a while to install and throw | |
26 | 50 | several compiler warnings. These are expected. | ||
51 | ||||
52 | cd flashy-backend | |||
scripts/setup.sh | 27 | 53 | scripts/setup.sh | |
28 | 54 | source venv/bin/activate | ||
Run tests: | 29 | 55 | python manage.py migrate | |
30 | 56 | python manage.py loaddata sections | ||
scripts/run_tests.sh | 31 | |||
32 | 57 | |||
Migrate/create the local (SQLite) database: | 33 | 58 | ### Run backend server | |
34 | 59 | |||
python manage.py migrate | 35 | |||
36 | ||||
Run development server (local): | 37 | |||
38 | ||||
scripts/run_local.sh | 39 | 60 | scripts/run_local.sh | |
61 | ||||
62 | When run in development, emails will be printed to the terminal and | |||
63 | not actually sent. | |||
40 | 64 | |||
This requires that flashy-backend be in the directory as flashy-frontend. | 41 | |||
42 | ||||
Import sections from JSON: | 43 | |||
44 | ||||
python manage.py loaddata sections | 45 | |||
46 | ||||
## Troubleshooting | 47 | 65 | ## Troubleshooting | |
48 | 66 | |||
If you get errors about a module not being found, make sure you are working in the virtualenv. To enter the venv: | 49 | 67 | If you get errors about a module not being found, make sure you are working in the virtualenv. To enter the venv: | |
50 | 68 | |||
. venv/bin/activate | 51 | 69 | source venv/bin/activate | |
52 | 70 | |||
If you still get errors about a module not being found, make sure your virtualenv is up to date. Re-run: | 53 | 71 | If you still get errors about a module not being found, make sure your virtualenv is up to date. Re-run: | |
54 | 72 | |||
scripts/setup.sh | 55 | 73 | scripts/setup.sh |