From b03203c8cb991c16ac8a3d74c8c4078182d0bb48 Mon Sep 17 00:00:00 2001 From: Nishanth Amuluru Date: Tue, 11 Jan 2011 22:41:51 +0530 Subject: removed all the buildout files --- .../regressiontests/admin_widgets/widgetadmin.py | 30 ---------------------- 1 file changed, 30 deletions(-) delete mode 100644 parts/django/tests/regressiontests/admin_widgets/widgetadmin.py (limited to 'parts/django/tests/regressiontests/admin_widgets/widgetadmin.py') diff --git a/parts/django/tests/regressiontests/admin_widgets/widgetadmin.py b/parts/django/tests/regressiontests/admin_widgets/widgetadmin.py deleted file mode 100644 index 6f15d92..0000000 --- a/parts/django/tests/regressiontests/admin_widgets/widgetadmin.py +++ /dev/null @@ -1,30 +0,0 @@ -""" - -""" -from django.contrib import admin - -import models - -class WidgetAdmin(admin.AdminSite): - pass - -class CarAdmin(admin.ModelAdmin): - list_display = ['make', 'model', 'owner'] - list_editable = ['owner'] - -class CarTireAdmin(admin.ModelAdmin): - def formfield_for_foreignkey(self, db_field, request, **kwargs): - if db_field.name == "car": - kwargs["queryset"] = models.Car.objects.filter(owner=request.user) - return db_field.formfield(**kwargs) - return super(CarTireAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs) - -class EventAdmin(admin.ModelAdmin): - raw_id_fields = ['band'] - -site = WidgetAdmin(name='widget-admin') - -site.register(models.User) -site.register(models.Car, CarAdmin) -site.register(models.CarTire, CarTireAdmin) -site.register(models.Event, EventAdmin) -- cgit