📝 Add mkdocs
This commit is contained in:
parent
a3d9862c4e
commit
91baf968d7
10 changed files with 498 additions and 380 deletions
34
docs/projects.md
Normal file
34
docs/projects.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Projects
|
||||
|
||||
OhMyAPI organizes projects in a diretory tree.
|
||||
The root directory contains the `settings.py`, which carries global configuration for your project, such as your `DATABASE_URL` and `INSTALLED_APPS`.
|
||||
Each project is organized into individual apps, which in turn may provide some database models and API handlers.
|
||||
Each app is isolated in its own subdirectory within your project.
|
||||
You can control which apps to install and load via `INSTALLED_APPS` in your `settings.py`.
|
||||
|
||||
## Create a Project
|
||||
|
||||
To create a projects, simply run:
|
||||
|
||||
```
|
||||
ohmyapi startproject myproject
|
||||
cd myproject
|
||||
```
|
||||
|
||||
This will create the following directory structure:
|
||||
|
||||
```
|
||||
myproject/
|
||||
- pyproject.toml
|
||||
- README.md
|
||||
- settings.py
|
||||
```
|
||||
|
||||
Run your project with:
|
||||
|
||||
```
|
||||
ohmyapi serve
|
||||
```
|
||||
|
||||
In your browser go to: [http://localhost:8000/docs](http://localhost:8000/docs)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue