Skip to main content

use the Django ORM with standalone scripts

Project description

This little library is all about easing the pain of using the Django ORM for simple tools that just happen to be in need of some easy to use ORM for object persistence.

The best way of course is to set up a full Django project and just use a settings.py file and using the DJANGO_SETINGS_MODULE environment variable. But when you just want to do little tools that just need some sqlite3 database to store some of their data and don’t want to go for a full Django project, that is where this little library comes into play.

It consists of just two modules so far:

standalone.conf handles all the configuration needs, setting up a dynamically created settings object.

standalone.models carries a base class for your models that automatically tells Python that all models created actually reside in the standalone Django app, even though they are in a different file, outside the app’s namespace.

Look at the included example_script.py to see how to make use of this library.

The easiest way to get django-standalone is to use easy_install or pip:

sudo easy_install django-standalone

or

sudo pip install django-standalone

Or you can clone this repository and run the included setup.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-standalone-0.3.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

django_standalone-0.3-py2.6.egg (8.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page