aa-structures 2.6.0__py3-none-any.whl → 2.6.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. {aa_structures-2.6.0.dist-info → aa_structures-2.6.2.dist-info}/METADATA +1 -1
  2. {aa_structures-2.6.0.dist-info → aa_structures-2.6.2.dist-info}/RECORD +37 -38
  3. structures/__init__.py +1 -1
  4. structures/admin.py +208 -206
  5. structures/core/notification_embeds/billing_embeds.py +11 -10
  6. structures/core/notification_embeds/character_embeds.py +18 -17
  7. structures/core/notification_embeds/main.py +6 -6
  8. structures/core/notification_embeds/moonmining_embeds.py +25 -26
  9. structures/core/notification_embeds/orbital_embeds.py +8 -7
  10. structures/core/notification_embeds/sov_embeds.py +26 -35
  11. structures/core/notification_embeds/structures_embeds.py +67 -64
  12. structures/core/notification_embeds/tower_embeds.py +29 -22
  13. structures/core/notification_embeds/war_embeds.py +33 -44
  14. structures/core/serializers.py +1 -1
  15. structures/helpers.py +7 -1
  16. structures/locale/de/LC_MESSAGES/django.po +1036 -185
  17. structures/locale/django.pot +1054 -184
  18. structures/locale/en/LC_MESSAGES/django.po +1054 -184
  19. structures/locale/es/LC_MESSAGES/django.po +1035 -184
  20. structures/locale/fr_FR/LC_MESSAGES/django.po +1054 -184
  21. structures/locale/it_IT/LC_MESSAGES/django.po +1054 -184
  22. structures/locale/ja/LC_MESSAGES/django.po +1054 -184
  23. structures/locale/ko_KR/LC_MESSAGES/django.po +1035 -184
  24. structures/locale/ru/LC_MESSAGES/django.mo +0 -0
  25. structures/locale/ru/LC_MESSAGES/django.po +1144 -199
  26. structures/locale/uk/LC_MESSAGES/django.po +1035 -184
  27. structures/locale/zh_Hans/LC_MESSAGES/django.po +1036 -185
  28. structures/migrations/0004_improve_localization.py +401 -0
  29. structures/models/notifications.py +3 -3
  30. structures/models/owners.py +11 -11
  31. structures/models/structures_1.py +16 -16
  32. structures/templates/structures/base.html +1 -1
  33. structures/tests/test_helpers.py +13 -0
  34. structures/views.py +1 -2
  35. structures/webhooks/models.py +14 -5
  36. structures/locale/ko/LC_MESSAGES/django.mo +0 -0
  37. structures/locale/ko/LC_MESSAGES/django.po +0 -2221
  38. {aa_structures-2.6.0.dist-info → aa_structures-2.6.2.dist-info}/LICENSE +0 -0
  39. {aa_structures-2.6.0.dist-info → aa_structures-2.6.2.dist-info}/WHEEL +0 -0
