#4761: AttributeError (no filter_vertical at TabularInline or StackedInline)
---------------------------+------------------------------------------------
Reporter:  anonymous       |       Owner:  adrian               
  Status:  new             |   Component:  django.newforms      
 Version:  newforms-admin  |    Keywords:  inline admin newforms
   Stage:  Unreviewed      |   Has_patch:  0                    
---------------------------+------------------------------------------------
 Example:
 
 {{{
 class BlogOptions(admin.ModelAdmin):
     list_display = ('title', 'number_of_entries')
     inlines = [admin.TabularInline(Entry, extra=2)]
     prepopulate_fields = {'slug': ('title', 'subtitle')}
 
 admin.site.register(Blog, BlogOptions)
 }}}
 
 Url admin/app/blog/add/ gives:
 
 {{{
 AttributeError at /admin/blogfarm/blog/add/
 'TabularInline' object has no attribute 'filter_vertical'
 }}}
 
 it points to the line 112:
 {{{
  111. # For ManyToManyFields with a filter interface, use a special
 widget.
  112. if isinstance(db_field, models.ManyToManyField) and db_field.name in
 (self.filter_vertical + self.filter_horizontal):
  113.     kwargs['widget'] =
 widgets.FilteredSelectMultiple(db_field.verbose_name, (db_field.name in
 self.filter_vertical))
  114.     return db_field.formfield(**kwargs)
 }}}
 Got the same error working for StackedInline.
 
 Both Blog and Entry have ManytoManyFields.
 
 Using revision #5596 of the newforms-admin branch.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4761>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to