Advertisement
Guest User

Untitled

a guest
Oct 9th, 2013
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.70 KB | None | 0 0
  1. class MyView(BaseView):
  2.     def is_accessible(self):
  3.         return True
  4.         #return login_manager.current_user.is_authenticated()
  5.  
  6.     @expose('/')
  7.     def index(self):
  8.         return self.render('admin/index.html')
  9.  
  10. class AdminTest(ModelView):
  11.     column_display_pk = True
  12.     can_upload = True
  13.     form_columns = ['name','categories']
  14.  
  15. admin.add_view(AdminTest(Subcategory, session))
  16.  
  17. #Add ORM Views
  18. admin.add_view(ModelView(Category, session))
  19. admin.add_view(ModelView(Subcategory, session))
  20. admin.add_view(ModelView(Content, session))
  21. admin.add_view(ModelView(User, session))
  22. admin.add_view(ModelView(Top, session))
  23. #Add Fileupload
  24. #print path
  25. admin.add_view(FileAdmin(path, '/static/', name='Static Files'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement