Coder Social home page Coder Social logo

bookstore's Introduction

Bookstore

Status GitHub Issues License Coverage

  • A basic bookstore application built using the Django 5.0.x web framework
Table of Contents

Features

  • Application

    • Add book reviews
    • Upload book covers
    • Basic search capability
    • User registration with email verification & social(GitHub) login using django-allauth
    • Bootstrap4 & crispy-forms decorations
    • Customizable user profile pages with bio, profile pic, & country flags
    • For additional links to package resources used in this repository, see the Package Index
  • Dev/testing

  • run command menu

    (adapted from Nick Janetakis' helpful docker-django-example)

    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/bookstore.git
  • cd bookstore
  • 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 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-start-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 black, Sphinx documentation, lint, 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 black-3.12
      • nox -s docs-3.11
      • nox -rs lint-3.10 (Use the 'r' flag to reuse existing session)
      • nox -s safety (will run tests against all Python versions)
      • nox -s tests

Application Demo

A live application demonstration:

  • TBD

Screenshots

Home

Home

Search Results

Search Results

Book detail with reviews

Book detail

Book detail with django-debug-toolbar

Detail debug-toolbar


Reporting Bugs

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

bookstore's People

Contributors

kevinbowen777 avatar

Watchers

 avatar James Cloos avatar  avatar

bookstore's Issues

Improve book list

Remove bullets from list. Perhaps use the following css:

ul.no-bullets {
  list-style-type: none; /* Remove bullets */
  /* padding: 0;  Remove padding */
  margin: 0; /* Remove margins */
}

Override allauth email & password templates

Create new template to match our theme and override the default django-allauth templates for the following:

templates/account/email.html
templates/account/email_confirm.html
templates/account/password_change.html
templates/account/password_reset.html
templates/account/password_reset_done.html
templates/account/password_reset_from_key.html
templates/account/password_reset_from_key_done.html

Move Review functionality to userspace

Currently, adding a review is only possible through the admin interface.
Create a view that will allow users(with appropriate permissions) to Create,
Update, & Delete reviews from the main app pages.

Verify settings for whitenoise

Application is missing the STATICFILES_STORAGE parameter. Whitenoise needs to
be moved from STATICFILE_FINDERS to the STORAGE variable.

Rename _base.html

Rename the file templates/_base.html to base.html to match the rest of our projects. Update all project files that call this template. I.e. change {% extends '_base.html' %} to {% extends 'base.html' %}

Add div container to pages

The content of pages needs a slight adjustment to bring the header away from
the navbar. Add the following:

<div class="container">
  <p>
  ...
  </p>
</div>

Handling media images in Heroku

According to this
bug
Heroku
does not allow for the handling of uploaded media files. You may need to look
at something like django-storage to serve from a 3rd party resource.

We are in the process of migrating off of Heroku. This won't be addressed.

Add dropdown toggle menu in navbar

Update the navbar and move the logout & about links under a dropdown toggle. In addition, create links for 'change password(account_set_password)' and 'change email(account_email)'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.