view gpp/weblinks/admin.py @ 11:cc8eb028def1

Update jquery-ui and theme version that is hosted on google. In preparation for having jquery on every page (?), make it so that the autocomplete plug is using the 'global' jquery, and not the one that came with it. It seems to work okay with jquery 1.3.2.
author Brian Neal <bgneal@gmail.com>
date Tue, 14 Apr 2009 02:35:35 +0000
parents dbd703f7d63a
children 952e05cb3d80
line wrap: on
line source
"""This file contains the automatic admin site definitions for the weblinks models"""

from django.contrib import admin
from weblinks.models import Category
from weblinks.models import Link
from weblinks.models import FlaggedLink

class LinkAdmin(admin.ModelAdmin):
    list_display = ('title', 'url', 'category', 'date_added', 'hits', 'is_public')
    list_filter = ('date_added', 'is_public', 'category')
    date_hierarchy = 'date_added'
    ordering = ('-date_added', )
    search_fields = ('title', 'description', 'url', 'user__username')
    raw_id_fields = ('user', )
    save_on_top = True

class FlaggedLinkAdmin(admin.ModelAdmin):
    list_display = ('__unicode__', 'url', 'date_flagged')
    date_hierarchy = 'date_flagged'
    raw_id_fields = ('user', )

admin.site.register(Category)
admin.site.register(Link, LinkAdmin)
admin.site.register(FlaggedLink, FlaggedLinkAdmin)