Add temp transfer options to apps.location
This commit is contained in:
parent
9dcdb7575e
commit
59320f4333
25
apps/location/transfer.py
Normal file
25
apps/location/transfer.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
"""
|
||||
Структура fields:
|
||||
key - поле в таблице postgres
|
||||
value - поле или группа полей в таблице legacy
|
||||
|
||||
В случае передачи группы полей каждое поле представляет собой кортеж, где:
|
||||
field[0] - название аргумента
|
||||
field[1] - название поля в таблице legacy
|
||||
Опционально: field[2] - тип данных для преобразования
|
||||
|
||||
"""
|
||||
|
||||
City = {
|
||||
"dependencies": ("Country", "Region"),
|
||||
"fields": {
|
||||
"Cities": {
|
||||
"coordinates": (("lat", "latitude", "Boolean"), ("long", "longtitude")),
|
||||
"code": "country_code_2"
|
||||
},
|
||||
"CityNames": {
|
||||
"name": "name",
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user