Giter VIP home page Giter VIP logo

django-twitter-game's Introduction

django-twitter-game

About

Built on Python's Django framework. Background tasks such as determining the validity of a post an hour after creation are handled with the django-background-tasks package.

There are two sub folders for the twitter_game app: twitter_game, and posts. twitter_game handles the homepage view. posts handles everything that has to do with a post such as the post, like, and dislike models, the post create view, and the like and dislike routes.

The code that handles the background tasks can be found in posts/models.py.

Getting Started

  • Ensure Python 3 is installed
  • Start Python 3 virtual environment in root directory (django-twitter-game)
    • python3 -m venv ENV
  • Install dependencies
    • pip install -r requirements.txt
  • Create PostgreSQL database
    • createdb twittergame
  • Setup Database
    • cd twitter_game
    • ./manage.py makemigrations
    • ./manage.py migrate
  • Run app locally
    • ./manage.py runserver
  • Setup another tab to run background tasks
    • Open up a new tab in terminal
    • Activate the environment in that tab
    • Run ./manage.py process_tasks
  • View app in web browser
    • http://localhost:8000/

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.