đź›–
Restaurants
Settings
Moved to settings.
Basic Commands
setup the development environment
- Install docker on you platform.
- Install docker-compose on your platform.
- Run the Development environment:
git clone https://github.com/ahmedelfateh/Restaurant-Mono-ERP.git
cd Restaurant-Mono-ERP
docker-compose up --build
- Open another terminal tab, to migrate DB:
docker-compose run --rm django ./manage.py migrate
Setting Up Your Users
- To create a normal user account, just go to Sign Up and fill out the form. Once you submit it, your login done.
- To create an superuser account, start in the root folder and use this command:
docker-compose run --rm django ./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.
- To run any django command inside the docker environment, start in the root folder and use this command:
docker-compose run --rm django ./manage.py **...django_command...**
docker-compose run --rm django ./manage.py makemigrations
Test coverage
To run the tests, check your test coverage, and generate an HTML coverage report::
docker-compose run --rm django coverage run -m pytest
docker-compose run --rm django coverage html
open htmlcov/index.html
Testing
- Run tests, for all app:
docker-compose run --rm django ./manage.py test --debug-mode