mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-15 07:34:27 -04:00
add warning about running manage.py directly
This commit is contained in:
parent
3c3b2ee621
commit
ca9c9ef956
1 changed files with 14 additions and 0 deletions
|
@ -3,6 +3,20 @@ import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
# if you're a developer working on archivebox, still prefer the archivebox
|
||||||
|
# versions of ./manage.py commands whenever possible. When that's not possible
|
||||||
|
# (e.g. makemigrations), you can comment out this check temporarily
|
||||||
|
|
||||||
|
print("[X] Don't run ./manage.py directly, use the archivebox CLI instead e.g.:")
|
||||||
|
print(' archivebox manage createsuperuser')
|
||||||
|
print()
|
||||||
|
print(' Hint: Use these archivebox commands instead of the ./manage.py equivalents:')
|
||||||
|
print(' archivebox init (migrates the databse to latest version)')
|
||||||
|
print(' archivebox server (runs the Django web server)')
|
||||||
|
print(' archivebox shell (opens an iPython Django shell with all models imported)')
|
||||||
|
print(' archivebox manage [cmd] (any other management commands)')
|
||||||
|
raise SystemExit(2)
|
||||||
|
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings')
|
||||||
try:
|
try:
|
||||||
from django.core.management import execute_from_command_line
|
from django.core.management import execute_from_command_line
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue