Skip to main content

Django-mini is an MIT-licensed command-line utility for running Django management commands without a settings module. It is intended to help developers run and test stand-alone Django apps.

Installation

Install using pip from PyPI:

pip install django-mini

Alternatively, download the source, unpack it and install it like a typical Python distribution:

python setup.py install

The installation consists of a single pure-Python module called djangomini and an executable script django-mini.py. Django-mini assumes a recent version of Django is already installed.

Basic Usage

Django-mini has a few flags for configuring Django settings, and then any other arguments are passed to Django’s management utility so it can do its stuff.

  • --database <database> - to specify the default database.

  • --app <appname> - adds your app package to Django’s INSTALLED_APPS.

  • --admin - adds Django’s built-in admin and its requirements.

  • --debug-toolbar - adds Rob Hudson’s django-debug-toolbar and its requirements.

  • -p or --persisting - use an sqlite database named djangomini.sqlite.

If you don’t use the persisting option or specify a database, django-mini will use an in-memory sqlite database (implying it will get destroyed after the command finishes).

To run Django with your app and the built-in admin, use a named database:

django-mini.py --database /tmp/django.sqlite --admin --app myapp syncdb
django-mini.py --database /tmp/django.sqlite --admin --app myapp runserver

Or use the persisting option:

django-mini.py -p --admin syncdb
django-mini.py -p --admin runserver

That will start Django’s development server with the admin. The admin application will be available at http://localhost:8000/admin/ and all other requests will be directed to your app, i.e. your app’s myapp.urls is configured to serve all other requests.

The full documentation has more examples of use, including how to use other databases, how to change any setting, and how to mount an app at a particular URL.

Release files for django-mini 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-mini 0.5.1
File Size Uploaded
django-mini-0.5.1.tar.gz 16.5 kB Details

Release files / django-mini-0.5.1.tar.gz

Download URL django-mini-0.5.1.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1cf7cf64a1579f91d108703ef9b3b6f2c4e6ea6c5a6656b50af5f88783580e2b
BLAKE2b-256 checksum
How to use checksums
fccae90cf3e4205a265ac8f7ed591b38b7a7415a0202e84ba0234db54d68cb9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5.1 This release

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4

1 release file

0.3

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page