@@ -0,0 +1,401 @@
1
+ # Generated by Django 4.0.10 on 2023-10-30 17:26
2
+
3
+ import django.core.validators
4
+ import django.db.models.deletion
5
+ import django.utils.timezone
6
+ from django.db import migrations, models
7
+
8
+
9
+ class Migration(migrations.Migration):
10
+ dependencies = [
11
+ ("eveuniverse", "0010_alter_eveindustryactivityduration_eve_type_and_more"),
12
+ ("authentication", "0021_alter_userprofile_language"),
13
+ ("structures", "0003_add_localization_and_unique_key"),
14
+ ]
15
+
16
+ operations = [
17
+ migrations.AlterField(
18
+ model_name="fuelalert",
19
+ name="hours",
20
+ field=models.PositiveIntegerField(
21
+ db_index=True,
22
+ help_text="Number of hours before fuel expiration this alert was sent",
23
+ verbose_name="hours",
24
+ ),
25
+ ),
26
+ migrations.AlterField(
27
+ model_name="generatednotification",
28
+ name="notif_type",
29
+ field=models.CharField(
30
+ db_index=True,
31
+ default="",
32
+ help_text="Type of this notification",
33
+ max_length=100,
34
+ verbose_name="type",
35
+ ),
36
+ ),
37
+ migrations.AlterField(
38
+ model_name="notification",
39
+ name="notif_type",
40
+ field=models.CharField(
41
+ db_index=True,
42
+ default="",
43
+ help_text="Type of this notification",
44
+ max_length=100,
45
+ verbose_name="type",
46
+ ),
47
+ ),
48
+ migrations.AlterField(
49
+ model_name="owner",
50
+ name="forwarding_last_update_at",
51
+ field=models.DateTimeField(
52
+ blank=True,
53
+ default=None,
54
+ help_text="When the last successful update happened",
55
+ null=True,
56
+ verbose_name="forwarding last update at",
57
+ ),
58
+ ),
59
+ migrations.AlterField(
60
+ model_name="owner",
61
+ name="has_default_pings_enabled",
62
+ field=models.BooleanField(
63
+ default=True,
64
+ help_text="To enable or disable pinging of notifications for this owner e.g. with @everyone and @here",
65
+ verbose_name="has default pings enabled",
66
+ ),
67
+ ),
68
+ migrations.AlterField(
69
+ model_name="owner",
70
+ name="is_active",
71
+ field=models.BooleanField(
72
+ default=True,
73
+ help_text="Whether this owner is currently included in the sync process",
74
+ verbose_name="is active",
75
+ ),
76
+ ),
77
+ migrations.AlterField(
78
+ model_name="owner",
79
+ name="is_alliance_main",
80
+ field=models.BooleanField(
81
+ default=False,
82
+ help_text="Whether alliance wide notifications are forwarded for this owner (e.g. sov notifications)",
83
+ verbose_name="is alliance main",
84
+ ),
85
+ ),
86
+ migrations.AlterField(
87
+ model_name="owner",
88
+ name="is_included_in_service_status",
89
+ field=models.BooleanField(
90
+ default=True,
91
+ help_text="Whether the sync status of this owner is included in the overall status of this services",
92
+ verbose_name="is included in service status",
93
+ ),
94
+ ),
95
+ migrations.AlterField(
96
+ model_name="owner",
97
+ name="is_up",
98
+ field=models.BooleanField(
99
+ default=None,
100
+ editable=False,
101
+ help_text="Whether all services for this owner are currently up",
102
+ null=True,
103
+ verbose_name="is up",
104
+ ),
105
+ ),
106
+ migrations.AlterField(
107
+ model_name="owner",
108
+ name="notifications_last_update_at",
109
+ field=models.DateTimeField(
110
+ blank=True,
111
+ default=None,
112
+ help_text="When the last successful update happened",
113
+ null=True,
114
+ verbose_name="notifications last update at",
115
+ ),
116
+ ),
117
+ migrations.AlterField(
118
+ model_name="owner",
119
+ name="structures_last_update_at",
120
+ field=models.DateTimeField(
121
+ blank=True,
122
+ default=None,
123
+ help_text="When the last successful update happened",
124
+ null=True,
125
+ verbose_name="structures last update at",
126
+ ),
127
+ ),
128
+ migrations.AlterField(
129
+ model_name="ownercharacter",
130
+ name="character_ownership",
131
+ field=models.ForeignKey(
132
+ help_text="Character used for syncing",
133
+ on_delete=django.db.models.deletion.CASCADE,
134
+ related_name="+",
135
+ to="authentication.characterownership",
136
+ verbose_name="character_ownership",
137
+ ),
138
+ ),
139
+ migrations.AlterField(
140
+ model_name="ownercharacter",
141
+ name="notifications_last_used_at",
142
+ field=models.DateTimeField(
143
+ db_index=True,
144
+ default=None,
145
+ editable=False,
146
+ help_text="When this character was last used for syncing notifications",
147
+ null=True,
148
+ verbose_name="notifications last used at",
149
+ ),
150
+ ),
151
+ migrations.AlterField(
152
+ model_name="ownercharacter",
153
+ name="structures_last_used_at",
154
+ field=models.DateTimeField(
155
+ db_index=True,
156
+ default=None,
157
+ editable=False,
158
+ help_text="When this character was last used for syncing structures",
159
+ null=True,
160
+ verbose_name="structures last used at",
161
+ ),
162
+ ),
163
+ migrations.AlterField(
164
+ model_name="structure",
165
+ name="created_at",
166
+ field=models.DateTimeField(
167
+ default=django.utils.timezone.now,
168
+ help_text="Date this structure was received from ESI for the first time",
169
+ verbose_name="created at",
170
+ ),
171
+ ),
172
+ migrations.AlterField(
173
+ model_name="structure",
174
+ name="has_core",
175
+ field=models.BooleanField(
176
+ blank=True,
177
+ db_index=True,
178
+ default=None,
179
+ help_text="Whether the structure has a quantum core",
180
+ null=True,
181
+ verbose_name="has core",
182
+ ),
183
+ ),
184
+ migrations.AlterField(
185
+ model_name="structure",
186
+ name="has_fitting",
187
+ field=models.BooleanField(
188
+ blank=True,
189
+ db_index=True,
190
+ default=None,
191
+ help_text="Whether the structure has a fitting",
192
+ null=True,
193
+ verbose_name="has fitting",
194
+ ),
195
+ ),
196
+ migrations.AlterField(
197
+ model_name="structure",
198
+ name="last_online_at",
199
+ field=models.DateTimeField(
200
+ blank=True,
201
+ default=None,
202
+ help_text="Date this structure had any of it's services online",
203
+ null=True,
204
+ verbose_name="last online at",
205
+ ),
206
+ ),
207
+ migrations.AlterField(
208
+ model_name="structure",
209
+ name="last_updated_at",
210
+ field=models.DateTimeField(
211
+ blank=True,
212
+ default=None,
213
+ help_text="Date this structure was last updated from the EVE server",
214
+ null=True,
215
+ verbose_name="last updated at",
216
+ ),
217
+ ),
218
+ migrations.AlterField(
219
+ model_name="structure",
220
+ name="position_x",
221
+ field=models.FloatField(
222
+ blank=True,
223
+ default=None,
224
+ help_text="X coordinate of position in the solar system",
225
+ null=True,
226
+ verbose_name="position x",
227
+ ),
228
+ ),
229
+ migrations.AlterField(
230
+ model_name="structure",
231
+ name="position_y",
232
+ field=models.FloatField(
233
+ blank=True,
234
+ default=None,
235
+ help_text="Y coordinate of position in the solar system",
236
+ null=True,
237
+ verbose_name="position y",
238
+ ),
239
+ ),
240
+ migrations.AlterField(
241
+ model_name="structure",
242
+ name="position_z",
243
+ field=models.FloatField(
244
+ blank=True,
245
+ default=None,
246
+ help_text="Z coordinate of position in the solar system",
247
+ null=True,
248
+ verbose_name="position z",
249
+ ),
250
+ ),
251
+ migrations.AlterField(
252
+ model_name="structureitem",
253
+ name="eve_type",
254
+ field=models.ForeignKey(
255
+ help_text="Type of the item",
256
+ on_delete=django.db.models.deletion.CASCADE,
257
+ related_name="+",
258
+ to="eveuniverse.evetype",
259
+ verbose_name="type",
260
+ ),
261
+ ),
262
+ migrations.AlterField(
263
+ model_name="structuretag",
264
+ name="description",
265
+ field=models.TextField(
266
+ blank=True,
267
+ default=None,
268
+ help_text="Description for this tag",
269
+ null=True,
270
+ verbose_name="description",
271
+ ),
272
+ ),
273
+ migrations.AlterField(
274
+ model_name="structuretag",
275
+ name="is_default",
276
+ field=models.BooleanField(
277
+ default=False,
278
+ help_text="When enabled this custom tag will automatically be added to new structures",
279
+ verbose_name="is default",
280
+ ),
281
+ ),
282
+ migrations.AlterField(
283
+ model_name="structuretag",
284
+ name="is_user_managed",
285
+ field=models.BooleanField(
286
+ default=True,
287
+ help_text="When disabled this tag is created and managed by the system and can not be modified by users",
288
+ verbose_name="is user managed",
289
+ ),
290
+ ),
291
+ migrations.AlterField(
292
+ model_name="structuretag",
293
+ name="name",
294
+ field=models.CharField(
295
+ help_text="Name of the tag, which must be unique",
296
+ max_length=255,
297
+ unique=True,
298
+ verbose_name="name",
299
+ ),
300
+ ),
301
+ migrations.AlterField(
302
+ model_name="structuretag",
303
+ name="order",
304
+ field=models.PositiveIntegerField(
305
+ blank=True,
306
+ default=100,
307
+ help_text="Number defining the order tags are shown. custom tags can not have an order below 100",
308
+ validators=[django.core.validators.MinValueValidator(100)],
309
+ verbose_name="order",
310
+ ),
311
+ ),
312
+ migrations.AlterField(
313
+ model_name="structuretag",
314
+ name="style",
315
+ field=models.CharField(
316
+ blank=True,
317
+ choices=[
318
+ ("default", "grey"),
319
+ ("primary", "dark blue"),
320
+ ("success", "green"),
321
+ ("info", "light blue"),
322
+ ("warning", "orange"),
323
+ ("danger", "red"),
324
+ ],
325
+ default="default",
326
+ help_text="Color style of tag",
327
+ max_length=16,
328
+ verbose_name="style",
329
+ ),
330
+ ),
331
+ migrations.AlterField(
332
+ model_name="webhook",
333
+ name="is_active",
334
+ field=models.BooleanField(
335
+ default=True,
336
+ help_text="Whether notifications are currently sent to this webhook",
337
+ verbose_name="is active",
338
+ ),
339
+ ),
340
+ migrations.AlterField(
341
+ model_name="webhook",
342
+ name="language_code",
343
+ field=models.CharField(
344
+ blank=True,
345
+ choices=[
346
+ ("en", "English"),
347
+ ("de", "German"),
348
+ ("es", "Spanish"),
349
+ ("zh-hans", "Chinese Simplified"),
350
+ ("ru", "Russian"),
351
+ ("ko", "Korean"),
352
+ ],
353
+ default=None,
354
+ help_text="Language of notifications send to this webhook",
355
+ max_length=8,
356
+ null=True,
357
+ verbose_name="language",
358
+ ),
359
+ ),
360
+ migrations.AlterField(
361
+ model_name="webhook",
362
+ name="name",
363
+ field=models.CharField(
364
+ help_text="Short name to identify this webhook",
365
+ max_length=64,
366
+ unique=True,
367
+ verbose_name="name",
368
+ ),
369
+ ),
370
+ migrations.AlterField(
371
+ model_name="webhook",
372
+ name="notes",
373
+ field=models.TextField(
374
+ blank=True,
375
+ default=None,
376
+ help_text="Notes regarding this webhook",
377
+ null=True,
378
+ verbose_name="notes",
379
+ ),
380
+ ),
381
+ migrations.AlterField(
382
+ model_name="webhook",
383
+ name="url",
384
+ field=models.CharField(
385
+ help_text="URL of this webhook, e.g. https://discordapp.com/api/webhooks/123456/abcdef",
386
+ max_length=255,
387
+ unique=True,
388
+ verbose_name="url",
389
+ ),
390
+ ),
391
+ migrations.AlterField(
392
+ model_name="webhook",
393
+ name="webhook_type",
394
+ field=models.IntegerField(
395
+ choices=[(1, "Discord Webhook")],
396
+ default=1,
397
+ help_text="Type of this webhook",
398
+ verbose_name="webhook type",
399
+ ),
400
+ ),
401
+ ]
@@ -80,7 +80,7 @@ class Webhook(WebhookBase):
80
80
  null=True,
