Mercurial > public > madeira
annotate articles/admin.py @ 95:7b52e8ef01ec
For Django 1.5: Remove usage of django.contrib.markup.
Since we were only using Textile in one place, decided to stop using it
altogether.
Wrote a management command, untextile, to convert the gallery models'
description fields from textile to raw HTML. This should be run one time before
going live with Django 1.5.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 28 Aug 2013 19:22:23 -0500 |
parents | e2868ad47a1e |
children |
rev | line source |
---|---|
bgneal@47 | 1 """ |
bgneal@47 | 2 Automatic admin definitions for the articles application. |
bgneal@47 | 3 |
bgneal@47 | 4 """ |
bgneal@47 | 5 from django.contrib import admin |
bgneal@47 | 6 from django.conf import settings |
bgneal@47 | 7 |
bgneal@47 | 8 from articles.models import Article |
bgneal@47 | 9 |
bgneal@47 | 10 |
bgneal@47 | 11 class ArticleAdmin(admin.ModelAdmin): |
bgneal@47 | 12 save_on_top = True |
bgneal@47 | 13 list_filter = ['date'] |
bgneal@47 | 14 list_display = ['title', 'date'] |
bgneal@47 | 15 search_fields = ['text', 'title'] |
bgneal@47 | 16 |
bgneal@47 | 17 class Media: |
bgneal@47 | 18 js = settings.THIRD_PARTY_JS['tiny_mce'] |
bgneal@47 | 19 |
bgneal@47 | 20 |
bgneal@47 | 21 admin.site.register(Article, ArticleAdmin) |