Coder Social home page Coder Social logo

valasek / kicoma Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 5.0 1.96 MB

Kitchen management software

Home Page: https://kicoma-tri.herokuapp.com/

License: GNU General Public License v3.0

Python 48.18% CSS 0.05% JavaScript 0.01% HTML 49.54% Shell 1.71% SCSS 0.14% Procfile 0.02% Dockerfile 0.36%
kitchen-management django heroku django-cookiecutter python

kicoma's Introduction

KiCoMa - Kitchen cooking management

GitHub release GitHub issues Build Status Built with Cookiecutter Django Black code style

Demo

Check the lastest version at kicoma-tri.herokuapp.com.

License

All source code in the KiCoMa is available under the GNU GPL v3 License. See LICENSE.md for details.

Data Model

Data model

Useful Commands

Reset Development DB

./reset-db.sh

Reset Heroku DB

./reset-db-heroku.sh

Check the production settings

./manage.py check --deploy --settings=config.settings.production

Generate DB model

Using https://django-extensions.readthedocs.io/en/latest/graph_models.html

  • python3 manage.py graph_models -a -g -o datamodel.png or
  • python3 manage.py graph_models kitchen -g -o datamodel.png and copy the file to statics/images

Update Translations

Generate message files for a desired language

./manage.py makemessages -l en -l cs

After adding translations to the .po files, compile the messages

./manage.py compilemessages

Deploy to Heroku

Update

heroku login

Update

git push kicoma-tri master git push heroku master

Usefull heroku commands

heroku git:remote -a kicoma-tri heroku apps:info -a kicoma-tri heroku apps:stacks -a kicoma-tri heroku buildpacks -a kicoma-tri

Generate user password for fixture

./manage.py shell from django.contrib.auth.hashers import make_password make_password('password')

External dependencies

  • Python
  • Django
  • Postgresql

Getting started

To get started with the app, clone the repo and then install Python 3:

$ cd ~/tmp
$ git clone https://github.com/valasek/kicoma
$ cd kicoma

Install docker and docker compose and run docker-compose up

DEPRECATED - local dev server

Create python virtual environment, tested is python 3.10.2 https://towardsdatascience.com/python-environment-101-1d68bda3094d python3 -m venv <virtual env path>

Switch to the virtual environment: source ./env/bin/activate

Install dependenciec pip install -r requirements/local.txt

Install PostgreSql, I use Postgres.app and PgAdmin as a client

Create DB with a name kicoma

migrate the database:

$ ./manage.py makemigrations
$ ./manage.py migrate

Finally, run the test suite to verify that everything is working correctly:

$ ./manage.py test

If the test suite passes, you'll be ready to run the app in a local server:

$ ./manage.py runserver

Getting up and running locally: https://cookiecutter-django.readthedocs.io/en/latest/developing-locally.html

Reset DB

./reset-db.sh

Settings

Moved to settings_.

.. _settings: http://cookiecutter-django.readthedocs.io/en/latest/settings.html

Basic Commands

Setting Up Your Users ^^^^^^^^^^^^^^^^^^^^^

  • To create a normal user account, just go to Sign Up and fill out the form. Once you submit it, you'll see a "Verify Your E-mail Address" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go.

  • To create an superuser account, use this command::

    $ python manage.py createsuperuser

For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.

Type checks ^^^^^^^^^^^

Running type checks with mypy:

::

$ mypy kicoma

Test coverage ^^^^^^^^^^^^^

To run the tests, check your test coverage, and generate an HTML coverage report::

$ coverage run -m pytest
$ coverage html
$ open htmlcov/index.html

Running tests


 ./manage.py test kitchen


::

  $ pytest

Live reloading and Sass CSS compilation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Moved to `Live reloading and SASS compilation`_.

.. _`Live reloading and SASS compilation`: http://cookiecutter-django.readthedocs.io/en/latest/live-reloading-and-sass-compilation.html


Deployment
----------

The following details how to deploy this application.

Heroku
^^^^^^

## Initial set-up
https://cookiecutter-django.readthedocs.io/en/latest/deployment-on-heroku.html

Managing Multiple Environments for an App - https://devcenter.heroku.com/articles/multiple-environments

Do not forget to add the following argument at the end of every command:
` --app <app-name>`
``--app kicoma-tri`

## Set email domain
`heroku config:set MAILGUN_DOMAIN=hospic-cercany.cz`

## Initialize DB
`./reset-db-heroku.sh`

kicoma's People

Contributors

michal-simon avatar valasek avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kicoma's Issues

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.