When delete a record in admin  raise error :

Request Method: POST
Request URL:    http://localhost/admin/tvplays/news/
Django Version: 1.4
Exception Type: AttributeError
Exception Value:        
'bool' object has no attribute 'render'
Exception Location:     
E:\Python25\Lib\site-packages\django\template\response.py in rendered_content, 
line 81
Python Executable:      E:\xampp\apache\bin\httpd.exe
Python Version: 2.5.5

in Model.py:

class News(models.Model):
    title = models.CharField(max_length=150)
    newstype = models.ForeignKey(NewsType)
    newssource = models.CharField(null=True,blank=True,max_length=250)
    newsurl = models.CharField(null=True,blank=True,max_length=250)
    newsdate = models.DateTimeField(auto_now=True, editable = False)
    newscontext=HTMLField(verbose_name='news')
    rateperson = models.ManyToManyField(Person,null=True, 
blank=True,related_name="news_person")
    ratetvplay = 
models.ManyToManyField(Tvplay,null=True,blank=True,related_name="news_tvplay")
    edtor = models.ForeignKey(User)
    published = models.BooleanField(default=False)
    
    def __unicode__(self):
        return self.title

In admin.py:

class NewsAdmin(admin.ModelAdmin):
    list_display = ('title','newstype','newsdate',)
    search_fields=('title',)
    list_filter =('newstype',)   
    delete_selected_confirmation_template = True    
    raw_id_fields = ('rateperson','ratetvplay',)       
admin.site.register(News,NewsAdmin)

When I delete multi record by delete action in django-admin form
Raise error:  'bool' object has no attribute 'render'

Why??
    



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/o2ojGyw4vAoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to