81
81
  blank=True,
82
82
  verbose_name=_("language"),
83
- help_text=_("language of notifications send to this webhook"),
83
+ help_text=_("Language of notifications send to this webhook"),
84
84
  )
85
85
  is_default = models.BooleanField(
86
86
  default=False,
@@ -137,7 +137,7 @@ class NotificationBase(models.Model):
137
137
  default="",
138
138
  db_index=True,
139
139
  verbose_name=_("type"),
140
- help_text=_("type of this notification"),
140
+ help_text=_("Type of this notification"),
141
141
  )
142
142
  owner = models.ForeignKey(
143
143
  "Owner",
@@ -919,7 +919,7 @@ class FuelAlert(BaseFuelAlert):
919
919
  hours = models.PositiveIntegerField(
920
920
  db_index=True,
921
921
  verbose_name=_("hours"),
922
- help_text=_("number of hours before fuel expiration this alert was sent"),
922
+ help_text=_("Number of hours before fuel expiration this alert was sent"),
923
923
  )
924
924
 
925
925
  class Meta:
@@ -144,26 +144,26 @@ class Owner(models.Model):
144
144
  default=None,
145
145
  blank=True,
146
146
  verbose_name=_("forwarding last update at"),
147
- help_text=_("when the last successful update happened"),
147
+ help_text=_("When the last successful update happened"),
148
148
  )
