Hello lutalo
I am also facing the same issue. If you find any solution please let me know . It would be very helpful.
Thank you
hi guys, am working on an ecommerce system, which has cart as an app, but i keep on getting this error and cant move on any help, here is my views.py ,from the commandline the error is on line 42
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKizqR54L-dC46wx--DD4BL%2Biko_itWk-fPs%2B9haibZJ_LnTvA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DR7b_mpnBw_xLKW%2BX5jyVk4CKXm7jwVG37R8BsSPQQegg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAN7EoAbag_or9TPOb-KiYCmaD%2B4DDyG%2ByUfU%3DPzVRfacU09GNg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DQ39LSikG6aFL4PGuppSy2eOjKkEVqDJTVeRZOvEBFE0w%40mail.gmail.com.
invalid literal for int() with base 10: '' thats the error
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANfN%3DK_%3D3HTrTFXtCDKBOmUAF78fby3nOoBJei8-1kSfaVRNeA%40mail.gmail.com.
hi guys, am working on an ecommerce system, which has cart as an app, but i keep on getting this error and cant move on any help, here is my views.py ,from the commandline the error is on line 42
--
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...@googlegroups.com.
To post to this group, send email to django...@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/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CADTS2YynLDDPoDa3h_Ks%2B6dTQY9Fs4y42yLCdszJONoz3BzXmw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DR2YMJitLizXQg2_a8tyTUF2%2B46im%2B4MvoGyzyHQayrCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Can u send me the full project.share me the github link
--
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...@googlegroups.com.
To post to this group, send email to django...@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/ec4e7699-f6a0-4689-9611-fb005db3727b%40googlegroups.com.
--
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...@googlegroups.com.
To post to this group, send email to django...@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/5ccf02f4-9d1c-4363-85cc-feb39b5326e3%40googlegroups.com.
--
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...@googlegroups.com.
To post to this group, send email to django...@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/cf4d348f-9955-43f4-81b9-a4cbc98bb8b0%40googlegroups.com.
cart_obj, new_obj = Cart.objects.get(user=request.user)
if product_obj in cart_obj.products.all():
cart_obj.products.remove(product_obj)
added = False
--
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...@googlegroups.com.
To post to this group, send email to django...@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/2b356801-9f78-4d3d-b10e-39b4d5908dcf%40googlegroups.com.
cart_obj, new_obj = Cart.objects.get_or_create(user=request.user)
You originally had:
cart_obj, new_obj = Cart.objects.new_or_get(request)
There is no .new_or_get method in the Django QuerySet API: https://docs.djangoproject.com/en/dev/ref/models/querysets/#get-or-create
Also, inside of the parentheses you must specify a field in the Cart model and a value to search for in order to identify a specific cart: (user = request.user)