- Rename IdSubmissionDetail to Submission - Rename various submission fields to correspond to the conventions in the new schema - Use a name model for the states instead of IdSubmissionStatus - Drop the TempIdAuthor model which is based on splitting up author names - Add a simple textual SubmissionEvent for tracking events in the lifetime of a submission - Delete a bunch of obsolete fields - Make sure all submission have an access key so we can depend on it - Add state for when approval is needed from previous authors A couple of migrations take care of transforming the IdSubmissionDetail and moving data over/cleaning it up. Also revamp the submit view code: - Make form code do validation/cleaning only so there's a clear separation of concerns - Reduce uses of inheritance that made the code hard to follow - forms now don't inherit from each other, views don't call each other but instead reuse common utilities, templates share CSS/utilities instead of relying on inheritance - Move email rendering/sending to separate file - Drop the in-grown terminology use (auto post vs. manual posts) - Make the status page explain who is emailed for what purpose - Add history table with recorded events - Make the status page handle its post actions by itself instead of duplicating most of the setup logic in a number of simple views - Fix a couple of minor bugs and handle some edge cases better - Expand tests with a couple of more cases Possibly the submit tool could still use more help text added to explain the process, ideally what's explained in the tool instructions page should be inlined or self-evident. - Legacy-Id: 6714
74 lines
3.1 KiB
Python
74 lines
3.1 KiB
Python
# Copyright The IETF Trust 2007, All Rights Reserved
|
|
|
|
from django.db import models
|
|
|
|
class NameModel(models.Model):
|
|
slug = models.CharField(max_length=8, primary_key=True)
|
|
name = models.CharField(max_length=255)
|
|
desc = models.TextField(blank=True)
|
|
used = models.BooleanField(default=True)
|
|
order = models.IntegerField(default=0)
|
|
|
|
def __unicode__(self):
|
|
return self.name
|
|
|
|
class Meta:
|
|
abstract = True
|
|
ordering = ['order']
|
|
|
|
class GroupStateName(NameModel):
|
|
"""BOF, Proposed, Active, Dormant, Concluded, Abandoned"""
|
|
class GroupTypeName(NameModel):
|
|
"""IETF, Area, WG, RG, Team, etc."""
|
|
class GroupMilestoneStateName(NameModel):
|
|
"""Active, Deleted, For Review, Chartering"""
|
|
class RoleName(NameModel):
|
|
"""AD, Chair"""
|
|
class StreamName(NameModel):
|
|
"""IETF, IAB, IRTF, ISE, Legacy"""
|
|
|
|
class DocRelationshipName(NameModel):
|
|
"""Updates, Replaces, Obsoletes, Reviews, ... The relationship is
|
|
always recorded in one direction."""
|
|
revname = models.CharField(max_length=255)
|
|
|
|
class DocTypeName(NameModel):
|
|
"""Draft, Agenda, Minutes, Charter, Discuss, Guideline, Email,
|
|
Review, Issue, Wiki"""
|
|
class DocTagName(NameModel):
|
|
"""Waiting for Reference, IANA Coordination, Revised ID Needed,
|
|
External Party, AD Followup, Point Raised - Writeup Needed, ..."""
|
|
class StdLevelName(NameModel):
|
|
"""Proposed Standard, (Draft Standard), Internet Standard, Experimental,
|
|
Informational, Best Current Practice, Historic, ..."""
|
|
class IntendedStdLevelName(NameModel):
|
|
"""Proposed Standard, (Draft Standard), Internet Standard, Experimental,
|
|
Informational, Best Current Practice, Historic, ..."""
|
|
class DocReminderTypeName(NameModel):
|
|
"Stream state"
|
|
class BallotPositionName(NameModel):
|
|
""" Yes, No Objection, Abstain, Discuss, Block, Recuse """
|
|
blocking = models.BooleanField(default=False)
|
|
class MeetingTypeName(NameModel):
|
|
"""IETF, Interim"""
|
|
class SessionStatusName(NameModel):
|
|
"""Waiting for Approval, Approved, Waiting for Scheduling, Scheduled, Cancelled, Disapproved"""
|
|
class TimeSlotTypeName(NameModel):
|
|
"""Session, Break, Registration"""
|
|
class ConstraintName(NameModel):
|
|
"""Conflict"""
|
|
penalty = models.IntegerField(default=0, help_text="The penalty for violating this kind of constraint; for instance 10 (small penalty) or 10000 (large penalty)")
|
|
class LiaisonStatementPurposeName(NameModel):
|
|
"""For action, For comment, For information, In response, Other"""
|
|
class NomineePositionState(NameModel):
|
|
"""Status of a candidate for a position: None, Accepted, Declined"""
|
|
class FeedbackType(NameModel):
|
|
"""Type of feedback: questionnaires, nominations, comments"""
|
|
class DBTemplateTypeName(NameModel):
|
|
"""reStructuredText, Plain, Django"""
|
|
class DraftSubmissionStateName(NameModel):
|
|
"""Uploaded, Awaiting Submitter Authentication, Awaiting Approval from
|
|
Previous Version Authors, Awaiting Initial Version Approval, Awaiting
|
|
Manual Post, Cancelled, Posted"""
|
|
next_states = models.ManyToManyField('DraftSubmissionStateName', related_name="previous_states", blank=True)
|