recipe_api
1.0.0
Это база данных рецептов с открытым исходным кодом и API.


Start Postgres:
docker-compose up -d postgres
Установить зависимости от питона:
pip install -r requirements.txt
Создать базу данных и таблицы:
python manage.py migrate
Создать таблицы кеша:
python manage.py createcachetable
Создайте суперпользователь для администратора:
python manage.py createsuperuser
Рецепты скребки:
python manage.py scrape --urls --recipes --images --ingest
Запустите веб -сервер:
DEBUG=1 python manage.py runserver
URL: http: // localhost: 8000
Клон репо первым.
Возьмите все:
docker-compose up -d
Развернуть обновления фронта
git pull
docker-compose up --force-recreate -d recipes
Развернуть спереди и заднюю часть:
git pull
docker-compose up --build --force-recreate -d recipes
Принудительно царапин:
docker-compose exec recipes python manage.py scrape --urls --recipes --images --ingest --force
Clear Cache:
docker-compose exec recipes python manage.py shell
from django.core.cache import cache
cache.clear()