Skip to content

Commit

Permalink
#5 essai to_encoding from_encoding ISO_LATIN_1
Browse files Browse the repository at this point in the history
ENCODING = 'ISO_LATIN_1'
to_encoding = ENCODING
from_encoding = ENCODING
  • Loading branch information
Skrattoune authored Mar 27, 2022
1 parent 4dd36dc commit 2cf737c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions openrepairplatform/inventory/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
Status,
)

ENCODING = 'ISO_LATIN_1'

class DeviceAdmin(DynamicArrayMixin, ImportExportActionModelAdmin, SimpleHistoryAdmin):
to_encoding = ENCODING
from_encoding = ENCODING

class Meta:
model = Device

Expand All @@ -31,22 +35,34 @@ class Meta:


class CategoryAdmin(ImportExportActionModelAdmin, TreeAdmin):
to_encoding = ENCODING
from_encoding = ENCODING
form = movenodeform_factory(Category)


class BrandAdmin(ImportExportActionModelAdmin, SimpleHistoryAdmin):
to_encoding = ENCODING
from_encoding = ENCODING
...

class ObservationAdmin(ImportExportActionModelAdmin, SimpleHistoryAdmin):
to_encoding = ENCODING
from_encoding = ENCODING
...

class ActionAdmin(ImportExportActionModelAdmin, SimpleHistoryAdmin):
to_encoding = ENCODING
from_encoding = ENCODING
...

class ReasoningAdmin(ImportExportActionModelAdmin, SimpleHistoryAdmin):
to_encoding = ENCODING
from_encoding = ENCODING
...

class StatusAdmin(ImportExportActionModelAdmin, SimpleHistoryAdmin):
to_encoding = ENCODING
from_encoding = ENCODING
...

admin.site.register(Brand, BrandAdmin)
Expand Down

0 comments on commit 2cf737c

Please sign in to comment.