Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

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 manage.py rundirect SCRIPT.py

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

python manage.py rundirect SCRIPT.py some_arg --some_option=somevalue

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

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

Note that the sys.path will include the path of manage.py(or 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.

Filename, size & hash SHA256 hash help File type Python version Upload date
django_rundirect-0.3.0-py2.py3-none-any.whl (5.0 kB) Copy SHA256 hash SHA256 Wheel 2.7 Apr 2, 2018
django_rundirect-0.3.0.tar.gz (2.3 kB) Copy SHA256 hash SHA256 Source None Apr 2, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page