我在行政地点用达扬戈-卫兵进行洗礼,就会产生这一错误。
屠宰 提出: Failed cuup for key [adminform] in u [{},{ csrf_token :},{ debug : real, sql_queries : [} :......
定时差错
模板/Library/Python/2.7/site- Packages/grappelli/templates/admin/change_form.html,第34行中的错误
The line where the error occurs.
var related_lookup_fields_fk = {% get_related_lookup_fields_fk adminform.model_admin %};
如果能产生任何变化,我会利用贪.和南方。
My model
class Alert(models.Model):
"""Alert for product updates"""
product = models.ForeignKey(Product)
message = models.CharField(help_text="What has changed?",blank=True, max_length=200)
created = models.DateTimeField(auto_now_add=True, editable=False)
updated = models.DateTimeField(auto_now=True, auto_now_add=True, editable=False)
def __unicode__(self):
return u"%s" % self.message
class Meta:
ordering = [ -created ]
permissions = (
( view_alert , View Alert ),
)
Admin.py
class AlertAdmin(GuardedModelAdmin):
pass
admin.site.register(Alert, AlertAdmin)