Skip to content

This is a refactor of an existing application to use Python on the back end. Uses Python for models, API endpoints, validation, templating, and more.

Notifications You must be signed in to change notification settings

pmacdonald07/python-newsfeed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Newsfeed

Deployed Application: https://python-newsfeed-23.herokuapp.com/

Description

Python Newsfeed is a refactor of an existing newsfeed application to use Python for the backend. The application allows users to sign up, create, edit, and delete posts, comment on posts, and upvote posts. The homepage for Python Newsfeed is shown below:

python-newsfeed-hp

Python Newsfeed uses a MySQL database and the SQLAlchemy ORM to create db tables. The app uses Flask for CRUD operations (Create, Read, Update, Delete) and API routes. It uses Jinja for rendering templates on the server side, populating the templates with data from the database. Python Newsfeed uses bcrypt for hashing users passwords. It also uses custom Python decorators to conditionally render parts of the application based on whether or not users are logged in. Python Newsfeed is deployed through Heroku and uses Gunicorn as the web server.

Instillation

If users would like to install Python Newsfeed on their local machines, they will need to install python by downloading it here:

https://www.python.org/downloads/

They will need to set up a virtual enviornment using the command line to install dependencies using the following commands:

python -m venv venv .\venv\Scripts\activate

The dependencies for this application, such as Flask, are listed in the "Dependencies" section below.

Usage

The first thing users will need to do when using Python Newsfeed is signup. When they return to the site they will need to login:

python-newsfeed-login

When users login, they will be taken to their dashboard where they can create posts and see their previous posts:

python-newsfeed-dash

Users can click "Edit Post" and the app will take them to the following screen where they can edit a post's title or delete it:

python-newsfeed-edit

From the homepage, users can click on other users' posts and comment on them:

python-newsfeed-comment

Plans for Future Development

In the future, I would like to improve upon the front end of this application. The primary purpose was to learn how to create a backend using Python, but the frontend experience for the user can be vastly improved.

Dependencies

The application's primary dependencies are: bcrypt Flask Gunicorn Jinja2 PyMySql Python-dotenv SQLAlchemy

Licenses

There are currently no licenses for this application.

Tests

There are currently no tests for this application.

Contact

Email: patrickmacdonald07@gmail.com GitHub: https://github.com/pmacdonald07 LinkedIn: https://www.linkedin.com/in/patrick-macdonald-nc/

About

This is a refactor of an existing application to use Python on the back end. Uses Python for models, API endpoints, validation, templating, and more.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published