I think you can use the legendary BODMAS, and apply brackets
self.total_price = self.quantity+(self.reorder_level * self.unit_price)
That should work
On Mon, Apr 11, 2022 at 7:49 AM tech george wrote:
> Hello Mike,
>
> Unfortunately it's not calculating the fields as I wanted, instead it's
>
Cool, all I have realised is that if someone is specifically doing a jquery
powered application, they can just write it and use it on their own using
the below code
```py
def is_ajax():
return request.headers.get('x-requested-with') == 'XMLHttpRequest'
```
And that's it! It will start
But the link tells you the details and how to solve the problem.
Anyway, I think you forgot to share the said screenshots. I can't find them.
Also, when you are asking please, don't try to direct us how we should
solve this problem. Just detail your problem and wait for your answer.
Simple.
A
Hello team.
Am sending jquery requests in django 4 but I have just realised that
checking if the requests were from jquery using is_ajax and then perform
ajax related actions is not possible. What is replacing this, and why would
such a cool feature be removed.
Thanks
--
You received this
To me, you are not going to serve static files but media files, am sure
that the image linked above was as a result of uploading it somewhere,
However much you try, heroku does not handle media files, when you upload
your image, the next refresh of the running dyno will delete it from your
file
STEPS
1. You will add a name attribute to all your input fields.
2. Add the crsf_token django template in-built filter to support 'POST'
3. Change your form's method to 'POST'
4. Add an action attribute and set it to your view
5. Then the JQUERY part will be as follows
6. Don't forget to give your
Digital ocean even becomes easier, I love both anyways
On Mon, Nov 29, 2021 at 11:50 AM Eugene TUYIZERE
wrote:
> Dear Team,
>
> This is just for advice.
>
> I would like to know any other hosting provider that uses GitHub to update
> the app like we do on Heroku.
>
> Thank you
>
> --
> *Eugene*
I know this may not be necessary at the moment because we are comfortable
depending on front-end frameworks, but I have my two ideas here:
1. what if django alone without any framework can be used to design
progressive web apps, with routers that do not reload the page, we
currently have one of
8 matches
Mail list logo