149
149
  has_default_pings_enabled = models.BooleanField(
150
150
  default=True,
151
151
  verbose_name=_("has default pings enabled"),
152
152
  help_text=_(
153
- "to enable or disable pinging of notifications for this owner "
153
+ "To enable or disable pinging of notifications for this owner "
154
154
  "e.g. with @everyone and @here"
155
155
  ),
156
156
  )
157
157
  is_active = models.BooleanField(
158
158
  default=True,
159
159
  verbose_name=_("is active"),
160
- help_text=_("whether this owner is currently included in the sync process"),
160
+ help_text=_("Whether this owner is currently included in the sync process"),
161
161
  )
162
162
  is_alliance_main = models.BooleanField(
163
163
  default=False,
164
164
  verbose_name=_("is alliance main"),
165
165
  help_text=_(
166
- "whether alliance wide notifications "
166
+ "Whether alliance wide notifications "
167
167
  "are forwarded for this owner (e.g. sov notifications)"
168
168
  ),
169
169
  )
@@ -171,7 +171,7 @@ class Owner(models.Model):
171
171
  default=True,
172
172
  verbose_name=_("is included in service status"),
173
173
  help_text=_(
174
- "whether the sync status of this owner is included in "
174
+ "Whether the sync status of this owner is included in "
175
175
  "the overall status of this services"
176
176
  ),
177
177
  )
@@ -180,14 +180,14 @@ class Owner(models.Model):
180
180
  default=None,
181
181
  editable=False,
182
182
  verbose_name=_("is up"),
183
- help_text=_("whether all services for this owner are currently up"),
183
+ help_text=_("Whether all services for this owner are currently up"),
184
184
  )
185
185
  notifications_last_update_at = models.DateTimeField(
186
186
  null=True,
187
187
  default=None,
188
188
  blank=True,
189
189
  verbose_name=_("notifications last update at"),
190
- help_text=_("when the last successful update happened"),
190
+ help_text=_("When the last successful update happened"),
191
191
  )
192
192
  ping_groups = models.ManyToManyField(
193
193
  Group,
@@ -202,7 +202,7 @@ class Owner(models.Model):
202
202
  default=None,
203
203
  blank=True,
204
204
  verbose_name=_("structures last update at"),
205
- help_text=_("when the last successful update happened"),
205
+ help_text=_("When the last successful update happened"),
206
206
  )
207
207
  webhooks = models.ManyToManyField(
208
208
  "Webhook",
@@ -1308,7 +1308,7 @@ class OwnerCharacter(models.Model):
1308
1308
  on_delete=models.CASCADE,
1309
1309
  related_name="+",
1310
1310
  verbose_name=_("character_ownership"),
1311
- help_text="character used for syncing",
1311
+ help_text="Character used for syncing",
1312
1312
  )
