123456789101112131415161718192021 |
- from django.contrib import admin
- # Register your models here.
- from .models import Media
- admin.site.register(Media)
- #from solo.admin import SingletonModelAdmin
- #from .models import SiteConfiguration
- #admin.site.register(SiteConfiguration, SingletonModelAdmin)
- # There is only one item in the table, you can get it this way:
- #from .models import SiteConfiguration
- #config = SiteConfiguration.objects.get()
- # get_solo will create the item if it does not already exist
- #config = SiteConfiguration.get_solo()
|