diff options
author | 2021-06-08 00:26:40 +0200 | |
---|---|---|
committer | 2021-06-08 00:29:59 +0200 | |
commit | c998d475440cf4819bad7ebc3ed19f31ce82baf4 (patch) | |
tree | bfdeba9a483ebb7646171c79f5b259c27f3d17dd /pydis_site/apps/api/models | |
parent | Fix `content` app tests not running on macOS (#519) (diff) |
Move subdomains to query paths.
In more detail:
- Use Django URL namespaces (e.g. `api:bot:infractions`) instead of
`django_hosts` host argument.
- Update the hosts file setup documentation to remove subdomain entries.
- Update the hosts file setup documentation to mention that the entry of
`pythondiscord.local` is not required and mainly for convenience.
- Rename the `APISubdomainTestCase` to the more fitting
`AuthenticatedAPITestCase`, as authentication is all that is left that the
class is doing.
- Drop dependency to `django_hosts`.
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r-- | pydis_site/apps/api/models/bot/message_deletion_context.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pydis_site/apps/api/models/bot/message_deletion_context.py b/pydis_site/apps/api/models/bot/message_deletion_context.py index 1410250a..25741266 100644 --- a/pydis_site/apps/api/models/bot/message_deletion_context.py +++ b/pydis_site/apps/api/models/bot/message_deletion_context.py @@ -1,5 +1,5 @@ from django.db import models -from django_hosts.resolvers import reverse +from django.urls import reverse from pydis_site.apps.api.models.bot.user import User from pydis_site.apps.api.models.mixins import ModelReprMixin @@ -33,7 +33,7 @@ class MessageDeletionContext(ModelReprMixin, models.Model): @property def log_url(self) -> str: """Create the url for the deleted message logs.""" - return reverse('logs', host="staff", args=(self.id,)) + return reverse('staff:logs', args=(self.id,)) class Meta: """Set the ordering for list views to newest first.""" |