mirror of
https://github.com/Mistake35/Cedar-Django.git
synced 2026-07-18 00:21:14 +10:00
Did not know what the fuck the get_queryset bits did until now.
bitch
This commit is contained in:
@@ -125,12 +125,16 @@ class PostAdmin(admin.ModelAdmin):
|
|||||||
search_fields = ('id', 'body', 'creator__username', )
|
search_fields = ('id', 'body', 'creator__username', )
|
||||||
list_display = ('id', 'creator', 'body', 'is_rm', )
|
list_display = ('id', 'creator', 'body', 'is_rm', )
|
||||||
actions = [Hide_content, Show_content, Disable_comments, Enable_comments]
|
actions = [Hide_content, Show_content, Disable_comments, Enable_comments]
|
||||||
|
def get_queryset(self, request):
|
||||||
|
return models.Post.real.get_queryset()
|
||||||
|
|
||||||
class CommentAdmin(admin.ModelAdmin):
|
class CommentAdmin(admin.ModelAdmin):
|
||||||
raw_id_fields = ('creator', 'original_post', )
|
raw_id_fields = ('creator', 'original_post', )
|
||||||
search_fields = ('id', 'body', 'creator__username', )
|
search_fields = ('id', 'body', 'creator__username', )
|
||||||
list_display = ('id', 'creator', 'body', 'original_post', 'is_rm', )
|
list_display = ('id', 'creator', 'body', 'original_post', 'is_rm', )
|
||||||
actions = [Hide_content, Show_content]
|
actions = [Hide_content, Show_content]
|
||||||
|
def get_queryset(self, request):
|
||||||
|
return models.Comment.real.get_queryset()
|
||||||
|
|
||||||
class CommunityAdmin(admin.ModelAdmin):
|
class CommunityAdmin(admin.ModelAdmin):
|
||||||
raw_id_fields = ('creator', )
|
raw_id_fields = ('creator', )
|
||||||
@@ -138,12 +142,16 @@ class CommunityAdmin(admin.ModelAdmin):
|
|||||||
search_fields = ('id', 'name', 'description', )
|
search_fields = ('id', 'name', 'description', )
|
||||||
actions = [Hide_content, Show_content, Feature_community, Unfeature_community, force_login, unforce_login]
|
actions = [Hide_content, Show_content, Feature_community, Unfeature_community, force_login, unforce_login]
|
||||||
list_filter = ('type', 'is_rm', 'is_feature', 'require_auth')
|
list_filter = ('type', 'is_rm', 'is_feature', 'require_auth')
|
||||||
|
def get_queryset(self, request):
|
||||||
|
return models.Community.real.get_queryset()
|
||||||
|
|
||||||
class MessageAdmin(admin.ModelAdmin):
|
class MessageAdmin(admin.ModelAdmin):
|
||||||
raw_id_fields = ('creator', 'conversation', )
|
raw_id_fields = ('creator', 'conversation', )
|
||||||
search_fields = ('id', 'body', 'creator__username', )
|
search_fields = ('id', 'body', 'creator__username', )
|
||||||
list_display = ('created', 'creator', 'conversation', 'body', 'is_rm', )
|
list_display = ('created', 'creator', 'conversation', 'body', 'is_rm', )
|
||||||
actions = [Hide_content, Show_content]
|
actions = [Hide_content, Show_content]
|
||||||
|
def get_queryset(self, request):
|
||||||
|
return models.Message.real.get_queryset()
|
||||||
|
|
||||||
class NotificationAdmin(admin.ModelAdmin):
|
class NotificationAdmin(admin.ModelAdmin):
|
||||||
def combined_display(self, obj):
|
def combined_display(self, obj):
|
||||||
|
|||||||
Reference in New Issue
Block a user