Hi,
I tried inheriting the BadgeDetails class and using it as levels to the extended Badge class but I still am confused as to how to use it properly in an app.
class BadgeIcon(models.Model):
name = models.CharField(max_length=100)
description = models.TextField()
image = models.ImageField(upload_to="badges/", blank=True)
class ExtraBadgeDetails(BadgeDetail):
def __init__(self, badgeIcon):
self.description = badgeIcon.description
self.image = badgeIcon.image
class PointsBadge(Badge):
def __init__(self, levels = None):
self.levels = levels
One registers the badges at the class level as badges.register(PointsBadge) and I don't really see any way to do it with object instances or how to create badges with icons whenever I want to in my app.
Anyone used this app before and customized it for their app? Or any other suggestions for similar functionality?
Thanks,
Pratik