That looks good to you but is definitely a dangerous approach if the "12 digits" should be unique for each QuerySet since "random.random" can return dublicate numbers when called multiple times.
... I suggest you make a function for that or novicely adds the item's 'pk' to the random number making sure that it's still not more than 12 digits -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/71c45bae-8cb2-433d-ae27-2d4275c7182c%40googlegroups.com.