Skip to content

Commit

Permalink
feat: Remove unused Issue model. In practice, we add itemized issues …
Browse files Browse the repository at this point in the history
…to the summary.
  • Loading branch information
jpmckinney committed Nov 6, 2024
1 parent f968dbc commit 39b6a4e
Show file tree
Hide file tree
Showing 13 changed files with 212 additions and 277 deletions.
1 change: 0 additions & 1 deletion core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def get_app_list(self, request):
"""Sorts the data registry's models in a logical order."""
order = [
"Collection",
"Issue",
"License",
"Job",
"Task",
Expand Down
11 changes: 2 additions & 9 deletions data_registry/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
from django.utils.html import escape
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _
from modeltranslation.admin import TabbedDjangoJqueryTranslationAdmin, TranslationTabularInline
from modeltranslation.admin import TabbedDjangoJqueryTranslationAdmin

from data_registry import forms
from data_registry.exceptions import RecoverableError
from data_registry.models import Collection, Issue, Job, License, Task
from data_registry.models import Collection, Job, License, Task
from data_registry.util import partialclass

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -111,11 +111,6 @@ def __init__(self, *args, **kwargs):
)


class IssueInLine(TranslationTabularInline):
model = Issue
extra = 0


@admin.register(Collection)
class CollectionAdmin(CascadeTaskMixin, TabbedDjangoJqueryTranslationAdmin):
form = forms.CollectionAdminForm
Expand Down Expand Up @@ -203,8 +198,6 @@ class CollectionAdmin(CascadeTaskMixin, TabbedDjangoJqueryTranslationAdmin):

readonly_fields = ["last_retrieved"]

inlines = [IssueInLine]

def get_form(self, request, obj=None, **kwargs):
kwargs["form"] = partialclass(self.form, request=request)
form = super().get_form(request, obj, **kwargs)
Expand Down
5 changes: 0 additions & 5 deletions data_registry/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ def __init__(self, *args, request=None, **kwargs):
self.fields["country_flag"].choices += sorted((f.name, f.name) for f in FLAGS_DIR.iterdir() if f.is_file())


class IssueAdminForm(forms.ModelForm):
class Meta:
widgets = {"description": MarkdownWidget(attrs={"rows": 1})}


