You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
661 B

  1. #!/bin/sh
  2. shell_code=''' '
  3. # shell code
  4. if command -v python3.8 > /dev/null && test -e /usr/lib/python3.8/site-packages/django/bin/django-admin.pyc
  5. then
  6. exec python3.8 "$0" "$@"
  7. elif command -v python2.7 > /dev/null && test -e /usr/lib/python2.7/site-packages/django/bin/django-admin.pyc
  8. then
  9. exec python2.7 "$0" "$@"
  10. else
  11. echo "Cannot find installed version of python-django1 or python3-django1." >&2
  12. exit 1
  13. fi
  14. python_code='''
  15. # python code
  16. # ONLY use DOUBLE quotes <"> after this line
  17. from django.core import management
  18. if __name__ == "__main__":
  19. management.execute_from_command_line()
  20. # End of Python code. Do not modify this line. #'