This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from glenda1015/glenda1015/updated-docs
Updated documentation of the triage portal
- Loading branch information
Showing
4 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Visualizing The Database of Omega Triage Portal | ||
This document provides instructions on how to create a visualization of the database for the Triage Portal. | ||
|
||
## Instructions | ||
Make sure you have the following packages installed or specified in your project's `requirements.txt`. | ||
- django-extensions | ||
- https://pypi.org/project/django-extensions/ | ||
- pydot | ||
- https://pypi.org/project/pydot/ | ||
|
||
### Default Settings | ||
In your Django project's `setting.py` file, add the following configurations: | ||
```bash | ||
INSTALLED_APPS = ( | ||
# ... | ||
'django_extensions', | ||
# ... | ||
) | ||
|
||
GRAPH_MODELS = { | ||
'all_applications': True, | ||
'group_models': True, | ||
} | ||
``` | ||
|
||
### Docker Setup | ||
If you are using Docker, add graphviz to your `Dockerfile` to install necessary packages and set up the environment: | ||
```bash | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
# ... | ||
graphviz \ | ||
# ... | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
``` | ||
|
||
### Obtaining The Graph | ||
Have the containers running and inside the Docker container for your Triage Portal application named `omega-triage-portal`, | ||
execute the following command to generate the database visualization as a PNG image. | ||
In this case, this will generate a PNG file named myapp_models.png. | ||
|
||
```bash | ||
python manage.py graph_models -a -o myapp_models.png | ||
``` | ||
|
||
After the command is successfully executed, to access the generated image, you can download it from inside the Docker container. | ||
|
||
### Helpful link | ||
Documentation link: https://django-extensions.readthedocs.io/en/latest/graph_models.html |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters