Hacker News is a very cool community. It’s where all the coolest new things are being shared. Have you ever thought about building your own version of the site?

In this Django tutorial I will show you how to build a simple Hacker News clone using Django 3. I will begin by setting up a virtual environment to work in and then build the project piece by piece.

I hope this sounds like an exciting project to build. You should be able to follow along this video, even if you’re a beginner. I try to explain everything I do, but if you have a question or you’re stuck, feel free to leave a comment below :-)

Todo list for this video:

  • Create and setup a virtual environment and install Django.
  • Create a new django project and create folders for the base structure
  • Create a django app for the core views and base template for the whole application
  • Make it possible to sign up, login and log out
  • Create a django app for the stories (submissions)
  • Make it possible to submit a story
  • Show the best stories on the frontpage
  • Show the newest stories on a “newest” page
  • Make it possible to vote on a story
  • Show the detail view of a story
  • Make it possible to comment on a story
  • View profile (username, number votes)
  • Create page to see your votes
  • Create page to see submissions
  • Create a simple search

Source code (GitHub)
https://github.com/SteinOveHelset/codingnews

#django #python #web-development

How to build a simple Hacker News clone using Django 3
9.65 GEEK