/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install pyenv
Assuming You have backend and frontend codes in /home/backend and /home/frontend/ (Use git to upload)
sudo apt-get update
sudo apt-get install python3-pip python3-dev libpq-dev postgresql postgresql-contrib nginx
| """ | |
| This is a simple example of usage of CallbackData factory | |
| For more comprehensive example see callback_data_factory.py | |
| """ | |
| import asyncio | |
| import logging | |
| from aiogram import Bot, Dispatcher, executor, types | |
| from aiogram.contrib.fsm_storage.memory import MemoryStorage |
| Полезные ключи программы psql | |
| -U - Указываем пользователя, например postgres | |
| -W - Приглашение на ввод пароля | |
| -d название_БД - Подключение к БД название_БД | |
| -h имя_хоста - Подключение к хосту имя_хоста | |
| -p порт - По какому порту постгря ожидает подключения | |
| -c команда - Выполнение команды SQL без выхода в интерактивный режим | |
| -f file.sql - Выполнение команд из файла file.sql | |
| -S - Однострочный режим, то есть, переход на новую строку будет выполнять запрос (избавляет от ; в конце конструкции SQL) |
| <div class="cart"> | |
| {% with total_items=cart|length %} | |
| {% if cart|length > 0 %} | |
| Ваша корзина: | |
| <a href="{% url "cart:CartDetail" %}"> | |
| {{ total_items }} тов. {{ cart.get_total_price }} руб. | |
| </a> | |
| {% else %} | |
| Корзина пустая | |
| {% endif %} |