Telegram bot for ordering cakes. With the bot, you can order TTRT from the presented catalog, or you can assemble the cake yourself from the presented parameters and ingredients. It is possible to change the delivery time and choose a convenient time slot. For an additional fee, you can add any inscription to the cake. With the bot, you can check the status of your orders. The bot sends notifications about new orders to the administrator.
- Clone the repository to your local computer.
- Install the necessary packages using
pip install -r requirements.txt
. - Create a
.env
file in the root directory of the project. - Add the following variables to the
.env
file:
TG_BOT_TOKEN
- your telegram bot token.TG_CHAT_ID
- Telegram ID of the admin (who will receive notifications about new orders)SECRET_KEY
- Default: '' (empty string). Secret key for Django installation. It is used to provide cryptographic signature and must have a unique value.
django-admin startproject automatically adds a randomly generated SECRET_KEY to each new project.
ALLOWED_HOSTS
- Default: [] (empty list). List of strings representing hostnames/domains that this Django site can serve. This is a security measure to prevent HTTP host header attacks, which are possible even with many seemingly safe web server configurations.DEBUG
- One of the main functions of debug mode is to display detailed error pages. If your app throws an exception when DEBUG is True, Django will display a detailed traceback, including a lot of metadata about your environment, such as all currently defined Django settings (from settings.py)
- Run migrations with:
python manage.py migrate
- Create a superuser to work with the admin panel:
python manage.py createsuperuser
- To get started in the admin panel:
python manage.py runserver
Team project on the online course for web developers dvmn.org.
Project was worked on by: