Skip to content

Commit

Permalink
feat: Обновил документацию.
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonVagabond committed Mar 9, 2024
1 parent 974dd00 commit 1146bb5
Show file tree
Hide file tree
Showing 19 changed files with 164 additions and 10 deletions.
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
3. 📚 [Используемые зависимости](#dependencies_used)
4. 📈 [Связи между таблицами](#table)
5. 📽️ [Пример работы](#example_work)
6. 🔌 [Установка и запуск](#installation_and_launch)
6. 🔧 [Особенности проекта](#project_features)
7. 🔌 [Установка и запуск](#installation_and_launch)
- 📔 [Установка проекта в IDE](#installation_ide)
- 🐳 [Установка проекта в Docker](#installation_docker)
7. 📗 [Документация API](#documentation_api)
8. 🔐 [Лицензия](#license)
8. 📗 [Документация API](#documentation_api)
9. 🔐 [Лицензия](#license)

<a name="project_desc"></a>
## ✏️ Описание проекта ##
Expand Down Expand Up @@ -94,14 +95,36 @@

<a name="example_work"></a>
## 📽️ Пример работы. ##
1. Пример работы [копирования Базы Данных](docs/videos/Postman_t9M2iW3Xku.mp4) вы можете скачать и посмотреть.
2. Пример работы [Оформления заказа и его оплата в Yookassa](docs/videos/pycharm64_Jr15ACpje5.mp4) вы можете скачать и посмотреть.
1. Пример работы копирования **_Базы Данных_**. Скачать [видео](docs/videos/Postman_t9M2iW3Xku.mp4) в лучшем качестве.
![copy_bd](docs/gifs/Postman_t9M2iW3Xku-_1_.gif)

---

2. Пример работы **_Оформления заказа и его оплата в Yookassa_**. Скачать [видео](docs/videos/pycharm64_Jr15ACpje5.mp4) в лучшем качестве.
![pay_yookassa](docs/gifs/pycharm64_Jr15ACpje5.gif)

<a name="project_features"></a>
## 🔧 Особенности проекта ##
>[!WARNING]
> Если у вас возникают ошибки при запуске проекта, пару рекомендаций ниже могут вам помочь!
>1. При запуске проекта у вас возникает ошибка. Эта [ссылка](docs/problems/root_project/RootProjectProblem.md) может помочь вам.
>2. У вас возникает ошибка в логировании при входе в документацию. Эта [ссылка](docs/problems/logging/LoggingProblem.md) может помочь вам.
- Этот проект начинал создаваться без знания того, как более грамотно писать REST API и \
как правильно реализовывать сам интернет магазин. По этой причине могут быть какие-то недочеты.
- Почему в этом проекте нет микросервисов? Про микросервисы на тот момент я слышал, но как реализовать их не понимал.
По этой причине этот проект имеет только один сервис.


- Для более удобного использования проекта: \
Если хотите, чтобы ваш проект запускался с кнопки **Run** (_Shift+F10_) и применялся **Debug** (_Shift+F9_) зайдите по этой [ссылке](docs/configurations/Config.md)

<a name="installation_and_launch"></a>
## 🔌 Установка и запуск ##
> [!WARNING]
> Если на вашем компьютере **есть** всё нижеперечисленное, то можете _пропустить_ это предупреждение.
> - Может понадобиться регистрация в [Sentry](https://sentry.io).
> - Может понадобиться регистрация в [Yookassa](https://yookassa.ru/developers/payment-acceptance/testing-and-going-live/testing) для тестирования платежа.
<a name="installation_ide"></a>
### 📔 Установка проекта в IDE ##
Expand Down
33 changes: 28 additions & 5 deletions docs/README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
3. 📚 [Dependencies used](#dependencies_used)
4. 📈 [Relationships between tables](#table)
5. 📽️ [Example work](#example_work)
6. 🔌 [Installation and launch](#installation_and_launch)
6. 🔧 [Project Features](#project_features)
7. 🔌 [Installation and launch](#installation_and_launch)
- 📔 [Installing the project in the IDE](#installation_ide)
- 🐳 [Installing the project in Docker](#installation_docker)
7. 📗 [API Documentation](#documentation_api)
8. 🔐 [License](#license)
8. 📗 [API Documentation](#documentation_api)
9. 🔐 [License](#license)

<a name="project_desc"></a>
## ✏️ Description of the project ##
Expand Down Expand Up @@ -93,14 +94,36 @@ An approximate list of [endpoints](endpoints/Endpoints.en.md) and their capabili

<a name="example_work"></a>
## 📽️ Example work. ##
1. An example of how [Database copying works](videos/Postman_t9M2iW3Xku.mp4) you can download and watch.
2. An example of the work of [Placing an order and paying for it in Yookassa](videos/pycharm64_Jr15ACpje5.mp4) you can download and watch.
1. An example of how **_Database copying works_**. Download [video](videos/Postman_t9M2iW3Xku.mp4) in the best quality.
![copy_bd](gifs/Postman_t9M2iW3Xku-_1_.gif)

---

2. An example of the work of _**Placing an order and paying for it in Yookassa_**. Download [video](videos/pycharm64_Jr15ACpje5.mp4) in the best quality.
![pay_yookassa](gifs/pycharm64_Jr15ACpje5.gif)

<a name="project_features"></a>
## 🔧 Project Features ##
>[WARNING]
> If you encounter errors when starting a project, a couple of recommendations below can help you!
>1. When you start the project, you get an error. This [link](problems/root_project/RootProjectProblem.en.md) can help you.
>2. You have a logging error when logging into the documentation. This [link](problems/logging/LoggingProblem.en.md) can help you.
- This project began to be created without knowing how to write the REST API more competently and \
how to properly implement the online store itself. For this reason, there may be some shortcomings.
- Why are there no microservices in this project? I had heard about microservices at that time, \
but I did not understand how to implement them. For this reason, this project has only one service.


- For more convenient use of the project: \
If you want your project to start with the **Run** button (_Shift+F10_) and apply **Debug** (_Shift+F9_), go to this [link](configurations/Config.en.md)

<a name="installation_and_launch"></a>
## 🔌 Installation and launch ##
> [!WARNING]
> If you **have** all the following on your computer, you can skip this warning.
> - You may need to register in [Sentry](https://sentry.io)
> - You can try to register with [Yookassa](https://yookassa.ru/developers/payment-acceptance/testing-and-going-live/testing) to test the platform.
<a name="installation_ide"></a>
### 📔 Installing the project in the IDE ###
Expand Down
28 changes: 28 additions & 0 deletions docs/configurations/Config.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
For more convenient operation, you can apply the configuration of the automatic launch of the project. \
Do not crawl into the terminal every time and do not write this exhausted command - _python manage.py runserver_.

## 📃 Instructions for configuring the project configuration.

1. The first thing to do is to find and click on the Configuration Settings section. \
It looks like this:
![config1.png](../images/config_edit.png)

---
2. After that, you will see an empty Configuration settings window. \
You will need to click on the "+" in the upper left corner of the configuration window:
![config2.png](../images/config_plus.png)

---
3. Next, you need to add the configuration **_Python_**:
![config3.png](../images/config_add.png)

---
4. When you do this, you will see an empty configuration section:
![config4.png](../images/config_empty.png)

---
5. It will need to be edited as follows:
![config5.png](../images/cofig_exellent.png)

---
Now you have everything ready!
28 changes: 28 additions & 0 deletions docs/configurations/Config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Для более удобной работы, можно применить конфигурацию автоматического запуска проекта. \
Не лазя каждый раз в терминал и не прописывать эту измученную команду - _python manage.py runserver_.

## 📃 Инструкция для настройки конфигурации проекта.

1. Первое, что нужно сделать - это найти и нажать на раздел настройки Конфигурации. \
Выглядит это следующим образом:
![config1.png](../images/config_edit.png)

---
2. После чего вы увидите пустое окно настройки Конфигурации. \
Вам нужно будет нажать на "+" в верхнем левом углу окна конфигурации:
![config2.png](../images/config_plus.png)

---
3. Далее надо добавить конфигурацию **_Python_**:
![config3.png](../images/config_add.png)

---
4. Когда вы это сделаете у вас выскочит пустой раздел конфигурации:
![config4.png](../images/config_empty.png)

---
5. Его нужно будет отредактировать следующим образом:
![config5.png](../images/cofig_exellent.png)

---
Теперь у вас все готово!
Binary file added docs/gifs/Postman_t9M2iW3Xku-_1_.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/gifs/pycharm64_Jr15ACpje5.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cofig_exellent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/config_add.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/config_edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/config_empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/config_plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/photo_2024-02-10_21-38-32.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/photo_2024-02-10_21-40-19.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/photo_2024-02-10_21-40-59.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/root_project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions docs/problems/logging/LoggingProblem.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
When the project is launched, when you log into _swagger_, that is, into the documentation, you may get an error. \
This is caused with an encoding problem. This can be solved as follows.

> For more information about why this error may occur, you can read this [link](https://github.com/vklochan/python-logstash/issues/77).
---
#### 1. Find the file with the encoding error in the console. The path looks like this. And go into it:
![photo_problems1](../../images/photo_2024-02-10_21-38-32.jpg)

---
#### 2. There you will see the following code, you will need to fix the moment that is highlighted in yellow:
![photo_problems2](../../images/photo_2024-02-10_21-40-19.jpg)

---
#### 3. You need to fix it for this:
![photo_problems3](../../images/photo_2024-02-10_21-40-59.jpg)
16 changes: 16 additions & 0 deletions docs/problems/logging/LoggingProblem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Когда запускается проект, при входе в _swagger_, то есть в документацию, у вас может выскочить ошибка. \
Это вызвано с проблемой кодировки. Это можно решить следующим образом.

> Более подробно почему может возникнуть эта ошибка, можете почитать по этой [ссылке](https://github.com/vklochan/python-logstash/issues/77).
---
#### 1. Найдите в консоли файл с ошибкой кодировки. Путь выглядит так. И зайдите в него:
![photo_problems1](../../images/photo_2024-02-10_21-38-32.jpg)

---
#### 2. Там вы увидите такой код, вам нужно будет исправить момент, который выделен желтым:
![photo_problems2](../../images/photo_2024-02-10_21-40-19.jpg)

---
#### 3. Его вам нужно исправить на это:
![photo_problems3](../../images/photo_2024-02-10_21-40-59.jpg)
10 changes: 10 additions & 0 deletions docs/problems/root_project/RootProjectProblem.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
When starting a project, you need to specify the root of the project. This should be the **_src_** directory.
To do this, you will need a couple of actions:

---
1. Right-click on the **_src_** directory and find the _Mark Directory as_ section.
And click on **Sources Root**. It looks like this:
![img.png](../../images/root_project.png)

---
2. Next, you will need to go to the **src** directory in the console by typing the _cd src_ command. And it's already **starting** the project.
10 changes: 10 additions & 0 deletions docs/problems/root_project/RootProjectProblem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
При запуске проекта вам нужно указать корень проекта. Это должна быть директория **_src_**.
Чтобы это сделать вам нужно будет пару действий:

---
1. Нажать правой кнопкой мыши на директорию **_src_** и найти раздел _Mark Directory as_.
И нажать на **Sources Root**. Это выглядит вот так:
![img.png](../../images/root_project.png)

---
2. Дальше вам в консоли нужно будет перейти в директорию **src** набрав команду _cd src_. И от неё уже **запускать** проект.

0 comments on commit 1146bb5

Please sign in to comment.