我无法设置过滤水平
admin.py
class ArticleAdmin(admin.ModelAdmin):
exclude = ('position',)
filter_horizontal = ('key', )
admin.site.register(Article, ArticleAdmin)
models.py
class Article(models.Model):
author = models.ForeignKey(User, default=1, null=True, on_delete=models.SET_DEFAULT)
position = models.PositiveSmallIntegerField("Position", null=True)
key = models.ManyToManyField(Keyword, blank=True, verbose_name=u"Schlagworte")
created_at = models.DateTimeField(editable=False)
updated_at = models.DateTimeField(default=timezone.now, editable=False)
有人可以在这里指出我的问题吗?
编辑: 小部件未显示。 没有服务器端错误。 我得到一个我无法解释的JS错误:
GET http://s3.eu-central-1.amazonaws.com/forton/http_headers_1.js
(anonymous function) @ VM2228:1
(anonymous function) @ VM2228:1