Mercurial > public > sg101
comparison news/admin.py @ 1027:cd4db27c90e3
Fix unicode issue with creating forum threads for news.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Mon, 14 Dec 2015 20:42:20 -0600 |
parents | 9fc12bbc8c81 |
children | b7b98c729abc |
comparison
equal
deleted
inserted
replaced
1026:631a757bc169 | 1027:cd4db27c90e3 |
---|---|
10 from news.models import Category | 10 from news.models import Category |
11 | 11 |
12 import ftfy | 12 import ftfy |
13 | 13 |
14 | 14 |
15 COMMENT_THREAD_BODY = ("This topic was automatically created to discuss the " | 15 COMMENT_THREAD_BODY = (u"This topic was automatically created to discuss the " |
16 "news story [{title}]({url}).") | 16 u"news story [{title}]({url}).") |
17 | 17 |
18 | 18 |
19 class CategoryAdmin(admin.ModelAdmin): | 19 class CategoryAdmin(admin.ModelAdmin): |
20 prepopulated_fields = {'slug': ("title", )} | 20 prepopulated_fields = {'slug': ("title", )} |
21 list_display = ['title', 'slug', 'forum_slug'] | 21 list_display = ['title', 'slug', 'forum_slug'] |