File: runshell.py

package info (click to toggle)
django-filter 2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,396 kB
  • sloc: python: 7,483; javascript: 7,213; makefile: 144
file content (13 lines) | stat: -rwxr-xr-x 388 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python
import os
import sys
from django.core.management import execute_from_command_line


def runshell():
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings")
    execute_from_command_line(sys.argv[:1] + ['migrate', '--noinput', '-v', '0'])
    execute_from_command_line(sys.argv[:1] + ['shell'] + sys.argv[1:])

if __name__ == '__main__':
    runshell()