forked from pantyukhov/django-rest-framework-filters
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanage.py
More file actions
23 lines (16 loc) · 739 Bytes
/
manage.py
File metadata and controls
23 lines (16 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python
import os
import sys
# Remove the package root directory from `sys.path`, ensuring that rest_framework_filters
# is imported from the installed site packages. Used for testing the distribution.
if '--no-pkgroot' in sys.argv:
sys.argv.remove('--no-pkgroot')
package_root = sys.path.pop(0)
import rest_framework_filters
package_dir = os.path.join(os.getcwd(), 'rest_framework_filters')
assert not rest_framework_filters.__file__.startswith(package_dir)
sys.path.insert(0, package_root)
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)