Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If you are on _Windows_ and not Linux (or other *nix) you will also need to have
Create a virtual environment for this project.

If you are using [pyenv](https://github.com/pyenv/pyenv):
```shell
```bash
pyenv virtualenv registry-api
pyenv activate registry-api
```
Expand All @@ -49,48 +49,48 @@ $ activate venv
```

Run before committing/pushing:
```shell
```bash
./checkInCheck.sh
```


Install project dependencies:
```shell
```bash
make dep
```

### Start Developing

Spin up the project:
```shell
```bash
make run
```

Run migrations (every time you update Django models):
```shell
```bash
make migrate
```

Run tests:
```shell
```bash
make test
```

Run one test:
```shell
```bash
make test-one file=tmh_registry/registry/tests/api/viewsets/test_discharges.py test_name=TestDischargeCreate
```

Run checks before committing:
```shell
```bash
make pre-commit
```

Everything you need for this project is under [Makefile](./Makefile). Take a look at the commands by running `make`.

### Create a local user in Django
Before you can login to the registry you will need to create an account via. the local Django admin console:
1. Go ot the admin console on [http://localhost:8000/admin/](http://localhost:8000/admin/) or from Containers in Docker Desktop
1. Go to the admin console on [http://localhost:8000/admin/](http://localhost:8000/admin/) or from Containers in Docker Desktop
2. Enter the username and password from `.envs/.local/.django`
3. Create a new user

Expand Down