mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-21 11:27:18 +00:00
Add ToC
This commit is contained in:
25
thirdpart/termsandconditions/admin.py
Normal file
25
thirdpart/termsandconditions/admin.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""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)
|
Reference in New Issue
Block a user