admin.py 512 B

123456789101112131415161718192021
  1. from django.contrib import admin
  2. # Register your models here.
  3. from .models import Media
  4. admin.site.register(Media)
  5. #from solo.admin import SingletonModelAdmin
  6. #from .models import SiteConfiguration
  7. #admin.site.register(SiteConfiguration, SingletonModelAdmin)
  8. # There is only one item in the table, you can get it this way:
  9. #from .models import SiteConfiguration
  10. #config = SiteConfiguration.objects.get()
  11. # get_solo will create the item if it does not already exist
  12. #config = SiteConfiguration.get_solo()