Skip to content

Commit

Permalink
Fix DO search and a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
szabozoltan69 committed Jun 20, 2024
1 parent b26019f commit a46abc9
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
3 changes: 2 additions & 1 deletion local_units/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@ def save_model(self, request, obj, form, change):

@admin.register(DelegationOffice)
class DelegationOfficeAdmin(admin.OSMGeoAdmin):
search_fields = ("name", "city", "country", "country__name")
search_fields = ("name", "city", "country__name")

autocomplete_fields = ("country",)
list_filter = (AutocompleteFilterFactory("Country", "country"),)


@admin.register(DelegationOfficeType)
class DelegationOfficeTypeAdmin(admin.ModelAdmin):
search_fields = ("name",)
ordering = ("code",)


Expand Down
4 changes: 2 additions & 2 deletions per/fixtures/componentratings.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"model": "per.PerComponentRating",
"pk": "5",
"fields": {
"title": "Exits Could be Strengthened",
"title": "Exists – Could be Strengthened",
"value": 4
}
},
Expand All @@ -47,4 +47,4 @@
"value": 5
}
}
]
]
30 changes: 30 additions & 0 deletions per/migrations/0120_alter_formcomponent_status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 4.2.13 on 2024-06-20 09:16

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("per", "0119_merge_20240524_0548"),
]

operations = [
migrations.AlterField(
model_name="formcomponent",
name="status",
field=models.CharField(
blank=True,
choices=[
("high_performance", "High Performance"),
("exists_could_be_strengthened", "Exists – Could be Strengthened"),
("needs_improvement", "Needs Improvement"),
("partially_exists", "Partially Exists"),
("does_not_exist", "Does Not Exist"),
],
max_length=100,
null=True,
verbose_name="status",
),
),
]
2 changes: 1 addition & 1 deletion per/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class FormComponent(models.Model):

class FormComponentStatus(models.TextChoices):
HIGH_PERFORMANCE = "high_performance", _("High Performance")
EXISTS_COULD_BE_STRENGTHENED = "exists_could_be_strengthened", _("Exits Could be Strengthened")
EXISTS_COULD_BE_STRENGTHENED = "exists_could_be_strengthened", _("Exists – Could be Strengthened")
NEEDS_IMPROVEMENT = "needs_improvement", _("Needs Improvement")
PARTIALLY_EXISTS = "partially_exists", _("Partially Exists")
DOES_NOT_EXIST = "does_not_exist", _("Does Not Exist")
Expand Down

0 comments on commit a46abc9

Please sign in to comment.