class LicenseAdminForm(forms.ModelForm):
class Meta:
widgets = {
Expand Down
99 changes: 46 additions & 53 deletions data_registry/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-05 20:23+0000\n"
"POT-Creation-Date: 2024-11-06 05:01+0000\n"
"PO-Revision-Date: 2021-08-04 17:44+0000\n"
"Last-Translator: Yohanna Lisnichuk <[email protected]>, 2023\n"
"Language-Team: English (https://app.transifex.com/open-contracting-"
Expand All @@ -24,125 +24,125 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: data_registry/admin.py:27
#: data_registry/admin.py:21
msgid ""
"<em>Remember to provide information in all languages. You can use the "
"dropdown at the top of the page to toggle the language for all fields.</em>"
msgstr ""
"<em>Remember to provide information in all languages. You can use the "
"dropdown at the top of the page to toggle the language for all fields.</em>"

#: data_registry/admin.py:102
#: data_registry/admin.py:43
msgid "incomplete"
msgstr "incomplete"

#: data_registry/admin.py:106 data_registry/admin.py:127
#: data_registry/admin.py:278
#: data_registry/admin.py:47 data_registry/admin.py:68
#: data_registry/admin.py:213
msgid "Yes"
msgstr "Yes"

#: data_registry/admin.py:123
#: data_registry/admin.py:64
msgid "untranslated"
msgstr "untranslated"

#: data_registry/admin.py:158
#: data_registry/admin.py:99
msgid "Previous year"
msgstr "Past year"

#: data_registry/admin.py:165
#: data_registry/admin.py:106
msgid "More than a year ago"
msgstr "More than a year ago"

#: data_registry/admin.py:203 data_registry/admin.py:319
#: data_registry/admin.py:134 data_registry/admin.py:254
msgid "Management"
msgstr "Management"

#: data_registry/admin.py:209
#: data_registry/admin.py:147
msgid "Basics"
msgstr "Basics"

#: data_registry/admin.py:225 data_registry/admin.py:334
#: data_registry/admin.py:163 data_registry/admin.py:269
#: data_registry/templates/detail.html:117
msgid "Overview"
msgstr "Overview"

#: data_registry/admin.py:240
#: data_registry/admin.py:177
msgid "Details"
msgstr "Details"

#: data_registry/admin.py:274
#: data_registry/admin.py:209
msgid "failed"
msgstr "failed"

#: data_registry/admin.py:345
#: data_registry/admin.py:280
msgid "Data availability"
msgstr "Data availability"

#: data_registry/models.py:139
#: data_registry/models.py:138
msgid "Africa and Middle East"
msgstr "Africa and Middle East"

#: data_registry/models.py:141
#: data_registry/models.py:140
msgid "Asia"
msgstr "Asia"

#: data_registry/models.py:143
#: data_registry/models.py:142
msgid "Eastern Europe & Central Asia"
msgstr "Eastern Europe & Central Asia"

#: data_registry/models.py:145
#: data_registry/models.py:144
msgid "Europe"
msgstr "Europe"

#: data_registry/models.py:147
#: data_registry/models.py:146
msgid "Latin America & Caribbean"
msgstr "Latin America & Caribbean"

#: data_registry/models.py:149
#: data_registry/models.py:148
msgid "North America"
msgstr "North America"

#: data_registry/models.py:151
#: data_registry/models.py:150
msgid "Oceania"
msgstr "Oceania"

#: data_registry/models.py:155 data_registry/models.py:175
#: data_registry/models.py:154 data_registry/models.py:174
msgid "Monthly"
msgstr "Monthly"

#: data_registry/models.py:157 data_registry/models.py:179
#: data_registry/models.py:156 data_registry/models.py:178
msgid "Every 6 months"
msgstr "Every 6 months"

#: data_registry/models.py:159 data_registry/models.py:181
#: data_registry/models.py:158 data_registry/models.py:180
msgid "Annually"
msgstr "Annually"

#: data_registry/models.py:161
#: data_registry/models.py:160
msgid "This dataset is no longer updated by the publisher"
msgstr "This dataset is no longer updated by the publisher"

#: data_registry/models.py:165
#: data_registry/models.py:164
msgid "Unknown"
msgstr "Unknown"

#: data_registry/models.py:167
#: data_registry/models.py:166
msgid "Real time"
msgstr "Real time"

#: data_registry/models.py:169
#: data_registry/models.py:168
msgid "Hourly"
msgstr "Hourly"

#: data_registry/models.py:171
#: data_registry/models.py:170
msgid "Daily"
msgstr "Daily"

#: data_registry/models.py:173
#: data_registry/models.py:172
msgid "Weekly"
msgstr "Weekly"

#: data_registry/models.py:177
#: data_registry/models.py:176
msgid "Every 3 months"
msgstr "Every 3 months"

Expand Down Expand Up @@ -326,23 +326,19 @@ msgstr "Data quality"
msgid "Summary"
msgstr "Summary"

#: data_registry/templates/detail.html:269
#: data_registry/templates/detail.html:274
msgid "We have not yet prepared a data quality summary for this dataset."
msgstr "We have not yet prepared a data quality summary for this dataset."

#: data_registry/templates/detail.html:275
#: data_registry/templates/detail.html:280
msgid "Last reviewed:"
msgstr "Last reviewed:"

#: data_registry/templates/detail.html:280
msgid "Issues found"
msgstr "Issues found"

#: data_registry/templates/detail.html:302
#: data_registry/templates/detail.html:289
msgid "Access data"
msgstr "Access data"

#: data_registry/templates/detail.html:304
#: data_registry/templates/detail.html:291
msgid ""
"This OCDS dataset is available for download in JSON, Excel or CSV format. "
"You can download the data for contracting processes in a specific year or "
Expand All @@ -352,15 +348,15 @@ msgstr ""
"You can download the data for contracting processes in a specific year or "
"for all time."

#: data_registry/templates/detail.html:309
#: data_registry/templates/detail.html:296
msgid ""
"Each contracting process is represented as one line of JSON text in the "
"<code>.jsonl</code> file."
msgstr ""
"Each contracting process is represented as one line of JSON text in the "
"<code>.jsonl</code> file."

#: data_registry/templates/detail.html:314
#: data_registry/templates/detail.html:301
msgid ""
"The <code>.jsonl</code> file is compressed using Gzip. Windows users need <a "
"href=\"https://www.7-zip.org\" target=\"_blank\">7-Zip</a>, <a "
Expand All @@ -374,15 +370,15 @@ msgstr ""
"href=\"https://www.winzip.com\" target=\"_blank\">WinZip</a> to decompress "
"the <code>.gz</code> file."

#: data_registry/templates/detail.html:323
#: data_registry/templates/detail.html:310
msgid ""
"Each contracting process is represented as one row in the <code>main</code> "
"sheet. Other sheets link to it via the <code>_link_main</code> column."
msgstr ""
"Each contracting process is represented as one row in the <code>main</code> "
"sheet. Other sheets link to it via the <code>_link_main</code> column."

#: data_registry/templates/detail.html:328
#: data_registry/templates/detail.html:315
msgid ""
"Excel files can have at most <a href=\"https://support.microsoft.com/en-us/"
"office/excel-specifications-and-"
Expand All @@ -396,15 +392,15 @@ msgstr ""
"rows</a>. If a year is missing, it had too many rows. Download the CSV "
"files, instead."

#: data_registry/templates/detail.html:337
#: data_registry/templates/detail.html:324
msgid ""
"Each contracting process is represented as one row in the <code>main.csv</"
"code> file. Other files link to it via the <code>_link_main</code> column."
msgstr ""
"Each contracting process is represented as one row in the <code>main.csv</"
"code> file. Other files link to it via the <code>_link_main</code> column."

#: data_registry/templates/detail.html:342
#: data_registry/templates/detail.html:329
msgid ""
"The <code>.csv</code> files are archived using tar and compressed using "
"Gzip. Windows users need <a href=\"https://www.7-zip.org\" "
Expand All @@ -418,13 +414,13 @@ msgstr ""
"target=\"_blank\">WinRAR</a> or <a href=\"https://www.winzip.com\" "
"target=\"_blank\">WinZip</a> to decompress the <code>.tar.gz</code> file."

#: data_registry/templates/detail.html:361
#: data_registry/templates/detail.html:348
msgid "Have questions, feedback on this dataset or content on this page?"
msgstr ""
"Do you have any questions or feedback on this dataset or any other content "
"on this page?"

#: data_registry/templates/detail.html:366
#: data_registry/templates/detail.html:353
msgid "Contact Data Support Team"
msgstr "Contact Data Support Team"

Expand Down Expand Up @@ -631,12 +627,12 @@ msgstr "See details"
msgid "Back to Top"
msgstr "Back to Top"

#: data_registry/templatetags/registry.py:106
#: data_registry/templatetags/registry.py:112
#, python-format
msgid "[data-registry] Re: %(collection)s"
msgstr "[data-registry] Re: %(collection)s"

#: data_registry/views.py:59 data_registry/views.py:238
#: data_registry/views.py:59 data_registry/views.py:233
msgid "All"
msgstr "All"

Expand Down Expand Up @@ -688,9 +684,6 @@ msgstr "Milestones data"
msgid "Amendments data"
msgstr "Amendments data"

#: data_registry/views.py:278
#: data_registry/views.py:273
msgid "OCP Kingfisher Database"
msgstr "OCP Kingfisher Database"

#~ msgid "no active job"
#~ msgstr "no active job"
Loading

0 comments on commit 39b6a4e

Please sign in to comment.