Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3403


This forum is provided to promote discussion amongst students enrolled in Agile Web Development (CITS3403).
 
Options:
RSS cloud
Jump to:

flask-admin

1 of 419 articles shown, currently no other people reading this forum.
photo
From: Aiden L.
Date: Fri 22nd May 2020, 4:03pm
Actions: 
        Login-to-reply

 

If anyone is struggling to do the same, I solved this by importing the already made classes at the 
bottom of __init__.py;

ie. 

##initialisation code above##

from flask_admin.contrib.sqla import ModelView
from app.models import User, Post

admin.add_view(ModelView(User, db.session))
admin.add_view(ModelView(Post, db.session)) 

Related articles

Flask-Admin (all 3) RSS
├─ original   Mon 18th May 2020, 1:11pm, Kai B.
├─ reply 1   Fri 22nd May 2020, 2:25pm, Aiden L.
└─ THIS   Fri 22nd May 2020, 4:03pm, Aiden L.
This Page


Program written by: [email protected]
Feedback welcome
Last modified: 11:27am Sep 21 2020