Skip to content

Commit

Permalink
Added syntax highlighting to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rabinadk1 authored Feb 2, 2021
1 parent ecbe34d commit 4e6b298
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,29 @@ This repo contains the source code for the **COVID Volunteer and Plasma Donor**

You need to have [_python_](https://www.python.org/) as well as _pip_ installed in your system to run this project. [_MariaDB_](https://mariadb.org/) also need to be explicitly installed and configured as per your convinience. You can also install [XAMPP](https://www.apachefriends.org/index.html), which comes with [MariaDB](https://mariadb.org/) and [PHPMyAdmin](https://www.phpmyadmin.net/), if you do not like to tinker much with your system.

To install python dependencies, follow the following steps. _Note: The following instructions assumed you have **Python 3** for the `python` command._
To install python dependencies, follow the following steps.

_Note: The following instructions assumed you have **Python 3** for the `python` command._

**Create a virtual environment**

`python -m venv .venv`
```sh
python -m venv .venv
```

**Activate the environment**

Assuming you are using _bash_ or _zsh_

`source .venv/bin/activate`
```sh
source .venv/bin/activate
```

**Install python dependencies**

`pip install -r requirements.txt`
```sh
pip install -r requirements.txt
```

### Create a Database

Expand All @@ -48,14 +56,18 @@ The database field above is the name of the database you just created, and user

To migrate the necessary changes to the newly created database run the following command.

`./manage.py migrate`
```sh
./manage.py migrate
```

NOTE: This only propagates the changes to the database schema to your newly created database. It doesn't add any data entries to the database. For a sample of data entries please contact the team.

### First Time setup
During the first time setup, the **admin user** should be created from the python shell. So in order to create an admin user, run the following command from the project root directory.

`./manage.py shell`
```sh
./manage.py shell
```

This opens an interactive python shell. In the python shell, enter the following line by line.

Expand Down Expand Up @@ -90,6 +102,8 @@ Now an admin user with username `admin` and password `admin` is created. You can

Now the schema of various tables are setup in your newly created database. You can now run the database server using the following command.

`./manage.py runserver`
```sh
./manage.py runserver
```

This will run a development server in localhost on port 8000. The development server will not be accessible on the LAN just now.

0 comments on commit 4e6b298

Please sign in to comment.