1313
1313
  structures_last_used_at = models.DateTimeField(
1314
1314
  null=True,
@@ -1316,7 +1316,7 @@ class OwnerCharacter(models.Model):
1316
1316
  editable=False,
1317
1317
  db_index=True,
1318
1318
  verbose_name=_("structures last used at"),
1319
- help_text="when this character was last used for syncing structures",
1319
+ help_text=_("When this character was last used for syncing structures"),
1320
1320
  )
1321
1321
  notifications_last_used_at = models.DateTimeField(
1322
1322
  null=True,
@@ -1324,7 +1324,7 @@ class OwnerCharacter(models.Model):
1324
1324
  editable=False,
1325
1325
  db_index=True,
1326
1326
  verbose_name=_("notifications last used at"),
1327
- help_text="when this character was last used for syncing notifications",
1327
+ help_text=_("When this character was last used for syncing notifications"),
1328
1328
  )
1329
1329
  error_count = models.PositiveIntegerField(
1330
1330
  default=0,
@@ -62,14 +62,14 @@ class StructureTag(models.Model):
62
62
  max_length=255,
63
63
  unique=True,
64
64
  verbose_name=_("name"),
65
- help_text=_("name of the tag - must be unique"),
65
+ help_text=_("Name of the tag, which must be unique"),
66
66
  )
67
67
  description = models.TextField(
68
68
  null=True,
69
69
  default=None,
70
70
  blank=True,
71
71
  verbose_name=_("description"),
72
- help_text=_("description for this tag"),
72
+ help_text=_("Description for this tag"),
73
73
  )
74
74
  style = models.CharField(
75
75
  max_length=16,
@@ -77,7 +77,7 @@ class StructureTag(models.Model):
77
77
  default="default",
78
78
  blank=True,
79
79
  verbose_name=_("style"),
80
- help_text=_("color style of tag"),
80
+ help_text=_("Color style of tag"),
81
81
  )
82
82
  order = models.PositiveIntegerField(
83
83
  default=100,
@@ -85,7 +85,7 @@ class StructureTag(models.Model):
85
85
  validators=[MinValueValidator(100)],
86
86
  verbose_name=_("order"),
87
87
  help_text=_(
88
- "number defining the order tags are shown. "
88
+ "Number defining the order tags are shown. "
89
89
  "custom tags can not have an order below 100"
90
90
  ),
91
91
  )
@@ -93,14 +93,14 @@ class StructureTag(models.Model):
93
93
  default=False,
94
94
  verbose_name=_("is default"),
95
95
  help_text=_(
96
- "if true this custom tag will automatically be added to new structures"
97
- ), # TODO: with next migration change to: "When enabled..."
96
+ "When enabled this custom tag will automatically be added to new structures"
97
+ ),
98
98
  )
99
99
  is_user_managed = models.BooleanField(
100
100
  default=True,
101
101
  verbose_name=_("is user managed"),
102
102
  help_text=_(
103
- "if False this tag is created and managed by the system "
103
+ "When disabled this tag is created and managed by the system "
104
104
  "and can not be modified by users"
105
105
  ),
106
106
  )
@@ -214,7 +214,7 @@ class Structure(models.Model): # pylint: disable = too-many-public-methods
214
214
  created_at = models.DateTimeField(
215
215
  default=now,
216
216
  verbose_name=_("created at"),
217
- help_text=_("date this structure was received from ESI for the first time"),
217
+ help_text=_("Date this structure was received from ESI for the first time"),
218
218
  )
219
219
  eve_moon = models.ForeignKey(
220
220
  EveMoon,
@@ -263,7 +263,7 @@ class Structure(models.Model): # pylint: disable = too-many-public-methods
263
263
  blank=True,
264
264
  db_index=True,
265
265
  verbose_name=_("has fitting"),
266
- help_text=_("bool indicating if the structure has a fitting"),
266
+ help_text="Whether the structure has a fitting",
267
267
  )
