Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neutron-sync/pdm-django
Django shortcuts for PDM
https://github.com/neutron-sync/pdm-django
Last synced: 2 months ago
JSON representation
Django shortcuts for PDM
- Host: GitHub
- URL: https://github.com/neutron-sync/pdm-django
- Owner: neutron-sync
- License: mit
- Created: 2022-01-29T17:49:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-10T16:29:44.000Z (about 1 year ago)
- Last Synced: 2024-04-14T08:53:15.139Z (3 months ago)
- Language: Python
- Size: 16.6 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Lists
- awesome-pdm - pdm-django - `pdm manage` and `pdm django-admin` shortcuts for Django commands (Plugins)
README
# pdm-django: Django command shortcuts for PDM
A plugin that gives you command shortcuts for developing with [PDM](https://pdm.fming.dev/).
`pdm run python manage.py runserver` -> `pdm manage runserver`
`pdm run django-admin startproject narf` -> `pdm django-admin startproject narf`
## Requirements
Tested with PDM 2.1.X
## Install
`pdm plugin add pdm-django`
## Usage
### manage.py
Example: `pdm manage runserver`
### django-admin
Example: `pdm django-admin startproject narf`
## Configuring .env
pdm-django inherits from the `pdm run` command, so if you would like to load a dotenv file, use the same notation in your `pyproject.toml` file.
```toml
[tool.pdm.scripts]
_.env_file = ".env"
```## CLI Option Conflicts
You may run into some options conflicts between the `pdm` command and the Django command you run. As of right now the only one I can find is `pdm manage --help` for which you will get the pdm help instead of the Django help. However, note you can still run `pdm manage` or `pdm manage help` to view the Django help. Same situation applies for `pdm django-admin --help`.
## Shameless Plugs
I built this library originally for the [NeutronSync Service](https://www.neutronsync.com/). So if you would like to support this project please support the service with a subscription to NeutronSync or a [donation](https://github.com/sponsors/neutron-sync) to the open source libraries.