Skip to content

Commit

Permalink
improve admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Son NK committed Mar 30, 2021
1 parent 9df62e0 commit e31e190
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/admin_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down

0 comments on commit e31e190

Please sign in to comment.