related name in Django abstract model using python 3 -
when use %(app_label)s_%(class)s
in related name using python3.4 got following error
'app_label': cls._meta.app_label.lower() typeerror: unsupported operand type(s) %: 'bytes' , 'dict'
is there way ?
edit
class timestampmodel(models.model): modified = models.datetimefield(auto_now=true) created = models.datetimefield(auto_now_add=true) created_by = models.foreignkey(user, related_name = "%(app_label)s_%(class)s_created_by" ,) edited_by = models.foreignkey(user, related_name = "%(app_label)s_%(class)s_edited_by" , blank=true, null=true) class meta: abstract = true
Comments
Post a Comment