From fdff56bd21f4e596c162af8903eef4edfe981b34 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 27 Jun 2012 08:44:36 +0000 Subject: [PATCH] New schema models have moved from redesign/ to ietf/; fix community sources accordingly. - Legacy-Id: 4525 --- ietf/community/models.py | 4 ++-- ietf/community/rules.py | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ietf/community/models.py b/ietf/community/models.py index 6062e87e0..d98ab2f96 100644 --- a/ietf/community/models.py +++ b/ietf/community/models.py @@ -7,8 +7,8 @@ from django.db import models from django.db.models import signals, Q from ietf.utils.mail import send_mail -from redesign.doc.models import Document, DocEvent -from redesign.group.models import Group, Role +from ietf.doc.models import Document, DocEvent +from ietf.group.models import Group, Role from ietf.community.rules import TYPES_OF_RULES, RuleManager from ietf.community.display import (TYPES_OF_SORT, DisplayField, diff --git a/ietf/community/rules.py b/ietf/community/rules.py index aa313122f..e04472771 100644 --- a/ietf/community/rules.py +++ b/ietf/community/rules.py @@ -1,7 +1,5 @@ from django.db.models import Q -from ietf.community.utils import get_documents_with - from ietf.doc.models import Document from ietf.group.models import Group from ietf.person.models import Person @@ -130,10 +128,10 @@ class ReferenceFromIDRule(RuleManager): class WithTextRule(RuleManager): codename = 'with_text' - description = 'All I-Ds that contain a particular text string' + description = 'All I-Ds that contain a particular text string in the name' def get_documents(self): - return get_documents_with(self.value).distinct() + return Document.objects.filter(type__name='Draft').filter(name__icontains=self.value).distinct() TYPES_OF_RULES = [(i.codename, i.description) for i in RuleManager.__subclasses__()]