How to get this project running on your machine.
-
Check that it's installed:
which git
That should return a path (e.g.,
/usr/local/bin/git
). -
Install Python 3. You have a few options:
-
Using a downloadable installer for any operating system: https://www.python.org/downloads/
-
With Homebrew for macOS:
brew install python3
-
With Scoop for Windows:
scoop install python3
-
Once installed, check that it's installed:
which python3
That should return a path (e.g.,
/usr/local/bin/python3
).
-
-
Install PostgreSQL.
-
With Postgres.app for macOS.
-
With BigSQL for Windows.
-
Other options are available.
-
Once that's downloaded and installed, check that it's installed:
which postgres
That should return a path (e.g.,
/usr/local/bin/postgres
).
-
-
Clone git repository and move into that.
git clone [email protected]:YOUR_GITHUB_USERNAME/sisters-of-the-road-admin.git
-
Move into that repository.
cd sisters-of-the-road-admin
-
Set up a Python virtual environment:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Install Node.js dependencies.
npm install
-
Setup PostgreSQL database.
-
Create a user:
psql
You will be asked for your password. If you used the password 'admin' for the default
postgres
user when installing PostgreSQL, then enter 'admin' here. -
That will open up the PostgreSQL prompt. Create the database:
CREATE USER sisters; CREATE DATABASE barter OWNER sisters;
-
Exit the
psql
prompt:\q
-
Verify that you can connect to the database:
psql barter sisters
That should enter you into the PostgreSQL prompt again.
Exit the prompt by entering
\q
and hitting Enter. -
Run database migrations.
python3 manage.py migrate python3 manage.py createsuperuser --username [YOUR USERNAME]
Replace
[YOUR USERNAME]
with your desired username (e.g.,kjohnson
).You'll be prompted to create a user with your email address and password. Do so, and save the information. You'll need to remember it to log in.
-
-
Run:
python manage.py runserver
The app will now be running in your browser at [http://localhost:8000/].
The admin dashboard is available at [http://localhost:8000/admin].
-
First, stop the running app with Ctrl+c.
-
Run tests:
python manage.py behave
That should output a lot of
NotImplementedError
messages.
This project uses Webpack to compile source files.
Run Webpack every time changes are made to the Javascript files:
```sh
webpack --config webpack.config.js
```
If you have trouble with any of these steps, please open a new issue describing what went wrong.