1.6.2 parsing timezones
This commit is contained in:
@@ -32,6 +32,14 @@ class Admin_Country(Admin_Trans_BaseModel):
|
||||
admin.site.register(Country, Admin_Country)
|
||||
|
||||
class Admin_City(Admin_Trans_BaseModel):
|
||||
|
||||
def cur_dt(self, obj):
|
||||
if obj.timezone:
|
||||
return obj.get_current_datetime()
|
||||
else:
|
||||
return '-'
|
||||
cur_dt.short_description = 'текущее время'
|
||||
|
||||
fieldsets = [
|
||||
[None, {
|
||||
'classes': ['wide'],
|
||||
@@ -52,7 +60,7 @@ class Admin_City(Admin_Trans_BaseModel):
|
||||
list_display = [
|
||||
'id', 'name', 'name_en', 'name_ru',
|
||||
'country',
|
||||
'timezone',
|
||||
'timezone', 'cur_dt',
|
||||
'enable', 'area_id', 'parsing_finished_DT',
|
||||
'order', 'modifiedDT', 'createDT']
|
||||
search_fields = ['id', 'name_en', 'name_ru', 'country__name']
|
||||
|
||||
Reference in New Issue
Block a user