Coder Social home page Coder Social logo

juan-hdv / book-reviewing Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 141 KB

An utility for reviewing books. It displays a list of books, offers books search, shows a book information card with the book rating.

Home Page: https://www.youtube.com/watch?v=6XHKgT3PfLY

Python 41.81% JavaScript 3.16% HTML 47.14% SCSS 7.89%
bookreview sqlalchemy-python

book-reviewing's Introduction

CS50-PROJECT 1 - Books Reviews

Author: Juan Gabriel Mejía

Date (yyyy-mm-dd): 2020-05-25

Description

An utility for reviewing books. It allows to load a lists of books from a csv file to a database. It displays a list of books, offers books search, shows a book information card with the book rating. Allows giving starts and a comment as a review for a book. Provides an API to get book info.

Technologies: Python, Flask, Javascript, CSV, Jinja, sqlalchemy.

Environment Variables

Before running this project, some environment variables must be set. For Ubuntu, set the following variables in ~/.profile ()

# Python development variables
export FLASK_APP="application.py"
export FLASK_DEBUG=1
export FLASK_ENV="development"
export DATABASE_URL='postgres://svvoceyhxqbdas:b7e1045e4df54f881134a71338ce3f0d62508ae2c2fd43155689dbb219ac747b@ec2-18-233-137-77.compute-1.amazonaws.com:5432/d2lj9lb32ova47'

Create an Enviroment

Before running this project, an Environment must be set for Python 3 and requirements.txt must be then installed

To do so, follow this steps: python3 -m venv my-project-env source my-project-env/bin/activate pip install requests

Project files and description

  • db_ultils/
    • db_create.sql: SQL for creating the databse schema. Three tables: books, users and reviews, being reviews a relationship between users and books.
    • import.py: Import into your PostgreSQL database all the books from the file 'books.csv'
  • static/
    • css/
      • main.css: the particular styles for the projects. It is generated from main.scss
      • main.scss a Sass file corresponding to the main.css
    • img/
      • book-half.svg:a Scalable Vector Graphics (svg) for the site logo.
    • js/
      • main.js: jquery actions for selecting and unselecting the stars for the book rating.
    • templates/
      • books.html: the home page where books can be searched and listed.
      • booktab.html: the page where a single booktab is showed, including book info, gooreadings rating and user reviews and ratings.
      • http_error403.html: error page for 403 error (Forbiden)
      • http_error404.html: error page for 404 error (Page Not Found)
      • layout.html: root template from which the others inherit.
      • login.html: login page, for capturing user an d password.
      • registration.html: page where a new user can give info for registering name, email, username and password.
  • .gitignore: Git file for ignoring other files.
  • application.py: the main program file where all the Flask routes and python processes are developed.
  • security.py: passlib functions for crypting and checking encrypted password (encrypt_password, check_encrypted_password). The password must be cypted before being saved to database; and password given by an user must be check against the crypted password in the database, before being granted acccess.
  • README.md: this file.
  • requirements.txt: all the packages that must be installed before running this project. Use: pip -install requirements.txt

book-reviewing's People

Contributors

juan-hdv avatar

Watchers

 avatar

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.