268
268
  has_core = models.BooleanField(
269
269
  null=True,
@@ -271,21 +271,21 @@ class Structure(models.Model): # pylint: disable = too-many-public-methods
271
271
  blank=True,
272
272
  db_index=True,
273
273
  verbose_name=_("has core"),
274
- help_text=_("bool indicating if the structure has a quantum core"),
274
+ help_text="Whether the structure has a quantum core",
275
275
  )
276
276
  last_online_at = models.DateTimeField(
277
277
  null=True,
278
278
  default=None,
279
279
  blank=True,
280
280
  verbose_name=_("last online at"),
281
- help_text=_("date this structure had any of it's services online"),
281
+ help_text=_("Date this structure had any of it's services online"),
282
282
  )
283
283
  last_updated_at = models.DateTimeField(
284
284
  null=True,
285
285
  default=None,
286
286
  blank=True,
287
287
  verbose_name=_("last updated at"),
288
- help_text=_("date this structure was last updated from the EVE server"),
288
+ help_text=_("Date this structure was last updated from the EVE server"),
289
289
  )
290
290
  name = models.CharField(
291
291
  max_length=255,
@@ -337,21 +337,21 @@ class Structure(models.Model): # pylint: disable = too-many-public-methods
337
337
  default=None,
338
338
  blank=True,
339
339
  verbose_name=_("position x"),
340
- help_text=_("x position in the solar system"),
340
+ help_text=_("X coordinate of position in the solar system"),
341
341
  )
342
342
  position_y = models.FloatField(
343
343
  null=True,
344
344
  default=None,
345
345
  blank=True,
346
346
  verbose_name=_("position y"),
347
- help_text=_("y position in the solar system"),
347
+ help_text=_("Y coordinate of position in the solar system"),
348
348
  )
349
349
  position_z = models.FloatField(
350
350
  null=True,
351
351
  default=None,
352
352
  blank=True,
353
353
  verbose_name=_("position z"),
354
- help_text=_("z position in the solar system"),
354
+ help_text=_("Z coordinate of position in the solar system"),
355
355
  )
356
356
  state = models.IntegerField(
357
357
  choices=State.choices,
@@ -807,7 +807,7 @@ class StructureItem(models.Model):
807
807
  on_delete=models.CASCADE,
808
808
  related_name="+",
809
809
  verbose_name=_("type"),
810
- help_text=_("type of the item"),
810
+ help_text="Type of the item",
811
811
  )
812
812
  is_singleton = models.BooleanField(verbose_name=_("is singleton"))
813
813
  last_updated_at = models.DateTimeField(
@@ -4,7 +4,7 @@
4
4
  {% block page_title %}{% translate "Structures" %}{% endblock %}
5
5
 
6
6
  {% block content %}
7
- <h2 class="text-center">{{ page_title }}</h2>
7
+ <h2 class="text-center">{% translate "Structures" %}</h2>
8
8
  <div class="col-lg-12 container">
9
9
  {% block details %}{% endblock %}
10
10
  </div>
@@ -2,9 +2,12 @@ import datetime as dt
2
2
 
3
3
  from django.test import TestCase
4
4
  from django.utils.timezone import now
5
+ from eveuniverse.models import EveType
6
+ from eveuniverse.tests.testdata.factories_2 import EveTypeFactory
5
7
 
6
8
  from structures.helpers import (
7
9
  datetime_almost_equal,
10
+ get_or_create_esi_obj,
8
11
  hours_until_deadline,
9
12
  is_absolute_url,
10
13
  )
@@ -69,3 +72,13 @@ class TestIsAbsoluteUrl(TestCase):
69
72
  for url, expected_result in cases:
70
73
  with self.subTest(url=url):
71
74
  self.assertIs(is_absolute_url(url), expected_result)
75
+
76
+
77
+ class TestGetOrCreateEsiObj(TestCase):
78
+ def test_should_return_existing_obj(self):
79
+ # given
80
+ obj = EveTypeFactory()
81
+ # when
82
+ obj_2 = get_or_create_esi_obj(EveType, id=obj.id)
83
+ # then
84
+ self.assertEqual(obj, obj_2)