diff --git a/ietf/name/fixtures/names.json b/ietf/name/fixtures/names.json index d87bfe154..adc0d3fbc 100644 --- a/ietf/name/fixtures/names.json +++ b/ietf/name/fixtures/names.json @@ -81,6 +81,7 @@ "model": "name.constraintname", "fields": { "order": 0, + "penalty": 0, "used": true, "name": "Conflicts with", "desc": "" @@ -91,6 +92,7 @@ "model": "name.constraintname", "fields": { "order": 0, + "penalty": 0, "used": true, "name": "Conflicts with (secondary)", "desc": "" @@ -101,6 +103,7 @@ "model": "name.constraintname", "fields": { "order": 0, + "penalty": 0, "used": true, "name": "Conflicts with (tertiary)", "desc": "" @@ -700,6 +703,56 @@ "desc": "" } }, + { + "pk": "liaison", + "model": "name.doctypename", + "fields": { + "order": 0, + "used": false, + "name": "Liaison", + "desc": "" + } + }, + { + "pk": "comment", + "model": "name.feedbacktype", + "fields": { + "order": 0, + "used": true, + "name": "Comment", + "desc": "" + } + }, + { + "pk": "questio", + "model": "name.feedbacktype", + "fields": { + "order": 0, + "used": true, + "name": "Questionnaire response", + "desc": "" + } + }, + { + "pk": "nomina", + "model": "name.feedbacktype", + "fields": { + "order": 0, + "used": true, + "name": "Nomination", + "desc": "" + } + }, + { + "pk": "junk", + "model": "name.feedbacktype", + "fields": { + "order": 0, + "used": true, + "name": "Junk", + "desc": "" + } + }, { "pk": "active", "model": "name.groupmilestonestatename", @@ -920,6 +973,16 @@ "desc": "" } }, + { + "pk": "nomcom", + "model": "name.grouptypename", + "fields": { + "order": 0, + "used": true, + "name": "Nomcom", + "desc": "An IETF/IAB Nominating Committee. Use 'SDO' for external nominating committees." + } + }, { "pk": "ps", "model": "name.intendedstdlevelname", @@ -1050,6 +1113,36 @@ "desc": "" } }, + { + "pk": "pending", + "model": "name.nomineepositionstate", + "fields": { + "order": 0, + "used": true, + "name": "Nominated, pending response", + "desc": "" + } + }, + { + "pk": "accepted", + "model": "name.nomineepositionstate", + "fields": { + "order": 0, + "used": true, + "name": "Accepted", + "desc": "" + } + }, + { + "pk": "declined", + "model": "name.nomineepositionstate", + "fields": { + "order": 0, + "used": true, + "name": "Declined", + "desc": "" + } + }, { "pk": "ad", "model": "name.rolename", @@ -2623,6 +2716,19 @@ "desc": "Independent Submission awaiting author update, or in discussion between author and ISE" } }, + { + "pk": 133, + "model": "doc.state", + "fields": { + "used": true, + "name": "Pending", + "next_states": [], + "slug": "pending", + "type": "draft-rfceditor", + "order": 0, + "desc": "" + } + }, { "pk": 45, "model": "doc.state", @@ -2753,6 +2859,21 @@ "desc": "This document was an active IAB document, but for some reason it is no longer being pursued for the IAB stream. It is possible that the document might be revived later, possibly in another stream." } }, + { + "pk": 134, + "model": "doc.state", + "fields": { + "used": true, + "name": "Candidate for WG Adoption", + "next_states": [ + 35 + ], + "slug": "wg-cand", + "type": "draft-stream-ietf", + "order": 0, + "desc": "The document has been marked as a candidate for WG adoption by the WG Chair. This state can be used before a call for adoption is issued (and the document is put in the \"Call For Adoption By WG Issued\" state), to indicate that the document is in the queue for a call for adoption, even if none has been issued yet." + } + }, { "pk": 35, "model": "doc.state", diff --git a/ietf/name/generate_fixtures.py b/ietf/name/generate_fixtures.py index 58a485df3..144f17475 100755 --- a/ietf/name/generate_fixtures.py +++ b/ietf/name/generate_fixtures.py @@ -29,12 +29,13 @@ def output(name, qs): # pick all name models directly out of the module objects = [] +import inspect import ietf.name.models for n in dir(ietf.name.models): - if n[:1].upper() == n[:1] and n.endswith("Name"): - model = getattr(ietf.name.models, n) - if not model._meta.abstract: - objects.extend(model.objects.all()) + symbol = getattr(ietf.name.models, n) + if inspect.isclass(symbol) and issubclass(symbol, ietf.name.models.NameModel): + if not symbol._meta.abstract: + objects.extend(symbol.objects.all()) import ietf.doc.models # also pick some other name-like types while we're at it