Closed nomilkinmyhome closed 1 year ago
new parameter for load() - custom_values. it will be a dict that contains custom values per field. for example:
from django.db import models from elasticmapper import load, SupportedORMs class User(models.Model): username = models.CharField(max_length=30) timestamp = models.DateTimeField() custom_values = {'timestamp': {'type': 'date', 'format': `'yyyy-MM-dd'}} user_elastic_mapping = load( model=User, orm=SupportedORMs.DjangoORM, custom_values=custom_values, )
expected output:
{ 'id': 'int', 'username': 'text', 'timestamp': { 'type': 'date', 'format': 'yyyy-MM-dd' } }
new parameter for load() - custom_values. it will be a dict that contains custom values per field. for example:
expected output: