1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00
Files
seahub/thirdpart/termsandconditions/admin.py
zhengxie 41f9a3950c Add ToC
2016-07-22 16:34:09 +08:00

26 lines
893 B
Python

"""Django Admin Site configuration"""
# pylint: disable=R0904
from django.contrib import admin
from .models import TermsAndConditions, UserTermsAndConditions
class TermsAndConditionsAdmin(admin.ModelAdmin):
"""Sets up the custom Terms and Conditions admin display"""
list_display = ('slug', 'name', 'date_active', 'version_number',)
verbose_name = "Terms and Conditions"
class UserTermsAndConditionsAdmin(admin.ModelAdmin):
"""Sets up the custom User Terms and Conditions admin display"""
#fields = ('terms', 'user', 'date_accepted', 'ip_address',)
readonly_fields = ('date_accepted',)
list_display = ('terms', 'user', 'date_accepted', 'ip_address',)
date_hierarchy = 'date_accepted'
list_select_related = True
admin.site.register(TermsAndConditions, TermsAndConditionsAdmin)
admin.site.register(UserTermsAndConditions, UserTermsAndConditionsAdmin)