comparison gpp/gcalendar/admin.py @ 1:dbd703f7d63a

Initial import of sg101 stuff from private repository.
author gremmie
date Mon, 06 Apr 2009 02:43:12 +0000
parents
children e04d91babfcf
comparison
equal deleted inserted replaced
0:900ba3c7b765 1:dbd703f7d63a
1 """
2 This file contains the automatic admin site definitions for the gcalendar application.
3 """
4 from django.contrib import admin
5 from django.http import HttpResponse
6 from django.conf.urls.defaults import *
7
8 from gcalendar.models import Event
9 from gcalendar.admin_views import google_sync
10
11
12 class EventAdmin(admin.ModelAdmin):
13 list_display = ('what', 'user', 'start_date', 'where', 'date_submitted',
14 'status', 'needs_approval')
15 list_filter = ('start_date', 'status')
16 search_fields = ('what', 'where', 'description')
17 raw_id_fields = ('user', )
18 exclude = ('html', 'google_id')
19 save_on_top = True
20
21 def get_urls(self):
22 urls = super(EventAdmin, self).get_urls()
23 my_urls = patterns('',
24 url(r'^google_sync/$',
25 self.admin_site.admin_view(google_sync),
26 name="gcalendar-google_sync")
27 )
28 return my_urls + urls
29
30
31 admin.site.register(Event, EventAdmin)
32
33 # vim: ts=4 sw=4