Source

django / tests / regressiontests / admin_widgets / widgetadmin.py

The default branch has multiple heads

Diff from to

File tests/regressiontests/admin_widgets/widgetadmin.py

 class EventAdmin(admin.ModelAdmin):
     raw_id_fields = ['band']
 
+
+class AlbumAdmin(admin.ModelAdmin):
+    autocomplete_fields = {
+        'band': { 'fields': ('name',), 'id': 'pk' }
+            }
+
 site = WidgetAdmin(name='widget-admin')
 
 site.register(models.User)
+site.register(models.Album, AlbumAdmin)
 site.register(models.Car, CarAdmin)
 site.register(models.CarTire, CarTireAdmin)
 site.register(models.Event, EventAdmin)