GithubHelp home page GithubHelp logo

ebadgio / flask-blog-template Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 405 KB

A basic blogging app template developed with Python Flask on the backend

License: MIT License

Python 39.48% CSS 6.53% HTML 47.56% JavaScript 6.43%

flask-blog-template's Introduction

flask-blog-template

This is a basic blogging app template developed with Python Flask on the backend. I made it simply to learn how to use the Python Flask framework, but after finishing, I figured someone might find it useful as a starting point/template for their app. Primary features of the template: user authentication, basic user profile including profile picture uploads, creating/editing/deleting posts, and loading posts to a central newsfeed.

Technologies used:

  • Python Flask
  • HTML templating with Jinja2
  • CSS3 styling
  • Bootstrap
  • Minimal javascript used for post feed loading
  • MongoDB database

Usage

  1. Fork the repository, clone it, and cd into the directory

  2. Resolve the dependencies:

    • pip install flask flask_login bson flask_bcrypt pymongo flask_wtf wtforms pillow
  3. Set up a mongo database instance. My provider of choice is mLab

  4. Set expected environmental variables:

    • SECRET_KEY: some random text will suffice
    • FLASK_ENV: "development"
    • FLASK_APP: the name of the file which initializes the flask app (in this case it is server.py but you can change that)
    • MONGODB_URI: the database uri for the mongo instance
    • Note: for your convenience, you should consider creating a bash script file (such as env.sh) and set all of the environmental variables there. Then each time to start development. You simply need to source the file with the command source env.sh and the enviormental variables will be set for you.
  5. Start up the server: flask run

  6. Navigate to localhost:5000

flask-blog-template's People

Contributors

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