Skip to main content

No project description provided

Project description

This is simple Django command to run a custom Python script(or a single line of Python code) with Django settings loaded and environment setup. So you need not put any Django settings related code in your script.

To install this package

pip install django_rundirect

To integrate this package into a django project, add ‘django_rundirect’ to Django’s INSTALLED_APPS.

Then you can run a python script as:

python rundirect

You may pass args and options to the custom script, for example:

python rundirect some_arg --some_option=somevalue

You may run a single line of Python code, for example(like running python -c):

python runline "from django.contrib.auth.models import User;print User.objects.count()"

Note that the sys.path will include the path of where you run the python executable).

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_rundirect-0.3.0.tar.gz (2.3 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page