Example of a store with a catalog and shopping cart
git clone https://github.com/mitrofun/simple_shop.git
cd simple_shop
pip3 install -r requirements.txt
WARNING to run the application locally, you must install it on
your system yarn
and gulp
and after run command for download
library for frontend
yarn install
gulp copy
WARNING By default, sqlite is used for local startup, which creates
database file located at the root of the project,
to override this behavior, set the path of the variable in
environment variable DATABASE_URL
, for example sqlite.
export DATABASE_URL='sqlite:////full/path/to/your/database/file.sqlite'
For more information on how to set up a database connection, see here
After roll migration
python3 manage.py migrate
or use command
make migrate
Create administrator with username admin
and password admin
python3 manage.py createdefaultuser
or use command
make user
After run develop server
python3 manage.py runserver
To demonstrate the project, it has fixtures with categories and products. To load fixtures, use the following commands
mkdir -p media/products && cp -rf fixtures/products media
python3 manage.py loaddata fixtures/category.json
Run command
python3 manage.py createdefaultuser
create user admin with admin permission and simple password admin
The project has a quick start script that does all the operations described above. To run it, run the following command
./quick_start.sh
docker-compose up --build
- python 3.6+
- Django 2.1+
- see all requirements in base.txt
For run test use the following commands
pip3 install -r requirements/dev.txt
pytest
simple_shop is released under the MIT License. See the LICENSE file for more details.