https://github.com/cdriehuys/template-python-django
Template for Python projects using Django.
https://github.com/cdriehuys/template-python-django
Last synced: 3 months ago
JSON representation
Template for Python projects using Django.
- Host: GitHub
- URL: https://github.com/cdriehuys/template-python-django
- Owner: cdriehuys
- License: mit
- Created: 2023-02-18T17:34:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-23T15:17:47.000Z (over 2 years ago)
- Last Synced: 2025-01-07T07:44:15.904Z (5 months ago)
- Language: Python
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# template-python-django
Template for Python projects using Django.
## Using the Template
1. Create your new repository using this one as a template.
2. Replace all references to `template-python-django` and the associated package
`template_python_django` with your desired package name.
3. Remove this section from `README.md`## Running Locally
The app can be run locally for the purpose of development or as a standalone
service.### Development
Open VS Code, and ensure the project is opened as a dev container. This will
bring up the required background services defined in `docker-compose.base.yml`.To start the server, run:
```bash
cd ./template_python_django
./manage.py runserver
```The application will be available at http://localhost:8000 assuming no other
service is using that port. See the _PORTS_ tab at the bottom of the VS Code
window for more information.### Standalone
The entire application stack can be run with `docker compose`:
```bash
docker compose -f ./docker-compose.base.yml -f ./docker-compose.yml up --build
```The application will be available at http://localhost:8001.
If the VS Code development container is running, then stopping the above command
will also tear down the backing services and the VS Code container. To avoid
this, run only the `app` and `proxy` services:
```bash
docker compose up --build app proxy
```