django-spinproject
Opinionated version of django-admin startproject that intends to go further and do things that startproject can't do but most people will do anyway. Here's what you can get:
- 🔑 Security audit: you don't want another supply chain attack to ruin your day.
- ⚛️ Whitenoise: for serving static files in production (usually you don't want to set up a separate server for this).
- 🔧 settings.py: slightly modified to also understand environment variables and
.envfiles. This functionality requires thedjango-environpackage. Also, app logger is mostly pre-configured for you. - 🔑 Minimal login/logout pages so you can set this up without reading the guide again.
- 🔒 Support for marking PostgreSQL databases as read-only to prevent accidental modification of critical data.
- 🧰
script/bootstrapand other scripts to rule them all so your fellow developers and maintainers don't ask you how to run this thing. - 🏗️ Dockerfile and .dockerignore: one day your app will go to production, and we've got you covered.
- 🏛️ Gitlab CI config.
- ⚕️ Pre-configured linter so you can find some common problems automagically.
- 🏃 Pre-configured pytest because you are going to need unit tests one day.
- 🗃️ Auto-checks if you forgot to create migrations whenever you run tests or CI.
- *️⃣ .gitignore: well, you know why.
Requirements
- *nix system;
django-admininstalled and available from$PATH.
Generated files will work fine in Django >= 2.0, not tested in earlier versions.
How to use
- Install the package:
pip install django-spinproject - Create a new project:
django-spinproject --create <path> - OR initialize spinproject in your existing project's folder:
django-spinproject --init
You're all set. Now you can take a look at the list of available modules: django-spinproject --help
Use django-spinproject --enable to enable a module, django-spinproject --upgrade to apply changes.
CLI commands
--create PATH: create django project in specified path--init: create spinproject.json file--enable MODULE_TO_ENABLE: enable specified module; use 'all' to enable most common modules; use 'ALL' to enable all available modules;--disable MODULE_TO_DISABLE: disable specified module--upgrade [MODULE_TO_UPGRADE]: upgrade (specified or all) enabled modules
Available modules
gitignore— Creates.gitignorefile suitable for most Django projects.srta— Creates Scripts to Rule Them All (simplifies life a lot, you should check it out).pytest— Createspytest.iniand.coveragercfiles.dockerfile— Creates a Dockerfile.dockerignore— Creates.dockerignore(you should totally do that).docker-scripts— Creates additional SRTA scripts for building and pushing your Docker image.gitlab-ci— Creates GitLab CI config,.gitlab-ci.yml.pg-readonly— Creates a DatabaseWrapper class for readonly connection to PostgreSQL.settings— Improves the defaultsettings.py, adding support for envvars and.envfiles. Also enables Whitenoise and CLI logger.login-template— Creates minimal login/logout pages.
Planned features
(for requests, create an issue or drop me a line at m1kc@yandex.ru)
Changelog
See the Releases page.
Metadata
Release files for django-spinproject 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_spinproject-3.0.1.tar.gz | 36.4 kB | Without provenance | Details for django_spinproject-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_spinproject-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for django_spinproject-3.0.1-py3-none-any.whl |
Total release size: 112.4 kB
Release files / django_spinproject-3.0.1.tar.gz
| Download URL | django_spinproject-3.0.1.tar.gz |
|---|---|
| Size | 36.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b328aa78ef1392b891e19e42eac356ca913729f1e8c6b87cf463ee2a1b2c97be
|
|
BLAKE2b-256 checksum How to use checksums |
543ec81cab97dc362e328240456d1c8235460004a35edef2b1659e3f0a4efd52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / django_spinproject-3.0.1-py3-none-any.whl
| Download URL | django_spinproject-3.0.1-py3-none-any.whl |
|---|---|
| Size | 76.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
659fbc86bc29843230f4293b59ba22a1905a4a8b121967cd29306a785c9eb143
|
|
BLAKE2b-256 checksum How to use checksums |
fe4344df1354b1b764137cc188c52105c2a96cead8b0fd514b00ee0b08909a02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for django-spinproject 3.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.