# -*- coding: utf-8 -*-
from django.contrib import admin
-from django import forms
-from django.utils.safestring import mark_safe
-from django.utils.translation import ugettext_lazy as _
from newtagging.admin import TaggableModelAdmin
from catalogue.models import Book, Tag
prepopulated_fields = {'slug': ('name',), 'sort_key': ('name',),}
radio_fields = {'category': admin.HORIZONTAL}
-admin.site.register(Tag, TagAdmin)
-
class BookAdmin(TaggableModelAdmin):
tag_model = Tag
prepopulated_fields = {'slug': ('title',)}
+
+admin.site.register(Tag, TagAdmin)
admin.site.register(Book, BookAdmin)
# -*- coding: utf-8 -*-
-import os
-
from django.conf.urls.defaults import *
-from django.views.generic.simple import redirect_to
urlpatterns = patterns('catalogue.views',
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import connection, models
-from django.db.models.query import QuerySet
from django.utils.translation import ugettext_lazy as _
from django.db.models.base import ModelBase