mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-23 04:33:11 +00:00
add method to get admins list
This commit is contained in:
parent
327da95928
commit
3825ddc095
1 changed files with 6 additions and 0 deletions
|
@ -57,3 +57,9 @@ def apply_migrations(out_dir: str=OUTPUT_DIR) -> List[str]:
|
|||
out.seek(0)
|
||||
|
||||
return [line.strip() for line in out.readlines() if line.strip()]
|
||||
|
||||
@enforce_types
|
||||
def get_admins(out_dir: str=OUTPUT_DIR) -> List[str]:
|
||||
setup_django(out_dir, check_db=False)
|
||||
from django.contrib.auth.models import User
|
||||
return User.objects.filter(is_superuser=True)
|
||||
|
|
Loading…
Reference in a new issue