Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. def get_colors(*args, **kwargs):
  2. colors = Color.objects.none()
  3. for paint in Paint.objects.all():
  4. if paint.color and paint.color not in colors:
  5. colors.add(paint.color)
  6. return colors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement