-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #557 from internetstandards/50
clean up some installation details
- Loading branch information
Showing
15 changed files
with
2,966 additions
and
3,929 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
604 changes: 381 additions & 223 deletions
604
dashboard/internet_nl_dashboard/locale/en/LC_MESSAGES/django.po
Large diffs are not rendered by default.
Oops, something went wrong.
589 changes: 371 additions & 218 deletions
589
dashboard/internet_nl_dashboard/locale/nl/LC_MESSAGES/django.po
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
dashboard/internet_nl_dashboard/management/commands/connect_superusers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
import logging | ||
|
||
from django.contrib.auth.models import User | ||
from django.core.management.base import BaseCommand | ||
|
||
from dashboard.internet_nl_dashboard.models import Account, DashboardUser | ||
|
||
log = logging.getLogger(__package__) | ||
|
||
|
||
class Command(BaseCommand): | ||
|
||
def handle(self, *args, **options): | ||
superusers = User.objects.all().filter(is_superuser=True) | ||
|
||
for user in superusers: | ||
if not DashboardUser.objects.filter(user=user).first(): | ||
DashboardUser.objects.create( | ||
user=user, | ||
account=Account.objects.all().first(), # should always exist | ||
mail_preferred_language="en", | ||
mail_send_mail_after_scan_finished=False, | ||
mail_after_mail_unsubscribe_code="", | ||
) | ||
print(f"Added DashboardUser for superuser {user}") | ||
print("Done") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.