Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyView(BaseView):
- def is_accessible(self):
- return True
- #return login_manager.current_user.is_authenticated()
- @expose('/')
- def index(self):
- return self.render('admin/index.html')
- class AdminTest(ModelView):
- column_display_pk = True
- can_upload = True
- form_columns = ['name','categories']
- admin.add_view(AdminTest(Subcategory, session))
- #Add ORM Views
- admin.add_view(ModelView(Category, session))
- admin.add_view(ModelView(Subcategory, session))
- admin.add_view(ModelView(Content, session))
- admin.add_view(ModelView(User, session))
- admin.add_view(ModelView(Top, session))
- #Add Fileupload
- #print path
- admin.add_view(FileAdmin(path, '/static/', name='Static Files'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement