-
Notifications
You must be signed in to change notification settings - Fork 84
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 #463 from WikipediaLibrary/staging
Deploy library bundle
- Loading branch information
Showing
123 changed files
with
52,223 additions
and
18,134 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/ambv/black | ||
rev: 19.3b0 | ||
hooks: | ||
- id: black | ||
language_version: python3.7 |
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
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 |
---|---|---|
|
@@ -15,9 +15,7 @@ | |
|
||
logger = logging.getLogger(__name__) | ||
|
||
twl_team, created = User.objects.get_or_create( | ||
username="TWL Team", email="[email protected]" | ||
) | ||
twl_team = User.objects.get(username="TWL Team") | ||
|
||
|
||
class Command(BaseCommand): | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,21 +2,19 @@ | |
|
||
from datetime import timedelta | ||
|
||
from django.conf import settings | ||
from django.contrib.auth.models import User | ||
from django.core.management.base import BaseCommand, CommandError | ||
from django.db.models import Q | ||
from django.utils import timezone | ||
from django.utils.translation import ugettext as _ | ||
from TWLight.helpers import site_id | ||
from TWLight.applications.models import Application | ||
from TWLight.resources.models import Partner | ||
from django_comments.models import Comment | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
twl_team, created = User.objects.get_or_create( | ||
username="TWL Team", email="[email protected]" | ||
) | ||
twl_team = User.objects.get(username="TWL Team") | ||
|
||
|
||
class Command(BaseCommand): | ||
|
@@ -39,7 +37,7 @@ def handle(self, *args, **options): | |
for app in pending_apps: | ||
if ( | ||
Comment.objects.filter( | ||
Q(object_pk=str(app.pk), site_id=settings.SITE_ID), | ||
Q(object_pk=str(app.pk), site_id=site_id()), | ||
( | ||
Q(user=twl_team) | ||
| Q(submit_date__gte=(timezone.now() - timedelta(days=8))) | ||
|
@@ -49,7 +47,7 @@ def handle(self, *args, **options): | |
): | ||
comment = Comment( | ||
content_object=app, | ||
site_id=settings.SITE_ID, | ||
site_id=site_id(), | ||
user=twl_team, | ||
# Translators: This comment is added to pending applications when our terms of use change. | ||
comment=_( | ||
|
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.