Skip to content

Gulfia83/Bake_cake

Repository files navigation

Bake_cake_bot

Russian

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.

Examples of use

Start:

старт

Choose from the cake catalog:

выбор из готовых тортов

Assemble a cake from the presented ingredients:

собрать свой торт

Ability to speed up delivery and choose the time

возможность ускорить доставку и выбрать время

How to install

  1. Clone the repository to your local computer.
  2. Install the necessary packages using pip install -r requirements.txt.
  3. Create a .env file in the root directory of the project.
  4. 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)
  1. Run migrations with:
python manage.py migrate
  1. Create a superuser to work with the admin panel:
python manage.py createsuperuser
  1. To get started in the admin panel:
python manage.py runserver

Example of display in the admin panel

Customers and their orders

админ панель клиента

Cakes

админка торты

Project goal

Team project on the online course for web developers dvmn.org.


Project was worked on by:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •