These are chat archives for django/django

Feb 2016
Feb 09 2016 07:04
Hi! i'm stupid today ;) I have a query - cart, cart_state = Cart.objects.get_or_create(user=user). How I can get ONLY 1 instace, if in db i have more than one, slice dont work
Ikhsan Noor Rosyidin
Feb 09 2016 08:47
@kdelinx from here, you can not get multiple objects. If you have multiple user for one Cart object, maybe you can use filter in queryset.
Feb 09 2016 08:57
@essanpupil Thanks, i solved my questions!