Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
bug 1269104: Remove TransformManager / Queryset
Browse files Browse the repository at this point in the history
The TransformManager was used for Revisions for the .transform method,
which supported adding .previous_revision to the objects in a queryset.
This is no longer used, so the standard Django manager can be used
again.
  • Loading branch information
jwhitlock committed Jun 30, 2017
1 parent 32e2507 commit a8956df
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 36 deletions.
7 changes: 0 additions & 7 deletions kuma/wiki/managers.py
Expand Up @@ -9,13 +9,6 @@
from .constants import (ALLOWED_TAGS, ALLOWED_ATTRIBUTES, ALLOWED_PROTOCOLS,
ALLOWED_STYLES)
from .content import parse as parse_content
from .queries import TransformQuerySet


class TransformManager(models.Manager):

def get_queryset(self):
return TransformQuerySet(self.model)


class BaseDocumentManager(models.Manager):
Expand Down
4 changes: 1 addition & 3 deletions kuma/wiki/models.py
Expand Up @@ -43,7 +43,7 @@
from .jobs import DocumentContributorsJob, DocumentNearestZoneJob
from .managers import (DeletedDocumentManager, DocumentAdminManager,
DocumentManager, RevisionIPManager,
TaggedDocumentManager, TransformManager)
TaggedDocumentManager)
from .signals import render_done
from .templatetags.jinja_helpers import absolutify
from .utils import tidy_content, get_doc_components_from_url
Expand Down Expand Up @@ -1692,8 +1692,6 @@ class Revision(models.Model):
is_mindtouch_migration = models.BooleanField(default=False, db_index=True,
help_text="Did this revision come from MindTouch?")

objects = TransformManager()

def get_absolute_url(self):
"""Build the absolute URL to this revision"""
return reverse('wiki.revision',
Expand Down
26 changes: 0 additions & 26 deletions kuma/wiki/queries.py

This file was deleted.

0 comments on commit a8956df

Please sign in to comment.