Re: View / Query Set not showing with filter

2021-03-19 Thread Héctor Alonso Lozada Echezuría
my friend,

I'm checking your code, and I can't continue without seeing the template
and how you make the request.

However I will try to make a dissection of the code to evaluate what
happens, so I will forward your code to you in the pastebin link with some
notes: https://pastebin.com/QbxqcTrh

Note: if you are doing an ajax request you should not return a template,
https://docs.djangoproject.com/en/3.1/ref/request-response/#jsonresponse-objects

So I would return a template with the context: https://pastebin.com/BYre4Dig
and so I would return it in an ajax request: https://pastebin.com/CJ2YA8gz


El vie, 19 mar 2021 a las 16:29, Manuel Buri ()
escribió:

> *Booking Model*
> from django.db import models
> from django.utils import timezone
> from users.models import Account
> from organization.models import Organization, Office
>
>
> class Booking(models.Model):
> LOCATION_OPTIONS = (
> ('H', 'Home Office'),
> ('O', 'Office'),
> ('N', 'Not indicated'),
> )
> account = models.ForeignKey(Account,
> on_delete=models.CASCADE)
> organization= models.ForeignKey(Organization,
> on_delete=models.CASCADE)
> office  = models.ForeignKey(Office,
> on_delete=models.CASCADE)
> booking_time= models.DateTimeField(default=timezone.now)
> location= models.CharField(max_length=1,
> choices=LOCATION_OPTIONS)
> class Meta:
> unique_together = ('account', 'booking_time',)
>
> *View*
> def overview_view(request):
>
> context = {}
>
> if request.method == 'GET':
> start_date = None
> end_date = None
> if request.is_ajax():
> booking_times = request.GET.get('day')
> start_date = datetime.strptime(booking_times, "%Y-%m-%d")
> end_date = start_date + timedelta(days=4)
> start_date = start_date.replace(hour=0, minute=0, second=0,
> microsecond=0, tzinfo=pytz.utc)
> end_date = end_date.replace(hour=0, minute=0, second=0,
> microsecond=0, tzinfo=pytz.utc)
>
> context['bookings']=Booking.objects.filter(
> Q(organization_id=request.user.organization_id), Q(booking_time__range =
> (start_date, end_date))
> context['office'] =
> Office.objects.filter(organization_id__exact=request.user.organization_id)
>
> return render(request, 'overview/overview.html', context)
> return render(request, 'overview/overview.html', context)
>
> haha sorry for not using pastebin before :D
>
> Thank you so much.
>
> Best wishes,
>
> Manuel
>
>
>
> Manuel Buri
> T:  +41 79 933 01 11
> M: manuel.b...@gmail.com
> W: www.manuelburi.com <http://manuelburi.com/?utm_source=gmail>
>
>
> On Fri, 19 Mar 2021 at 23:22, Héctor Alonso Lozada Echezuría <
> ima...@gmail.com> wrote:
>
>> Can you share your "Booking" model and the view (function or class) that
>> renders the template?, and I beg you, please use pastebin.com for share
>> your code :D
>>
>> El vie, 19 mar 2021 a las 16:17, Manuel Buri ()
>> escribió:
>>
>>> @anornymou...@gmail.com and ima...@gmail.com
>>> your suggestion is unfortunately not working too
>>>
>>> @All:
>>> So as said my queryset is not empty, meaning that the query works.
>>> However, the results is not in the rendered HTML file.
>>> This would imply that with my template is something wrong, don't you
>>> think?
>>>
>>> {% for office in office.all %}
>>> {{ office.office_name }}
>>> {% for booking in bookings %}
>>> 
>>> 
>>> {{ booking.account.first_name }} {{ 
>>> booking.account.last_name }}
>>> {% if booking.get_location_display == 'House' %}
>>>  {{ booking.get_location_display 
>>> }}
>>> {% elif booking.get_location_display == 'Home' %}
>>>  {{ booking.get_location_display 
>>> }}
>>> {% else %}
>>> 樂 {{ booking.get_location_display 
>>> }}
>>> {% endif %}
>>> 
>>> 
>>> {% endfor %}
>>> {% endfor %}
>>>
>>>
>>> What do you think?
>>>
>>> Thank you so much for your help !
>>>
>>> Best wishes,
>>>
>>> Manuel
>>>
>>>
>>>
>>> Manuel Buri
>>> T:  +41 79 933 01 11
>>> M: manuel.b...@gmail.com
>>> W: www.manuelburi.com <

Re: View / Query Set not showing with filter

2021-03-19 Thread Héctor Alonso Lozada Echezuría
l its topics, 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/CAMXTB%3DcsfYRqGPbhXncaHNTjKqVhgskST8BDEAY-2fYonemfdg%40mail.gmail.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+unsubscr...@googlegroups.com.
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CACx7KOQEEWWNu6hQwMXdEP_nZ6%2Bex9HZ9KEiVubrvd89%3DTP%3DuQ%40mail.gmail.com
>> .
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/2DC9EY75yuM/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/7C87F855-5ECE-4470-A8CA-916B64F7CFF5%40gmail.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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACx7KOS-9b1UP%3D4t4jUOHgn8co_19W2CCRCQWR%3DCWwLHWR%2BsFQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CACx7KOS-9b1UP%3D4t4jUOHgn8co_19W2CCRCQWR%3DCWwLHWR%2BsFQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Héctor Alonso Lozada Echezuría

-- 
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/CADTS2YzEw3jqctmHaWfhhZagmy0VW8-XvppHQtHTCAzmSf3v-Q%40mail.gmail.com.


Re: Improperly Configured at /blog/write/

2021-03-19 Thread Héctor Alonso Lozada Echezuría
Exactly

El vie, 19 mar 2021 a las 15:25, Anornymous u ()
escribió:

> Line 17 not 14
>
> On Sat, Mar 20, 2021, 00:22 Héctor Alonso Lozada Echezuría <
> ima...@gmail.com> wrote:
>
>> Line 14: fields not feilds
>>
>> El vie, 19 mar 2021 a las 15:17, Noyon Barman ()
>> escribió:
>>
>>> What happens here? How do I solve this problem?
>>>
>>> --
>>> 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/CAL-bCoy-SMKGDhOPdrBStDtzx5a3f2LxHAj%3DfCX_5%3DyrdCXNSw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAL-bCoy-SMKGDhOPdrBStDtzx5a3f2LxHAj%3DfCX_5%3DyrdCXNSw%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>>
>>
>> --
>> Héctor Alonso Lozada Echezuría
>>
>> --
>> 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/CADTS2YzWi%3D2R5AsVKEnAn_HJ3syvFxS7DanmQb%2BPqLu64qF7ug%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CADTS2YzWi%3D2R5AsVKEnAn_HJ3syvFxS7DanmQb%2BPqLu64qF7ug%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAMXTB%3DcA44t63_n4WnRtDOBq1KXMG%3DmdyLDqOBQduiAxFPqmgA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMXTB%3DcA44t63_n4WnRtDOBq1KXMG%3DmdyLDqOBQduiAxFPqmgA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Héctor Alonso Lozada Echezuría

-- 
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/CADTS2Ywn4Oz48PjgRjuQcOUN8SXZtj_hEW89wz3xJdYA_KSY8Q%40mail.gmail.com.


Re: Improperly Configured at /blog/write/

2021-03-19 Thread Héctor Alonso Lozada Echezuría
Line 14: fields not feilds

El vie, 19 mar 2021 a las 15:17, Noyon Barman ()
escribió:

> What happens here? How do I solve this problem?
>
> --
> 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/CAL-bCoy-SMKGDhOPdrBStDtzx5a3f2LxHAj%3DfCX_5%3DyrdCXNSw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAL-bCoy-SMKGDhOPdrBStDtzx5a3f2LxHAj%3DfCX_5%3DyrdCXNSw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Héctor Alonso Lozada Echezuría

-- 
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/CADTS2YzWi%3D2R5AsVKEnAn_HJ3syvFxS7DanmQb%2BPqLu64qF7ug%40mail.gmail.com.


Re: View / Query Set not showing with filter

2021-03-19 Thread Héctor Alonso Lozada Echezuría
I think you should reconsider the query

context['bookings']=Booking.objects.filter(Q(organization_id=request.user.organization_id),
Q(booking_time__date__gte=start_date),
Q(booking_time__date__lte=end_date)))

