Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
django-starfield
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Kalkoken
django-starfield
Commits
d59f31ca
Verified
Commit
d59f31ca
authored
6 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Fix codepoint usage.
parent
6e6247a5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
django_starfield/templates/django_starfield/stars.html
+2
-1
2 additions, 1 deletion
django_starfield/templates/django_starfield/stars.html
django_starfield/widgets.py
+1
-1
1 addition, 1 deletion
django_starfield/widgets.py
with
3 additions
and
2 deletions
django_starfield/templates/django_starfield/stars.html
+
2
−
1
View file @
d59f31ca
{% for i in stars %}
<!--
-->
<input
type=
"radio"
name=
"{{ name }}"
id=
"{{ name }}-{{ forloop.counter0 }}"
value=
"{{ i }}"
{%
if
value =
=
i
%}
checked=
"checked"
{%
endif
%}
/>
<!--
-->
<label
for=
"{{ name }}-{{ forloop.counter0 }}"
>
{{ i }}
</label>
<!--
-->
<label
for=
"{{ name }}-{{ forloop.counter0 }}"
style=
"content: '\{{ codepoint }}'"
>
{{ i }}
</label>
<!--
-->
{% endfor %}
This diff is collapsed.
Click to expand it.
django_starfield/widgets.py
+
1
−
1
View file @
d59f31ca
...
...
@@ -6,7 +6,7 @@ class Stars(Widget):
def
__init__
(
self
,
attrs
=
None
,
stars
=
5
,
codepoint
=
'
2605
'
):
super
(
Stars
,
self
).
__init__
(
attrs
)
self
.
stars
=
5
self
.
codepoint
=
'
2605
'
self
.
codepoint
=
codepoint
def
get_context
(
self
,
name
,
value
,
attrs
):
context
=
super
(
Stars
,
self
).
get_context
(
name
,
value
,
attrs
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment