Removed unused imports. Added some explicit orderings to avoid pagination issues.
- Legacy-Id: 14664
This commit is contained in:
parent
a7085715f5
commit
a4768bb514
|
@ -6,7 +6,7 @@ from django.urls import reverse as urlreverse
|
||||||
from ietf.doc.models import Document, DocEvent, State
|
from ietf.doc.models import Document, DocEvent, State
|
||||||
from ietf.group.models import Group
|
from ietf.group.models import Group
|
||||||
from ietf.person.models import Person, Email
|
from ietf.person.models import Person, Email
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
class CommunityList(models.Model):
|
class CommunityList(models.Model):
|
||||||
user = ForeignKey(User, blank=True, null=True)
|
user = ForeignKey(User, blank=True, null=True)
|
||||||
|
|
|
@ -2,7 +2,7 @@ from django.db import models
|
||||||
|
|
||||||
from ietf.group.models import Group
|
from ietf.group.models import Group
|
||||||
from ietf.name.models import DBTemplateTypeName
|
from ietf.name.models import DBTemplateTypeName
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
|
|
||||||
TEMPLATE_TYPES = (
|
TEMPLATE_TYPES = (
|
||||||
|
|
|
@ -27,7 +27,7 @@ from ietf.utils import log
|
||||||
from ietf.utils.admin import admin_link
|
from ietf.utils.admin import admin_link
|
||||||
from ietf.utils.validators import validate_no_control_chars
|
from ietf.utils.validators import validate_no_control_chars
|
||||||
from ietf.utils.mail import formataddr
|
from ietf.utils.mail import formataddr
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
logger = logging.getLogger('django')
|
logger = logging.getLogger('django')
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ from ietf.doc.models import DocAlias
|
||||||
from ietf.name.models import DocRelationshipName,IprDisclosureStateName,IprLicenseTypeName,IprEventTypeName
|
from ietf.name.models import DocRelationshipName,IprDisclosureStateName,IprLicenseTypeName,IprEventTypeName
|
||||||
from ietf.person.models import Person
|
from ietf.person.models import Person
|
||||||
from ietf.message.models import Message
|
from ietf.message.models import Message
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
class IprDisclosureBase(models.Model):
|
class IprDisclosureBase(models.Model):
|
||||||
by = ForeignKey(Person) # who was logged in, or System if nobody was logged in
|
by = ForeignKey(Person) # who was logged in, or System if nobody was logged in
|
||||||
|
@ -26,6 +26,9 @@ class IprDisclosureBase(models.Model):
|
||||||
time = models.DateTimeField(auto_now_add=True)
|
time = models.DateTimeField(auto_now_add=True)
|
||||||
title = models.CharField(blank=True, max_length=255)
|
title = models.CharField(blank=True, max_length=255)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
ordering = ['-time', '-id']
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ from ietf.name.models import (LiaisonStatementPurposeName, LiaisonStatementState
|
||||||
DocRelationshipName)
|
DocRelationshipName)
|
||||||
from ietf.doc.models import Document
|
from ietf.doc.models import Document
|
||||||
from ietf.group.models import Group
|
from ietf.group.models import Group
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
# maps (previous state id, new state id) to event type id
|
# maps (previous state id, new state id) to event type id
|
||||||
STATE_EVENT_MAPPING = {
|
STATE_EVENT_MAPPING = {
|
||||||
|
@ -45,6 +45,10 @@ class LiaisonStatement(models.Model):
|
||||||
attachments = models.ManyToManyField(Document, through='LiaisonStatementAttachment', blank=True)
|
attachments = models.ManyToManyField(Document, through='LiaisonStatementAttachment', blank=True)
|
||||||
state = ForeignKey(LiaisonStatementState, default='pending')
|
state = ForeignKey(LiaisonStatementState, default='pending')
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
ordering = ['id']
|
||||||
|
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.title or u"<no title>"
|
return self.title or u"<no title>"
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ from django.core.validators import validate_email
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
from ietf.person.models import Person
|
from ietf.person.models import Person
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
class List(models.Model):
|
class List(models.Model):
|
||||||
name = models.CharField(max_length=32)
|
name = models.CharField(max_length=32)
|
||||||
|
|
|
@ -27,7 +27,7 @@ from ietf.person.models import Person
|
||||||
from ietf.utils.storage import NoLocationMigrationFileSystemStorage
|
from ietf.utils.storage import NoLocationMigrationFileSystemStorage
|
||||||
from ietf.utils.text import xslugify
|
from ietf.utils.text import xslugify
|
||||||
from ietf.utils.timezone import date2datetime
|
from ietf.utils.timezone import date2datetime
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
countries = pytz.country_names.items()
|
countries = pytz.country_names.items()
|
||||||
countries.sort(lambda x,y: cmp(x[1], y[1]))
|
countries.sort(lambda x,y: cmp(x[1], y[1]))
|
||||||
|
|
|
@ -9,7 +9,7 @@ from ietf.person.models import Person
|
||||||
from ietf.group.models import Group
|
from ietf.group.models import Group
|
||||||
from ietf.doc.models import Document
|
from ietf.doc.models import Document
|
||||||
from ietf.name.models import RoleName
|
from ietf.name.models import RoleName
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
class Message(models.Model):
|
class Message(models.Model):
|
||||||
time = models.DateTimeField(default=datetime.datetime.now)
|
time = models.DateTimeField(default=datetime.datetime.now)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
class NameModel(models.Model):
|
class NameModel(models.Model):
|
||||||
slug = models.CharField(max_length=32, primary_key=True)
|
slug = models.CharField(max_length=32, primary_key=True)
|
||||||
|
|
|
@ -23,7 +23,7 @@ from ietf.nomcom.utils import (initialize_templates_for_group,
|
||||||
initialize_requirements_for_position,
|
initialize_requirements_for_position,
|
||||||
initialize_description_for_topic,
|
initialize_description_for_topic,
|
||||||
delete_nomcom_templates)
|
delete_nomcom_templates)
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
from ietf.utils.storage import NoLocationMigrationFileSystemStorage
|
from ietf.utils.storage import NoLocationMigrationFileSystemStorage
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
class Redirect(models.Model):
|
class Redirect(models.Model):
|
||||||
"""Mapping of CGI script to url. The "rest" is a
|
"""Mapping of CGI script to url. The "rest" is a
|
||||||
|
|
|
@ -7,7 +7,7 @@ import debug # pyflakes:ignore
|
||||||
from ietf.meeting.models import Meeting
|
from ietf.meeting.models import Meeting
|
||||||
from ietf.name.models import CountryName
|
from ietf.name.models import CountryName
|
||||||
from ietf.person.models import Person
|
from ietf.person.models import Person
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
|
|
||||||
class AffiliationAlias(models.Model):
|
class AffiliationAlias(models.Model):
|
||||||
|
|
|
@ -12,7 +12,7 @@ from ietf.group.models import Group
|
||||||
from ietf.message.models import Message
|
from ietf.message.models import Message
|
||||||
from ietf.name.models import DraftSubmissionStateName, FormalLanguageName
|
from ietf.name.models import DraftSubmissionStateName, FormalLanguageName
|
||||||
from ietf.utils.accesstoken import generate_random_key, generate_access_token
|
from ietf.utils.accesstoken import generate_random_key, generate_access_token
|
||||||
from ietf.utils.models import ForeignKey, OneToOneField
|
from ietf.utils.models import ForeignKey
|
||||||
|
|
||||||
|
|
||||||
def parse_email_line(line):
|
def parse_email_line(line):
|
||||||
|
|
Loading…
Reference in a new issue