improve admin

This commit is contained in:
Son NK 2021-03-30 19:08:32 +02:00
parent 9df62e0380
commit e31e19047c
2 changed files with 4 additions and 0 deletions

View File

@ -134,6 +134,7 @@ def manual_upgrade(way: str, ids: [int], is_giveaway: bool):
class EmailLogAdmin(SLModelView):
column_searchable_list = ["id"]
column_filters = ["id", "user.email", "mailbox.email", "contact.website_email"]
can_edit = False
can_create = False

View File

@ -143,6 +143,9 @@ def create_app() -> Flask:
app.config["TEMPLATES_AUTO_RELOAD"] = True
# to have a "fluid" layout for admin
app.config["FLASK_ADMIN_FLUID_LAYOUT"] = True
# to avoid conflict with other cookie
app.config["SESSION_COOKIE_NAME"] = SESSION_COOKIE_NAME
if URL.startswith("https"):