jiaaro / django-badges

An easy to use django app that provides Foursquare/Stack Overflow style badges
GNU General Public License v3.0
44 stars 21 forks source link

How to register badges correctly? #17

Open vladimirmyshkovski opened 7 years ago

vladimirmyshkovski commented 7 years ago

Automatic registration, from MetaBadgeMeta does not work, and it is necessary to register manually. Is it correct?

ymmd commented 7 years ago

Hey, did you or anyone else manage to register the badges?

I created a class as mentioned in the instructions. What class should it derive from? badges.MetaBadge is not defined. When I use badges.utils.MetaBadge instead, I see no badges.

What do I need to do to register them manually?

vladimirmyshkovski commented 7 years ago

@ymmd, At the bottom of the file meta_badges.py , register the signal as follows:

from badges.utils import register as register_badge
register_badge(YourBadge)

Also remember that while none of the users to which these badges are related will not be saved, the badge will not appear in the database

maxclax commented 7 years ago

I have same problem. 1.9.13 Python 3.5

vladimirmyshkovski commented 7 years ago

@qari, my solution solve your problem ?

maxclax commented 7 years ago

@narnikgamarnikus yes

david58 commented 6 years ago

can you please write something about this to README.md?