syrusakbary/Flask-SuperAdmin

field_overrides TypeError 'dict' object not callable

vburca opened this issue · 1 comments

Hello,

So I am trying to use superadmin to change the label (I want to change the default value eventually, but I am making small steps...) of a field. And I saw in the source code that if I use the field_overrides attribute I could do this... so here is my code:

class ProjectsModel(model.ModelAdmin):
  session = db.session
  field_overrides = { 
                      'created_at': { 'label': 'blabla' }
                    }

but this throws the following error:

TypeError: 'dict' object is not callable

on

File ".../venv/lib/python2.7/site-packages/flask_superadmin/model/backends/sqlalchemy/orm.py", line 150, in convert

Display the sourcecode for this frameOpen an interactive python shell in this framereturn override(**kwargs)

Am I doing something wrong? I am following the exact example posted in the comments, through the code...

Thanks,
Vlad

Never mind, I just realized that I should use field_args ... but since the values are overriding something... what is the fields_override used for then?