# Path: mongonaut/sites.py
# class MongoAdmin(BaseMongoAdmin):
#     """Serves as the controller for all the actions defined by the developer."""
# 
#     list_display = ('__str__',)
#     list_display_links = ()
#     list_filter = ()
#     list_select_related = False
#     list_per_page = 100
#     list_max_show_all = 200
#     list_editable = ()
#     search_fields = ()
#     save_as = False
#     save_on_top = False


from mongonaut.sites import MongoAdmin
from articles.models import Post, User



class PostAdmin(MongoAdmin):

    def has_view_permission(self, request):
        return True

    def has_edit_permission(self, request):
        return True

    def has_add_permission(self, request):
        return True

    def has_delete_permission(self, request):
        return True

    search_fields = ('title', 'id')
    list_fields = ('title', "published", "pub_date", "update_times")



# Path: mongonaut/sites.py
# class MongoAdmin(BaseMongoAdmin):
#     """Serves as the controller for all the actions defined by the developer."""
# 
#     list_display = ('__str__',)
#     list_display_links = ()
#     list_filter = ()
#     list_select_related = False
#     list_per_page = 100
#     list_max_show_all = 200
#     list_editable = ()
#     search_fields = ()
#     save_as = False
#     save_on_top = False


# Path: examples/blog_1_7/articles/mongoadmin.py
from mongonaut.sites import MongoAdmin
from articles.models import Post, User




class PostAdmin(MongoAdmin):

    def has_view_permission(self, request):
        return True

    def has_edit_permission(self, request):
        return True

    def has_add_permission(self, request):
        return True

    def has_delete_permission(self, request):
        return True

    search_fields = ('title', 'id')
    list_fields = ('title', "published", "pub_date", "update_times")



class UserAdmin(MongoAdmin):