This release is a pre-release and may not be stable for production use.
Nanodjango Compose
nanodjango-compose is a library of plugins that let you convert your nanodjango app to a production-ready Django project with maximum flexibility, and a minimum of fuss.
With Cookiecutter projects and repository templates you can quickly setup a production-ready Django site. However, these can only offer either a limited set of choices or predefined configurations. Since every Django project is different, the minimum set of viable features is often not sufficient and you then have add various chunks of boilerplate or config files. Conversely add too many features and you then waste time removing all the features you don't need.
nanodjango delivers rapid prototyping for Django projects. Once you have the features you want you can then convert your single page app to a full Django project. nanodjango-compose takes this a step further. Using nanodjango's plugin system, you can control the conversion process to add all the features you need for a production-ready site.
Quickstart
Install nanodjango-compose:
pip install nanodjango-compose
Write your nanodjango app in single .py file, importing a plugin
for each feature you want to include in the full Django project when
it is converted.
from nanodjango import Django
from compose import postgres, sentry
app = Django()
app.pm.register(postgres)
app.pm.register(sentry)
@app.route("/")
def hello_world(request):
return "<p>Hello, World!</p>"
Save that as hello_world.py, then use nanodjango to run it:
nanodjango run hellow_world.py
This will create migrations and a database, and run your project in
development mode. IMPORTANT: Although the plugins to configure the
project with PostgreSQL and Sentry, these are only added when the
project is converted. Right now nanodjango-compose does not change
nanodjango'srun command - so it will still initially create an
SQLite database.
- See Command usage for more options
Conversion
Once your project has the initial set of features you want, you can convert it into a full Django site:
nanodjango convert hello_world.py path/to/site
Now the plugins you included will be used to update Django's settings and add any configuration files.
- See Converting to a full Django project for more information
Project Information
- Issues: https://github.com/StuartMacKay/nanodjango-compose/issues
- Repository: https://github.com/StuartMacKay/nanodjango-compose
License
nanodjango-compose is available under the terms of the MIT licence.
Metadata
Release files for nanodjango-compose 0.0.0.dev0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nanodjango_compose-0.0.0.dev0.tar.gz | 24.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nanodjango_compose-0.0.0.dev0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.6 kB
Release files / nanodjango_compose-0.0.0.dev0.tar.gz
| Download URL | nanodjango_compose-0.0.0.dev0.tar.gz |
|---|---|
| Size | 24.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4bb9e7b8d000207256f96c811b94809a8bb269408be469af6ab60fdc910b57f
|
|
BLAKE2b-256 checksum How to use checksums |
d71b2c18cc84fcbcaa1a17f3914a1d059bfa6d43955f0738b3b113e51f897988
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.16
|
Release files / nanodjango_compose-0.0.0.dev0-py3-none-any.whl
| Download URL | nanodjango_compose-0.0.0.dev0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9671e94b29ec685d75c3e1a90aa1995d1abb9f68a440b063c5238acad5392aa
|
|
BLAKE2b-256 checksum How to use checksums |
d1e72c16d1b2e5e9c6130f7b8b34b58bcc7fff85c2a50fef11b0e9f9ef48402d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.16
|