mozilla / django-badger

django-badger is a reusable Django app for creating and awarding badges. See also badges.mozilla.org
https://github.com/mozilla/django-badger
BSD 3-Clause "New" or "Revised" License
117 stars 61 forks source link

Claim code groups are a hack, implement a real model #63

Open lmorchard opened 12 years ago

lmorchard commented 12 years ago

Claim code groups are a hack. DeferredAward has a "claim_group" text field, and that's used to group them together. The set of all claim groups is the set of distinct values of that text field. Those values are arbitrary IDs cooked up from the current timestamp and a random number.

So, a claim code group is an implicit model, rather than a real model with its own objects & etc. Create a real claim group model, with its own fields to describe the group - eg. description, was_printed, created. Update all management pieces to use the new real model.