S
S
Sam Sam2020-10-11 16:01:19
Django
Sam Sam, 2020-10-11 16:01:19

How to implement order withdrawal?

In short:
There is a django store, a basket catalog, everything is as it should be.
There is a checkout, where they are saved separately: data from the customer and the order basket.

The idea is to make this order through the bot's telegram come to the phone (notification in the cart)

Question: How can this be better implemented?
I'm not very good at all this, but I see two options:

1. Write a script that will check the database, take an order from there and the basket associated with it, and send it to the bot.
2. Make a js script on the page with forms that will send all this data to the bot.

Please, as far as possible, explain to the teapot how to do this (at least what to use and what to google)
If there are other simple ways to withdraw an order by phone, write to

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
noremorse_ru, 2020-10-11
@noremorse_ru

Django has signals, a signal is a function that is called on a specific event. In your case, you need a post_save signal that fires after saving the data of a certain model in the database, in your case, the order model. Start with this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question