mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-06-01 15:28:24 -04:00
fix archivebox setup User model import
This commit is contained in:
parent
e558d71b10
commit
7a734ce410
1 changed files with 2 additions and 1 deletions
|
@ -960,7 +960,8 @@ def setup(out_dir: Path=OUTPUT_DIR) -> None:
|
||||||
run_subcommand('init', stdin=None, pwd=out_dir)
|
run_subcommand('init', stdin=None, pwd=out_dir)
|
||||||
|
|
||||||
setup_django(out_dir=out_dir, check_db=True)
|
setup_django(out_dir=out_dir, check_db=True)
|
||||||
from core.models import User
|
from django.contrib.auth import get_user_model
|
||||||
|
User = get_user_model()
|
||||||
|
|
||||||
if not User.objects.filter(is_superuser=True).exists():
|
if not User.objects.filter(is_superuser=True).exists():
|
||||||
stderr('\n[+] Creating new admin user for the Web UI...', color='green')
|
stderr('\n[+] Creating new admin user for the Web UI...', color='green')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue