template parse error

2018-02-21 Thread sum abiut
Could not parse the remainder: '=="1"' from 'selected_value=="1"' i got the above error when passing the select value. I have no clue what i am missing. please assist {%if selected_value=="1"%} Cheers, -- You received this message because you are subscribed to the Google Groups "Django

Re: django mathfiters

2018-02-21 Thread sum abiut
Thanks heaps. On Thu, Feb 22, 2018 at 9:47 AM, Matthew Pava wrote: > And how are you checking if it’s None? I would do it like this: > > {% if c %} > > {{ a|add:c }} > > {% else %} > > {{ a }} > > {% endif %} > > > > *From:* django-users@googlegroups.com

RE: django mathfiters

2018-02-21 Thread Matthew Pava
And how are you checking if it’s None? I would do it like this: {% if c %} {{ a|add:c }} {% else %} {{ a }} {% endif %} From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of sum abiut Sent: Wednesday, February 21, 2018 4:43 PM To:

Re: django mathfiters

2018-02-21 Thread sum abiut
Thanks for your response. Yes the value was actually None. how to i display 42 instead of not displaying anything at all. I have try using the if statement to check for the value of c if its None i just display the value of a, and if is not None i add the values. But still its displaying nothing.

RE: django mathfiters

2018-02-21 Thread Matthew Pava
Check the value of b.value. Make sure it isn’t None. From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of sum abiut Sent: Wednesday, February 21, 2018 4:06 PM To: django-users@googlegroups.com Subject: django mathfiters Hi, How to you a zero in mathfilter

django mathfiters

2018-02-21 Thread sum abiut
Hi, How to you a zero in mathfilter for example, if the value of c is zero the total is not display. instead of displaying 42 it display nothing. {%for b in pay%} {% with a=42 c=b.value%} {{ a|add:c }} {% endwith %} -- You received this message because you are subscribed to the Google

Re: Django web app reaching rest api and CORS problem

2018-02-21 Thread Andy
Why do you use a third component to have a rest api? instead of the django rest framework? Since the problem is inside your custom falcon server, its not in any way related to django .. ask the falcon comunity here instead: https://gitter.im/falconry/user Am Mittwoch, 2. November 2016

Re: help with the poll application." Writing your first Django app".

2018-02-21 Thread Andy
You are not using Django 2.0 and thus the path function is not existing in Django 1.11. Django 2.0 can only be installed with python3, while you are trying to use python 2.7 for that job. apt install python3 python3-pip pip3 install virtualenv virtualenvwrapper mkvirtualenv

Re: help with the poll application." Writing your first Django app".

2018-02-21 Thread Jason
if you're using django 2, its not python2 compatible. I see in your stack trace you're using python2 If you want to stay on py2, I would look at using the v 1.11 version of the tutorial On Wednesday, February 21, 2018 at 7:17:48 AM UTC-5, Sebastian Saade wrote: > > >

Re: Django web app reaching rest api and CORS problem

2018-02-21 Thread Siphiwe Gwebu
Did you manage to sort this out? Got the same issue... On Wednesday, 2 November 2016 15:29:25 UTC+2, Oguz Yarimtepe wrote: > > I have a django app and at the template part i have javascript function > calling the rest api: > > > >

help with the poll application." Writing your first Django app".

2018-02-21 Thread Sebastian Saade
Hello, I'm writing for help. I'm starting to get into Django's world. Testing the tutorial of the Django documentation

Re: 'base64' is not a text encoding; use codecs.decode() to handle arbitrary codecs

2018-02-21 Thread Jason
First, I would recommend not inserting photos or files in the database. Use on-disk storage, S3 or something else and store the link to the asset. Second, this is a Django group, not Flask. -- You received this message because you are subscribed to the Google Groups "Django users" group.