AJAX loading for admin form

Backend feature to reduce load time of the blender-id list.
This commit is contained in:
2014-06-19 15:03:33 +02:00
parent 0343df5fe1
commit 24db81b312

View File

@@ -1,5 +1,5 @@
from application import app, db
from application.models.users import user_datastore
from application.models.users import user_datastore, User
from application.models.applications import Application
from flask import render_template, redirect, url_for
@@ -51,6 +51,11 @@ class ApplicationView(CustomModelView):
column_labels = {'user.first_name' : 'First Name', 'user.last_name' : 'Last Name'}
column_searchable_list = ('website', 'status')
can_create = False
form_ajax_refs = {
'user': {
'fields': (User.email, User.first_name, User.id)
}
}
# Create admin