Giter Club home page Giter Club logo

catalog's Introduction

Catalog

This is the production version of the code from Item Catalog. Putting the application on a secure server requires us to configure a web server (Apache) and an acquire an SSL certificate. We must also migrate from SQLite to Postgresql. This process is detailed at the linux-server-config repo. As most of this work is done on the server side, very little of the original application code has been changed. I have set up this repo mainly for cloning purposes. Details about the application logic and the purpose of the web app are unchanged, and can be viewed at the original Item Catalog

Summary of changes made

  • Renamed catalog.py to __init__.py, which wsgi looks for to run the Flask application logic.

  • In the files __init.py__, catalog_setup.py and music.py, engine = create_engine('sqlite:///musiccatalog.db') is changed to engine = create_engine('postgresql://catalog:catalog@localhost/catalog')to replace SQLite with Postgresql.

  • The catalog_setup.pyc and music.db files used by SQLite have been deleted.

  • The line h = httplib2.Http(".cache") is changed to h = httplib2.Http() because the argument .cache is optional. Its purpose is to enable a log, but this has been made redundant by the error log and access log files enabled in the catalog.conf file, which is used by Apache to serve the app.

  • Changed from catalog_setup import Base, Genre, Album to from catalog.catalog_setup import Base, Genre, Album which is necessary after the switch from SQLite to Postgresql.

  • Changed path of client_secrets.json in __init__.py to the absolute path of /var/www/catalog/client_secrets.json.

  • In __init__.py, removed the parameters of the run() method.

catalog's People

Contributors

pekerow 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.