Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Shopyo integration #40

Merged
merged 7 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
85 changes: 71 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@



<img src="https://github.com/shopyo/ShopCube/blob/dev/assets/logo.png" width="250" />
<img src="https://github.com/shopyo/shopcube/blob/dev/assets/logo.png" width="250" />

[![First Timers Only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://www.firsttimersonly.com/)

Expand All @@ -22,9 +22,9 @@

</div>

# ShopCube
# shopcube

ShopCube is an e-commerce solution for shops. Complete with
shopcube is an e-commerce solution for shops. Complete with

- [x] 🛒 cart
- [x] ⭐ wishlist
Expand All @@ -38,6 +38,63 @@ If you want to contribute, go ahead, we ❤️ it. We follow a 💯 % first-time
Powered by [Shopyo](https://github.com/shopyo/shopyo), a Python web framework built on top of Flask.


## ⚡ Quick try


```
$ python -m pip install shopcube
$ shopcube initialise
$ shopcube rundebug
```

Go to [http://127.0.0.1:5000](http://127.0.0.1:5000)

## 🎫 Some explanations

Shopcube has two modes:

- package mode if you want to just use the app as is
- control mode if you want to see exactly what's going on

Package mode has several commands to manage the json settings file

```
$ shopcube showjson # show settings
$ shopcube copyjson # copy json file from site-packages in current directory
$ shopcube applyjson # apply json file in current directory
$ shopcube restorejson # restore original json file in site-packages
$ shopcube create # create new project named shopcube in current directory
$ shopcube packageinfo # path of project
```

Control mode allows you to use Shopyo commands as you would in any project

```
$ shopcube create
$ ls shopcube/
├── app.py
├── config.example.json
├── config.json
├── config.py
├── conftest.py
├── file.log
├── __init__.py
├── init.py
├── instance
├── __main__.py
├── modules
├── __pycache__
├── pyproject.toml
├── requirements.txt
├── setup.cfg
├── static
├── tests
├── utils
└── wsgi.py
$ cd shopcube
$ shopyo rundebug
```

## 🍼 First time setup

- Download and install the [latest version of git](https://git-scm.com/downloads).
Expand All @@ -51,13 +108,13 @@ Powered by [Shopyo](https://github.com/shopyo/shopyo), a Python web framework bu

- Make sure you have a [GitHub account](https://github.com/join).

- Fork ShopCube to your GitHub account by clicking the [Fork](https://github.com/shopyo/ShopCube/fork) button.
- Fork shopcube to your GitHub account by clicking the [Fork](https://github.com/shopyo/shopcube/fork) button.

- [Clone](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#step-2-create-a-local-clone-of-your-fork) the main repository locally (make sure to have your [SSH authentication](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) setup!). Replace `{username}` with your username.

```
$ git clone git@github.com:{username}/ShopCube.git
$ cd ShopCube
$ git clone git@github.com:{username}/shopcube.git
$ cd shopcube
```

- Create a virtualenv named env and activate the [virtual environment](https://docs.python.org/3/tutorial/venv.html):
Expand All @@ -82,27 +139,27 @@ Powered by [Shopyo](https://github.com/shopyo/shopyo), a Python web framework bu
$ python -m pip install --upgrade pip setuptools
```

- Install the development dependencies and ShopCube requirements:
- Install the development dependencies and shopcube requirements:

```
$ pip install -r reqs/app.txt
$ pip install -r reqs/dev.txt
$ python -m pip install -r reqs/dev.txt
```

- Now initialize the app by running:

```
$ cd shopyo
$ python manage.py initialise
$ python -m pip install -e .
$ cd src/shopcube
$ shopyo initialise
```

- Run ShopCube:
- Run shopcube:

```
$ python manage.py rundebug
$ shopyo rundebug
```

- Go to the link http://127.0.0.1:5000/ and you should see the ShopCube app running.
- Go to the link http://127.0.0.1:5000/ and you should see the shopcube app running.

- Login as administrator by clicking on the login icon on the top right hand side of the screen.

Expand Down
Binary file modified reqs/app.in
Binary file not shown.
54 changes: 32 additions & 22 deletions reqs/app.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,38 @@ click==8.0.1
dnspython==2.1.0
# via email-validator
email-validator==1.1.3
# via -r reqs/app.in
flask==2.0.2
# via
# -r reqs/app.in
# shopyo
flask==2.2.0
# via
# -r reqs/app.in
# flask-admin
# flask-login
# flask-mailman
# flask-marshmallow
# flask-migrate
# flask-reuploaded
# flask-sqlalchemy
# flask-wtf
flask-login==0.5.0
# via -r reqs/app.in
# shopyo
flask-admin==1.6.0
# via shopyo
flask-login==0.6.2
# via
# -r reqs/app.in
# shopyo
flask-mailman==0.3.0
# via -r reqs/app.in
# via shopyo
flask-marshmallow==0.14.0
# via -r reqs/app.in
# via shopyo
flask-migrate==3.1.0
# via -r reqs/app.in
flask-reuploaded==1.2.0
# via -r reqs/app.in
# via shopyo
flask-sqlalchemy==2.5.1
# via
# -r reqs/app.in
# flask-migrate
# shopyo
flask-wtf==1.0.0
# via -r reqs/app.in
# via shopyo
greenlet==1.1.2
# via sqlalchemy
idna==2.10
Expand All @@ -50,35 +55,40 @@ jinja2==3.0.1
# via flask
mako==1.1.5
# via alembic
markupsafe==2.0.1
markupsafe==2.1.1
# via
# jinja2
# mako
# werkzeug
# wtforms
marshmallow==3.14.1
# via
# -r reqs/app.in
# flask-marshmallow
# marshmallow-sqlalchemy
# shopyo
marshmallow-sqlalchemy==0.26.1
# via -r reqs/app.in
# via shopyo
mkdocs-material-extensions==1.0.3
# via flask-mailman
pymysql==1.0.2
# via -r reqs/app.in
shopyo==4.5.8
# via -r reqs/app.in
six==1.16.0
# via flask-marshmallow
sqlalchemy==1.4.27
# via
# -r reqs/app.in
# alembic
# flask-sqlalchemy
# marshmallow-sqlalchemy
werkzeug==2.0.1
# via flask
wtforms==2.3.3
# shopyo
werkzeug==2.2.2
# via
# -r reqs/app.in
# flask
# flask-login
# shopyo
wtforms==3.0.1
# via
# flask-admin
# flask-wtf
zipp==3.6.0
# via -r reqs/app.in
# shopyo
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
long_description = f.read()
setup(
name="shopcube", # Required
version="3.7.1", # Required
version="4.0.0", # Required
description="E-commerce solution", # Optional
long_description=long_description, # Optional
long_description_content_type="text/markdown", # Optional (see note above)
Expand Down
2 changes: 0 additions & 2 deletions shopyo/__init__.py

This file was deleted.

49 changes: 0 additions & 49 deletions shopyo/__main__.py

This file was deleted.

Loading