Skip to content

A website for shopping and delivery made using django framework

Notifications You must be signed in to change notification settings

RabeaZr/IO-Store-Website

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the I/O Store! 🏪 💯

I strongly encourage you to update, refine, and enhance this readme file!

Development Environment

  1. Python v3.10.4
  2. Python virtual environment containing requirements from requirements.txt file (Django is included there)

Development workflow

Documentaion by the numpy style guide looks good 👌

Standard acronyms to start a commit message:

  • API: an (incompatible) API change
  • BENCH: changes to the benchmark suite
  • BLD: change related to building iostore
  • BUG: bug fix
  • DEP: deprecate something, or remove a deprecated object
  • DEV: development tool or utility
  • DOC: documentation
  • ENH: enhancement
  • MAINT: maintenance commit (refactoring, typos, etc.)
  • REV: revert an earlier commit
  • STY: style fix (whitespace, PEP8)
  • TST: addition or modification of tests
  • REL: related to releasing iostore

example: BUG: fixed the foo function bug from issue #1234

Django

How to run the Django server?

  1. open terminal (ctrl + `)
  2. navigate to the folder containing manage.py file and run:
py manage.py runserver
  1. open your browser and type the url:
localhost:8000

How to Update DB?

In order to create an initial db we will use fixtures

Example for creating and loading users.User fixture:

  • Add users via registration in the site
  • run the following command:
py .\manage.py dumpdata -o users/fixtures/users.json users
  • in order to load this fixture to an empty db run the command:
py .\manage.py loaddata users

Tips

  • When you start a new app with Django don't forget to add it to apps.py file and add the name of the class to the INSTALLED_APP.
  • It is better practice to keep most of the logic in models.py and not views.py (will result less db io)

Python Virtual Environment (venv)

Some Terminal Commands

⚠️ You can click copy to clipboard button and just paste in terminal

Before Activating Environment

py -m venv venv                             # Create a virtual environment
py -m venv venv --upgrade-deps              # Update core dependencies
venv\Scripts\activate                       # Activate the virtual environment

After Activating Environment

deactivate                                  # Deactivate the virtual environment
pip install -r requirements.txt --upgrade   # Update packages for activated env

Install new Python package

  1. add the package and desired version to the requirements.txt file
  2. run
pip install -r requirements.txt --upgrade
  1. Tell the rest of the team so they will update their env as well :)

Git

Setting up your credentials

In order to commit changes to git, you must configure name and email. After opening a GitHub account you will get a pseudo email, that will route to the email you logged in GitHub with, so you don't have to put your personal email open for public. To configure your credentials open GIT Bash and enter the following commands:

git.config --global user.name "John wick"
git.config --global user.email "[email protected]"

Encountering "WTF?!!" Issues?

  1. Rerun Django server
  2. Refresh page and clear cache on browser using ctrl + shift + r

Tutorials

Documentations

References

About

A website for shopping and delivery made using django framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 39.1%
  • Python 38.7%
  • CSS 19.2%
  • JavaScript 3.0%