File: django-admin

package info (click to toggle)
python-django 1%3A1.10.7-2%2Bdeb9u9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 46,768 kB
  • sloc: python: 210,877; javascript: 18,032; xml: 201; makefile: 198; sh: 145
file content (23 lines) | stat: -rw-r--r-- 651 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
shell_code=''' '
# shell code
if command -v python3 > /dev/null && test -e /usr/lib/python3/dist-packages/django/bin/django-admin.py
then
    exec python3 "$0" "$@"
elif command -v python2.7 > /dev/null && test -e /usr/lib/python2.7/dist-packages/django/bin/django-admin.py
then
    exec python2.7 "$0" "$@"
else
    echo "Cannot find installed version of python-django or python3-django." >&2
    exit 1
fi

python_code='''
# python code
# ONLY use DOUBLE quotes <"> after this line
from django.core import management

if __name__ == "__main__":
    management.execute_from_command_line()

# End of Python code. Do not modify this line. #'