GithubHelp home page GithubHelp logo

csabika98 / codecoolseries Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 23.79 MB

Filmdatabase , Flask + PostgreSQL + JavaScript + HTML + CSS

Python 37.62% Shell 1.29% JavaScript 4.46% CSS 9.34% HTML 47.28%

codecoolseries's Introduction

Codecool Series DB

A system to help you store your favourite TV shows.

The story

This is a basic practice session to go through the basics of WEB technologies with python backend, postgres and some code on front-end.

A dumb wireframe is provided in the design.html file with will help you mix'n'match elements without lot of styling work.

Setup

  1. Clone this repo
  2. Open a terminal in the root folder of the cloned repository.
  3. Create a virtualenv: virtualenv venv
  4. Activate the virtualenv: source venv/bin/activate
  5. Install pip dependencies: pip install -r requirements.txt
  6. Create a Postgres database for this project: sudo -u postgres psql -c "CREATE DATABASE db_name_you_want;" or sudo -u postgres createdb db_name_you_want
  7. Set the environment variables which the code uses to connect to the database. For this you have two ways:
    1. Using the IDE: for example if you use pyCharm, then editing the configuration you can set environment variables. The necesssary ones you can find in setenv.sh.template
    2. Set the environment variables from the terminal. For this you can use our prewritten sh file (unix (linux) shell executables file):
      1. Make a copy of the setenv.sh.template file in the new name of setenv.sh
      2. Fill out the setenv.sh with YOUR details
      3. Source the setenv.sh file in the command line with the source setenv.sh command. You have to do it from the same terminal where you start main.py later.
  8. To create your database structure, you have 2 options, choose one:
    1. Using the pre-saved dump data:
      1. Run the data/db_schema/01_create_schema.sql SQL file to create empty tables
      2. Unzip the data/dump_1000_shows.zip file
      3. Run the unzipped sql files in the following order:
        1. genres
        2. shows
        3. show_genres
        4. seasons
        5. episodes
        6. actors
        7. show_characters
    2. Download data dynamically
      1. Run the data_inserter.py Python script to scrape the API and download data dynamically.
  9. Run the server with: python main.py or with the run configuration you set up in your IDE
  10. After you stop the server run: deactivate in the command line to clean up the variables used (you do not need to if you used your IDE to run)

Database

Relational model

codecoolseries's People

Contributors

csabika98 avatar szrudi avatar lterray avatar jsonfly 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.