On 28/01/25 9:14, Gabriel Wicki wrote:
Hi there!
Hi Gabriel,
I am in the process of writing a (generalized) service to ease
deployment of Python/Django web applications.  I managed to get the
service up and running (using gunicorn to serve dynamic web request and
nginx to serve static files) but I stumble over one crucial point in the
process.  Django uses it's own, project-specific administration script
(manage.py) as an interface to (admin) users - to collect static files
from the project to a specifies location, to get access to the database,
to get into an interactive (Python) shell, etc.

The most beautiful (in a Django perspective) would be to simply proxy
calls to the manage.py script through a Shepherd action (i.e. invoking
`herd manage django-service-foobar createsuperuser` would call
`manage.py createsuperuser`).  Other options could be to manually write
simplified Shepherd actions for (a subset) of manage.py calls (i.e. the
most important/common ones).
Just to mention that there is a service in Guix for the Patchwork software (https://github.com/getpatchwork/patchwork), which is a Django-based project. After a quick look, I don't see anything specific for manage.py commands, but I see a configuration option for the settings module. I don't know, maybe there's something useful for your purpose in that service.

Good luck :)


Attachment: OpenPGP_0x0AB0D067012F08C3.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to