w
clone your own copy | download snapshot

Snapshots | iceberg

No images in this repository’s iceberg at this time

Inside this repository

admin.py
text/x-python

Download raw (987 bytes)

from django.contrib import admin
from guardian.admin import GuardedModelAdmin
from adminsortable2.admin import SortableAdminMixin, SortableInlineAdminMixin
from .models import Attachment, Score, FeaturedScore


class FeaturedScoreAdmin(SortableAdminMixin, admin.ModelAdmin):
    # list_display = ('__unicode__', 'web_publish_date', 'visible')
    pass


class AttachmentAdmin(admin.ModelAdmin):
    pass


class ScoreAdmin(GuardedModelAdmin):
    pass


admin.site.register(FeaturedScore, FeaturedScoreAdmin)
admin.site.register(Attachment, AttachmentAdmin)
admin.site.register(Score, ScoreAdmin)


from django.contrib.flatpages.admin import FlatPageAdmin
from django.contrib.flatpages.models import FlatPage
from django.db import models

from ckeditor.widgets import CKEditorWidget

class FlatPageCustom(FlatPageAdmin):
    formfield_overrides = {
        models.TextField: {'widget': CKEditorWidget}
    }

admin.site.unregister(FlatPage)
admin.site.register(FlatPage, FlatPageCustom)