|
7 | 7 |
|
8 | 8 | from ..utils.paired_field_descriptor import PairedFieldDescriptor |
9 | 9 | from .collection import Collection |
10 | | -from .collection_choice_fields import Divisions, DocumentTypes |
| 10 | +from .collection_choice_fields import Divisions, DocumentTypes, TDAMMTags |
11 | 11 | from .pattern import ExcludePattern, TitlePattern |
12 | 12 |
|
13 | 13 |
|
@@ -82,53 +82,9 @@ class CandidateURL(models.Model): |
82 | 82 | help_text="Helps keep track if the Current URL is present in production or not", |
83 | 83 | ) |
84 | 84 | is_tdamm = models.BooleanField("Is TDAMM?", default=False, help_text="Enable TDAMM tagging for this URL") |
85 | | - |
86 | | - TDAMM_TAG_CHOICES = [ |
87 | | - ("MMA_M_EM", "Messenger - EM Radiation"), |
88 | | - ("MMA_M_EM_G", "Messenger - EM Radiation - Gamma rays"), |
89 | | - ("MMA_M_EM_X", "Messenger - EM Radiation - X-rays"), |
90 | | - ("MMA_M_EM_U", "Messenger - EM Radiation - Ultraviolet"), |
91 | | - ("MMA_M_EM_O", "Messenger - EM Radiation - Optical"), |
92 | | - ("MMA_M_EM_I", "Messenger - EM Radiation - Infrared"), |
93 | | - ("MMA_M_EM_M", "Messenger - EM Radiation - Microwave"), |
94 | | - ("MMA_M_EM_R", "Messenger - EM Radiation - Radio"), |
95 | | - ("MMA_M_G", "Messenger - Gravitational Waves"), |
96 | | - ("MMA_M_G_CBI", "Messenger - Gravitational Waves - Compact Binary Inspiral"), |
97 | | - ("MMA_M_G_S", "Messenger - Gravitational Waves - Stochastic"), |
98 | | - ("MMA_M_G_CON", "Messenger - Gravitational Waves - Continuous"), |
99 | | - ("MMA_M_G_B", "Messenger - Gravitational Waves - Burst"), |
100 | | - ("MMA_M_C", "Messenger - Cosmic Rays"), |
101 | | - ("MMA_M_N", "Messenger - Neutrinos"), |
102 | | - ("MMA_O_BI", "Objects - Binaries"), |
103 | | - ("MMA_O_BI_BBH", "Objects - Binaries - Binary Black Holes"), |
104 | | - ("MMA_O_BI_BNS", "Objects - Binaries - Binary Neutron Stars"), |
105 | | - ("MMA_O_BI_C", "Objects - Binaries - Cataclysmic Variables"), |
106 | | - ("MMA_O_BI_N", "Objects - Binaries - Neutron Star-Black Hole"), |
107 | | - ("MMA_O_BI_B", "Objects - Binaries - Binary Pulsars"), |
108 | | - ("MMA_O_BI_W", "Objects - Binaries - White Dwarf Binaries"), |
109 | | - ("MMA_O_BH", "Objects - Black Holes"), |
110 | | - ("MMA_O_BH_AGN", "Objects - Black Holes - Active Galactic Nuclei"), |
111 | | - ("MMA_O_BH_IM", "Objects - Black Holes - Intermediate mass"), |
112 | | - ("MMA_O_BH_STM", "Objects - Black Holes - Stellar mass"), |
113 | | - ("MMA_O_BH_SUM", "Objects - Black Holes - Supermassive"), |
114 | | - ("MMA_O_E", "Objects - Exoplanets"), |
115 | | - ("MMA_O_N", "Objects - Neutron Stars"), |
116 | | - ("MMA_O_N_M", "Objects - Neutron Stars - Magnetars"), |
117 | | - ("MMA_O_N_P", "Objects - Neutron Stars - Pulsars"), |
118 | | - ("MMA_O_N_PWN", "Objects - Neutron Stars - Pulsar Wind Nebula"), |
119 | | - ("MMA_O_S", "Objects - Supernova Remnants"), |
120 | | - ("MMA_S_F", "Signals - Fast Radio Bursts"), |
121 | | - ("MMA_S_G", "Signals - Gamma-ray Bursts"), |
122 | | - ("MMA_S_K", "Signals - Kilonovae"), |
123 | | - ("MMA_S_N", "Signals - Novae"), |
124 | | - ("MMA_S_P", "Signals - Pevatrons"), |
125 | | - ("MMA_S_ST", "Signals - Stellar flares"), |
126 | | - ("MMA_S_SU", "Signals - Supernovae"), |
127 | | - ] |
128 | | - |
129 | 85 | tdamm_tag = PairedFieldDescriptor( |
130 | 86 | field_name="tdamm_tag", |
131 | | - field_type=ArrayField(models.CharField(max_length=255, choices=TDAMM_TAG_CHOICES), blank=True, null=True), |
| 87 | + field_type=ArrayField(models.CharField(max_length=255, choices=TDAMMTags.choices), blank=True, null=True), |
132 | 88 | switch="is_tdamm", |
133 | 89 | verbose_name="TDAMM Tags", |
134 | 90 | ) |
|
0 commit comments