El vie, 19 mar 2021 a las 15:14, Héctor Alonso Lozada Echezuría (<
ima...@gmail.com>) escribió:

> https://docs.djangoproject.com/en/3.1/ref/models/querysets/#range
>
> [image: image.png]
>
> El vie, 19 mar 2021 a las 15:12, Manuel Buri ()
> escribió:
>
>> I want to fetch all bookings for the users organization_id between
>> start_date and end_date.
>> I am achieving this via this queryset, however, as soon as I add the
>> second filter (*bold*), it is not rendered in the template anymore and
>> I, therefore, do not see it in my HTML file.
>> context['bookings']=Booking.objects.filter(
>> Q(organization_id=request.user.organization_id), *Q(booking_time__range=
>> (start_date, end_date))*)
>>
>> Thank you so much for your help.
>> Best wishes,
>>
>> Manuel
>>
>>
>>
>> Manuel Buri
>> T:  +41 79 933 01 11
>> M: manuel.b...@gmail.com
>> W: www.manuelburi.com <http://manuelburi.com/?utm_source=gmail>
>>
>>
>> On Fri, 19 Mar 2021 at 22:07, Anornymous u 
>> wrote:
>>
>>> I mean what you want to fetch and the conditions
>>>
>>> On Fri, Mar 19, 2021, 16:01 Manuel Buri  wrote:
>>>
>>>> Hi,
>>>>
>>>> I am having this query set in my view:
>>>> context['bookings']=Booking.objects.filter(
>>>> Q(organization_id=request.user.organization_id), *Q(booking_time__range=
>>>> (start_date, end_date))*)
>>>>
>>>> It produces a *non-empty* query set!
>>>> However, I am NOT able to display it in my template.
>>>>
>>>> If I get *rid* of Q(booking_time__range= (start_date, end_date) and
>>>> only do:
>>>>
>>>> context['bookings']=Booking.objects.filter( 
>>>> Q(organization_id=request.user.organization_id))
>>>> then it is also non-empty AND it is displaying it in my template.
>>>>
>>>> *What am I missing here?*
>>>>
>>>> Thank you for your help.
>>>>
>>>> Manuel
>>>>
>>>> --
>>>> 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/76f85c72-19f9-4ad3-a39b-01dc60aa6da5n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/76f85c72-19f9-4ad3-a39b-01dc60aa6da5n%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/2DC9EY75yuM/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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/CAMXTB%3DcsfYRqGPbhXncaHNTjKqVhgskST8BDEAY-2fYonemfdg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAMXTB%3DcsfYRqGPbhXncaHNTjKqVhgskST8BDEAY-2fYonemfdg%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CACx7KOQEEWWNu6hQwMXdEP_nZ6%2Bex9HZ9KEiVubrvd89%3DTP%3DuQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CACx7KOQEEWWNu6hQwMXdEP_nZ6%2Bex9HZ9KEiVubrvd89%3DTP%3DuQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>
>
> --
> Héctor Alonso Lozada Echezuría
>


-- 
Héctor Alonso Lozada Echezuría

-- 
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/CADTS2YzkuucPM%2BmSqmzzW2tEgxyaa_-ffB8dCAQEDH9rZe6TeQ%40mail.gmail.com.


Re: View / Query Set not showing with filter

2021-03-19 Thread Héctor Alonso Lozada Echezuría
https://docs.djangoproject.com/en/3.1/ref/models/querysets/#range

[image: image.png]

El vie, 19 mar 2021 a las 15:12, Manuel Buri ()
escribió:

> I want to fetch all bookings for the users organization_id between
> start_date and end_date.
> I am achieving this via this queryset, however, as soon as I add the
> second filter (*bold*), it is not rendered in the template anymore and I,
> therefore, do not see it in my HTML file.
> context['bookings']=Booking.objects.filter(
> Q(organization_id=request.user.organization_id), *Q(booking_time__range=
> (start_date, end_date))*)
>
> Thank you so much for your help.
> Best wishes,
>
> Manuel
>
>
>
> Manuel Buri
> T:  +41 79 933 01 11
> M: manuel.b...@gmail.com
> W: www.manuelburi.com <http://manuelburi.com/?utm_source=gmail>
>
>
> On Fri, 19 Mar 2021 at 22:07, Anornymous u  wrote:
>
>> I mean what you want to fetch and the conditions
>>
>> On Fri, Mar 19, 2021, 16:01 Manuel Buri  wrote:
>>
>>> Hi,
>>>
>>> I am having this query set in my view:
>>> context['bookings']=Booking.objects.filter(
>>> Q(organization_id=request.user.organization_id), *Q(booking_time__range=
>>> (start_date, end_date))*)
>>>
>>> It produces a *non-empty* query set!
>>> However, I am NOT able to display it in my template.
>>>
>>> If I get *rid* of Q(booking_time__range= (start_date, end_date) and
>>> only do:
>>>
>>> context['bookings']=Booking.objects.filter( 
>>> Q(organization_id=request.user.organization_id))
>>> then it is also non-empty AND it is displaying it in my template.
>>>
>>> *What am I missing here?*
>>>
>>> Thank you for your help.
>>>
>>> Manuel
>>>
>>> --
>>> 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/76f85c72-19f9-4ad3-a39b-01dc60aa6da5n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/76f85c72-19f9-4ad3-a39b-01dc60aa6da5n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/2DC9EY75yuM/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/CAMXTB%3DcsfYRqGPbhXncaHNTjKqVhgskST8BDEAY-2fYonemfdg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAMXTB%3DcsfYRqGPbhXncaHNTjKqVhgskST8BDEAY-2fYonemfdg%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CACx7KOQEEWWNu6hQwMXdEP_nZ6%2Bex9HZ9KEiVubrvd89%3DTP%3DuQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CACx7KOQEEWWNu6hQwMXdEP_nZ6%2Bex9HZ9KEiVubrvd89%3DTP%3DuQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
Héctor Alonso Lozada Echezuría

-- 
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/CADTS2YwcFMFPwWV_gRwW6Tj-BWGL%2B8%3D1SzQcVMM%2B5XcgcwGs%3DA%40mail.gmail.com.


Re: Recruitment

2020-09-23 Thread Héctor Alonso Lozada Echezuría
I'm, interested

El mié., 23 sept. 2020 a las 8:40, Harish Thiyagharajan (<
harishthiyagh...@gmail.com>) escribió:

> I want a interested django user , DM mail for more details , all the
> details including payment can be discussed ...looking for for you guys .
>
> --
> 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/7b7956bc-d239-4b63-9194-0644b8a6eeben%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/7b7956bc-d239-4b63-9194-0644b8a6eeben%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 
Héctor Alonso Lozada Echezuría

-- 
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/CADTS2YyhimvuPRQnHSB%3DAJAZEDUu3JO-GFYa5b%2BOtz%3DQkmKgrQ%40mail.gmail.com.


Full text search in multi language columns

2019-07-06 Thread Héctor Alonso Lozada Echezuría
I am trying to implement a full text search in django 1.11, in my model 
product_name and foreign_name can have values in English and Spanish, in 
pastebin  I have published my model with a 
manually created index which works very well with the query, I would like 
to transpose that query to a queryset using both languages english and 
spanish, can anybody help me?

-- 
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/ad68da0b-5bc8-436f-9cce-7c5e0c4fe173%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: invalid literal for int() with base 10: ''

2019-06-21 Thread Héctor Alonso Lozada Echezuría
Of course,

Share your source code and stack trace through pastebin



El vie., 21 jun. 2019 a las 13:34, Lutalo Bbosa joseph ()
escribió:

> am trying to figure it out but when i
> print(product_id)
> print(type(product_id)) i get this output
> 1
> , so probably its because i cant iterate over a string but am
> still failing to figure it out
>
>
> On Fri, Jun 21, 2019 at 10:16 PM Lutalo Bbosa joseph 
> wrote:
>
>> hi hector, can u help me fix it, coz am kinda puzzled
>>
>>
>>
>>
>> On Fri, Jun 21, 2019 at 9:56 PM Héctor Alonso Lozada Echezuría <
>> ima...@gmail.com> wrote:
>>
>>> Apparently product_id has no value
>>>
>>> product_id = request.POST.get("product_id")
>>> print(product_id)
>>> print(type(product_id))
>>>
>>>
>>> El vie., 21 jun. 2019 a las 6:33, Lutalo Bbosa joseph (<
>>> bbos...@gmail.com>) escribió:
>>>
>>>> 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+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/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com?utm_medium=email_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>> --
>>> Héctor Alonso Lozada Echezuría
>>>
>>> --
>>> 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/CADTS2YynLDDPoDa3h_Ks%2B6dTQY9Fs4y42yLCdszJONoz3BzXmw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CADTS2YynLDDPoDa3h_Ks%2B6dTQY9Fs4y42yLCdszJONoz3BzXmw%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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/CAMz%3Dh%3DR2YMJitLizXQg2_a8tyTUF2%2B46im%2B4MvoGyzyHQayrCw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DR2YMJitLizXQg2_a8tyTUF2%2B46im%2B4MvoGyzyHQayrCw%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Héctor Alonso Lozada Echezuría

-- 
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/CADTS2YwVg4%3D3brJr%2BZFxxbM-fBn_vkWHGQno%3DDyyfHij6atpaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: invalid literal for int() with base 10: ''

2019-06-21 Thread Héctor Alonso Lozada Echezuría
Apparently product_id has no value

product_id = request.POST.get("product_id")
print(product_id)
print(type(product_id))


El vie., 21 jun. 2019 a las 6:33, Lutalo Bbosa joseph ()
escribió:

> 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+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/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMz%3Dh%3DTQikVLrVTnwQse3r5P-rxCvaHFRP-qnYWrYSWGHPSGgw%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Héctor Alonso Lozada Echezuría

-- 
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/CADTS2YynLDDPoDa3h_Ks%2B6dTQY9Fs4y42yLCdszJONoz3BzXmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.