Chrysolites Tech Academy

Video by freeCodeCamp.org · streamed from YouTube. All rights remain with the creator.

Lesson 2: A Social Media App with Django

About this lesson

This project course, developed by CodeWithTomi and published by freeCodeCamp, builds a complete social media web application with Django, the Python web framework. It starts with a demonstration of the finished app and then sets up a new Django project from scratch. You learn how URL routing connects addresses to views, how to set up templates for the pages and how to serve static files such as stylesheets and images. A profile model is created to store extra information about each user. The course then builds the account system: a sign-up page that validates the details and creates a new user and profile, sign-in and logout, and an account settings page where users can update their profile picture, bio and location. With accounts in place, users can upload posts with images and captions, and a post feed displays them. You then add the ability to like posts, build a profile page that shows each user's posts and statistics, and implement following and unfollowing other users. The feed is updated so that it shows posts from the people a user follows. Further features complete the app: downloading images from posts, searching for other users by username and showing suggestions of users to follow. Throughout, the course shows how Django's models, views and templates work together to turn a static design into a working site. Afterwards, read Chapter 2 of the course book, which works through follows, the feed and suggestions by hand.

Install Chrysolites Tech Academy

Android / Chrome / Edge: open the browser menu and choose Install app or Add to Home screen.

iPhone / iPad (Safari): tap the Share button, then Add to Home Screen.