Skip to main content

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).

Release files for django_rundirect 0.3.0

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_rundirect 0.3.0
File Size Uploaded
django_rundirect-0.3.0.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django_rundirect 0.3.0
File Interpreter ABI Platform
django_rundirect-0.3.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 7.4 kB

Release files / django_rundirect-0.3.0.tar.gz

Download URL django_rundirect-0.3.0.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0eec957addaf31be65896fa96d4955de5c8c499952343b9922002db530fc531a
BLAKE2b-256 checksum
How to use checksums
4f6f79d2dafdc5067a4099a0593f48a5b79360805f12c80cb5761804dd58a585
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_rundirect-0.3.0-py2.py3-none-any.whl

Download URL django_rundirect-0.3.0-py2.py3-none-any.whl
Size 5.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fe4bd7c3f43df30cce28617bcbe8c4e9fc4820e92ca9d182f9f42174fe69e538
BLAKE2b-256 checksum
How to use checksums
d3669af500bde2472128aa62ddbdfcabffe6555f19c51d22e380923ecf98262a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.2.0

1 release file

0.1.1

1 release file

0.1

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