Giter VIP home page Giter VIP logo

food2's Introduction

Food2

A Django web app allowing you to choose a recipe to cook for each day of the week. Once your recipe chosen, all its required ingredients will be added to a shopping list that you can modify

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

To run the project you will need:

  • Python (at least 3.5)
  • MySQL or MariaDB
  • (optional) pipenv or virtualenv modules to manage your Python virtualenvs

Installing

A step by step series of examples that tell you how to get a development env running

Clone the repo:

git clone https://github.com/Sebastien-M/food2.git

Install requirements:

pip install -r Pipfile

or if you are using pipenv

pipenv install

Create your database in MySQL/MariaDB:

CREATE DATABASE <db_name>;

Inside food2/deploy create a file called 'secrets_local.py' and fill the values:

import os  
  
SECRETS_BASE_DIR        = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRETS_ALLOWED_HOSTS   = ['*']
SECRETS_DB_NAME         = 'your db name'
SECRETS_DB_USER         = 'your db user'
SECRETS_DB_PASS         = 'your db pass'
SECRETS_DB_HOST         = 'your db host'
SECRETS_DB_PORT         = 'your db port'
SECRETS_DEBUG           = True
SECRETS_STATIC_URL      = '/static/'
SECRETS_STATIC_ROOT     = os.path.join(SECRETS_BASE_DIR, '/static/')
SECRETS_LOG_PATH        = './debug.log'
SECRETS_SECRET_KEY      = 'your secret key'

Start your virtualenv if you are using one If you are using pipenv:

pipenv shell

at the root of the repository

Run Django migrations:

python manage.py food2/manage.py migrate

Create a user to have access to the admin site:

python manage.py createsuperuser

Run the developpement server:

python manage.py runserver

The project also comes with a custom command to populate the database with recipes and their ingredients:

python manage.py fill database <ingredient_name>

You can pass multiple ingredients names separated with a space. This command will scrap marmiton website and search for recipes with specified ingredients

Running the tests

TODO

Deployment

Gunicorn is used to run the application in production environment, you can read the doc here) to see how to deploy it. Gunicorn is present in the Pipfile you previously installed and should be available.

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Sébastien Mandaba - Initial work - github

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

  • Potato

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.