Merge pull request 'registring region,district and village models' (#64) from behruz into main
Some checks failed
Deploy to Production / build-and-deploy (push) Failing after 51s
Some checks failed
Deploy to Production / build-and-deploy (push) Failing after 51s
Reviewed-on: #64
This commit is contained in:
@@ -165,5 +165,26 @@ PAGES = [
|
|||||||
"link": reverse_lazy("admin:evaluation_documentcategorymodel_changelist"),
|
"link": reverse_lazy("admin:evaluation_documentcategorymodel_changelist"),
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Joylashuvlar"),
|
||||||
|
"separator": True,
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"title": _("Shaharlar"),
|
||||||
|
"icon": "attach_file",
|
||||||
|
"link": reverse_lazy("admin:shared_regionmodel_changelist"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Tumanlar"),
|
||||||
|
"icon": "attach_file",
|
||||||
|
"link": reverse_lazy("admin:shared_districtmodel_changelist"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": _("Mahallalar"),
|
||||||
|
"icon": "attach_file",
|
||||||
|
"link": reverse_lazy("admin:shared_villagemodel_changelist"),
|
||||||
|
},
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
# from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
|
||||||
# from core.apps.shared.models import RegionModel, DistrictModel, VillageModel
|
from core.apps.shared.models import RegionModel, DistrictModel, VillageModel
|
||||||
|
|
||||||
|
|
||||||
# @admin.register(RegionModel)
|
@admin.register(RegionModel)
|
||||||
# class RegionAdmin(admin.ModelAdmin):
|
class RegionAdmin(admin.ModelAdmin):
|
||||||
# list_display = ('name', 'code')
|
list_display = ('id', 'name',)
|
||||||
# search_fields = ('name', 'code')
|
search_fields = ('name')
|
||||||
|
|
||||||
|
|
||||||
# @admin.register(DistrictModel)
|
@admin.register(DistrictModel)
|
||||||
# class DistrictAdmin(admin.ModelAdmin):
|
class DistrictAdmin(admin.ModelAdmin):
|
||||||
# list_display = ('name', 'code', 'region')
|
list_display = ('id', 'name', 'region')
|
||||||
# search_fields = ('name', 'code')
|
search_fields = ('name', 'region')
|
||||||
|
|
||||||
|
|
||||||
# @admin.register(VillageModel)
|
@admin.register(VillageModel)
|
||||||
# class VillageAdmin(admin.ModelAdmin):
|
class VillageAdmin(admin.ModelAdmin):
|
||||||
# list_display = ('name', 'code', 'district')
|
list_display = ('id', 'name', 'district')
|
||||||
# search_fields = ('name', 'code')
|
search_fields = ('name', 'district')
|
||||||
|
|||||||
Reference in New Issue
Block a user