kevinbowen777 / django-shop

An online shop built with the Django web framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

django-shop

Status GitHub Issues License Coverage

  • django-shop - An online shop built with the Django web framework
Table of Contents

Features

  • Application

  • Dev/testing

  • run command menu

    A collection of command shortcuts/aliases for frequently used Docker, Django, and Nox commands. (adapted from Nick Janetakis' helpful docker-django-example) repository.

    You can run ./run to get a list of commands and each command has documentation in the run file itself. This comes in handy to run various Docker commands because sometimes these commands can be a bit long to type.

    If you get tired of typing ./run you can always create a shell alias with alias run=./run in your ~/.bash_aliases or equivalent file. Then you'll be able to run run instead of ./run.


Installation

  • git clone https://github.com/kevinbowen777/django-shop.git
  • cd django-shop
  • Local installation:
    • poetry shell
    • poetry install
    • python manage.py migrate
    • python manage.py createsuperuser
    • python manage.py runserver
  • Docker installation:
    • docker compose up --build
    • docker compose build --build-arg "ENV=DEV" (include testing/dev dependencies)
    • docker compose build --build-arg "ENV=PROD"
    • docker compose exec web python manage.py migrate
    • docker compose exec web python manage.py createsuperuser Additional commands:
      • docker compose exec web python manage.py shell_plus (loads Django shell autoloading project models & classes)
      • docker run -it django-shop-web bash (CLI access to container)
  • Browse to http://127.0.0.1:8000 or http://127.0.0.1:8000/resources/
  • Pre-commit:
    • To add the hook, run the following command in the poetry shell:
      • pre-commit install

Testing

  • docker compose exec web python manage.py test
  • coverage run -m pytest
  • Nox (includes sessions for lint, typing, safety, tests)
    • testing supported for Python 3.10, 3.11, 3.12
    • e.g. nox, nox -rs lint-3.11, nox -s tests
      • nox
      • nox -s docs-3.11
      • nox -rs lint-3.10 (Use the 'r' flag to reuse existing session)
      • nox -s pyright-3.11
      • nox -s safety (will run tests against all Python versions)
      • nox -s tests

Application Demo

  • TBD

Screenshots

TBD


Contributions

At this time, this project is not accepting pull-requests. You are free to fork this repository and modify as you see fit.


Reporting Bugs

Visit the Issues page to view currently open bug reports or open a new issue.

About

An online shop built with the Django web framework

License:MIT License


Languages

Language:Python 51.0%Language:Shell 27.1%Language:CSS 11.9%Language:HTML 10.1%