On option could be using choices on a field definition.
On 16.06.2016 12:51, Seti Volkylany wrote:
If I used annotation for get rating an object, I had new field
'rating' (is number). How change values field rating through SQl for
return:
if rating = 0 return '0'
if rating = 1 return '+1'
if rating = -1 return '-1'
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to django-users+unsubscr...@googlegroups.com
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/16b9bdbc-a292-4162-9809-59a55d63ff34%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/16b9bdbc-a292-4162-9809-59a55d63ff34%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Jani Tiainen
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/576283C0.8070308%40gmail.com.
For more options, visit https://groups.google.com/d/optout.