2

Anyone can suggest me any good solution? The problem:

There is spreadsheets with data and i need to create a model with more than 40 of indexable fields (maybe even more in future) is there anything to help me to avoid hand work to define this fields manually? The fields are some kind of chemical parameters with long names, i guess need to create aliases to access them easily.

UPD: googled for a hour, can't find anything. Maybe i'll just create model dynamically from configuration stored in YAML or JSON file? Or use Postgres JSON field? But i feel it's gonna be disaster to make admin interface to work with it.

alexander_ch
  • 356
  • 5
  • 12
  • 1
    You can write *models.py* by making use of [`file.write()`](http://stackoverflow.com/a/6159912/1925257) method. – xyres Mar 12 '16 at 07:48
  • i can make it programmatically using meta classes but it would be difficult to manage it. – alexander_ch Mar 12 '16 at 10:31
  • Yeah, that might work, too. But still you'll need to read the spreadsheet or JSON file to be able to set fields on a model. Considering that, you're better off with using `file.write()`. – xyres Mar 12 '16 at 10:56

1 Answers1

0

Well, after the accurate research of the subject i found few options:

alexander_ch
  • 356
  • 5
  • 12