From 02e589de66b387ab23f90067958f7f8d8ec7d57d Mon Sep 17 00:00:00 2001 From: Dominik George <nik@naturalnet.de> Date: Thu, 2 Aug 2018 12:29:23 +0200 Subject: [PATCH] Add codepoint attribut to widget. --- django_starfield/widgets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django_starfield/widgets.py b/django_starfield/widgets.py index e070369..650370e 100644 --- a/django_starfield/widgets.py +++ b/django_starfield/widgets.py @@ -3,9 +3,10 @@ from django.forms.widget import Widget class Stars(Widget): template_name = 'django_starfield/stars.html' - def __init__(self, attrs=None, stars=5): + def __init__(self, attrs=None, stars=5, codepoint='2605'): super(Stars, self).__init__(attrs) self.stars = 5 + self.codepoint = '2605' def get_context(self, name, value, attrs): context = super(Stars, self).get_context(name, value, attrs) -- GitLab