Some Django Wizardry
Project description
NWON-Django-Toolbox
This package provides some Django additions that can be used across several projects.
The project has a bunch of dependencies that we use in most of our projects. These are:
- Django (Obviously 🧠)
- Pydantic
- django-polymorphic
- django-rest
- drf-yasg
Package is meant for internal use at NWON as breaking changes may occur on version changes. This may change at some point but not for now 😇.
Development Setup
We recommend developing using poetry.
This are the steps to setup the project with a local virtual environment:
- Tell poetry to create dependencies in a
.venv
folder withing the project:poetry config virtualenvs.in-project true
- Create a virtual environment using the local python version:
poetry env use $(cat .python-version)
- Install dependencies:
poetry install
Prepare Package
Before publishing the package we need to:
- Clean dist folder
- Bump up the version of the package
- Build the package
Luckily we provide a script for doing all of this python scripts/prepare.py patch
. Alternatively you can run the script in a poetry context poetry run prepare patch
. The argument at the end defines whether you want a patch
, minor
or major
version bump.
The final zipped data ends up in the dist
folder.
Publish Package
Test package publication
- Add test PyPi repository:
poetry config repositories.testpypi https://test.pypi.org/legacy/
- Publish the package to the test repository:
poetry publish -r testpypi
- Test package:
pip install --index-url https://test.pypi.org/simple/ nwon_baseline
If everything works fine publish the package via poetry publish
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nwon_django_toolbox-0.1.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 336f98d5f672853514738953a87a45f4f7a0e4de51021e3b2a363181dac8eb11 |
|
MD5 | 585cef479973fe3156912a8d53987af4 |
|
BLAKE2b-256 | e7c7522554b6bbc9eecbe236885f44c17ac6f026f8004a4f58261d02a281d659 |
Hashes for nwon_django_toolbox-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 185c71fdb8f116f7cfe68d25f0eae5c3d7db9674c9115ff5d90ef620af2f557e |
|
MD5 | 94549adb1080b7c3058355034bea6109 |
|
BLAKE2b-256 | ef0a1ba56585eec8f5e6ddba3def39a3c053aff659c98472223249a3af0c9b53 |