How to build a simple hacker news clone using Django - How to build a simple hacker news clone using Django

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.

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

Comments

EFSArCBy | Jul 02, 26 11:41

555

EFSArCBy | Jul 02, 26 11:42

555

EFSArCBy | Jul 02, 26 11:42

555

EFSArCBy | Jul 02, 26 11:42

-1 OR 2+859-859-1=0+0+0+1 --

EFSArCBy | Jul 02, 26 11:42

-1 OR 2+929-929-1=0+0+0+1

EFSArCBy | Jul 02, 26 11:42

-1' OR 2+51-51-1=0+0+0+1 --

EFSArCBy | Jul 02, 26 11:42

-1' OR 2+639-639-1=0+0+0+1 or 'PkByTu4I'='

EFSArCBy | Jul 02, 26 11:42

-1" OR 2+15-15-1=0+0+0+1 --

EFSArCBy | Jul 02, 26 11:42

555*if(now()=sysdate(),sleep(15),0)

EFSArCBy | Jul 02, 26 11:42

5550'XOR(555*if(now()=sysdate(),sleep(15),0))XOR'Z

EFSArCBy | Jul 02, 26 11:42

5550"XOR(555*if(now()=sysdate(),sleep(15),0))XOR"Z

EFSArCBy | Jul 02, 26 11:42

(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/

EFSArCBy | Jul 02, 26 11:42

555-1; waitfor delay '0:0:15' --

EFSArCBy | Jul 02, 26 11:42

555-1); waitfor delay '0:0:15' --

EFSArCBy | Jul 02, 26 11:42

555-1 waitfor delay '0:0:15' --

EFSArCBy | Jul 02, 26 11:42

55576I02LxK'; waitfor delay '0:0:15' --

EFSArCBy | Jul 02, 26 11:42

555-1 OR 491=(SELECT 491 FROM PG_SLEEP(15))--

EFSArCBy | Jul 02, 26 11:42

555-1) OR 212=(SELECT 212 FROM PG_SLEEP(15))--

EFSArCBy | Jul 02, 26 11:42

555-1)) OR 14=(SELECT 14 FROM PG_SLEEP(15))--

EFSArCBy | Jul 02, 26 11:42

555mSSmlQyg' OR 47=(SELECT 47 FROM PG_SLEEP(15))--

EFSArCBy | Jul 02, 26 11:42

555QqPPinbt') OR 380=(SELECT 380 FROM PG_SLEEP(15))--

EFSArCBy | Jul 02, 26 11:42

5555ytyCQWg')) OR 521=(SELECT 521 FROM PG_SLEEP(15))--

EFSArCBy | Jul 02, 26 11:42

555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)

EFSArCBy | Jul 02, 26 11:42

555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'

EFSArCBy | Jul 02, 26 11:42

555

EFSArCBy | Jul 02, 26 11:42

555'"

EFSArCBy | Jul 02, 26 11:42

@@V7Z2l

EFSArCBy | Jul 02, 26 11:42

555

EFSArCBy | Jul 02, 26 11:42

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

-1 OR 2+451-451-1=0+0+0+1 -- | Jul 02, 26 11:43

555

-1 OR 2+841-841-1=0+0+0+1 | Jul 02, 26 11:43

555

-1' OR 2+613-613-1=0+0+0+1 -- | Jul 02, 26 11:43

555

-1' OR 2+632-632-1=0+0+0+1 or '9w8ycDeY'=' | Jul 02, 26 11:43

555

-1" OR 2+619-619-1=0+0+0+1 -- | Jul 02, 26 11:43

555

if(now()=sysdate(),sleep(15),0) | Jul 02, 26 11:43

555

EFSArCBy0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z | Jul 02, 26 11:43

555

EFSArCBy0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z | Jul 02, 26 11:43

555

EFSArCBy-1 waitfor delay '0:0:15' -- | Jul 02, 26 11:43

555

EFSArCByWW85yrtu'; waitfor delay '0:0:15' -- | Jul 02, 26 11:43

555

EFSArCByiOvlPZSx' OR 768=(SELECT 768 FROM PG_SLEEP(15))-- | Jul 02, 26 11:43

555

EFSArCBy39aauzRt') OR 959=(SELECT 959 FROM PG_SLEEP(15))-- | Jul 02, 26 11:43

555

EFSArCBy5tpIkiZ9')) OR 709=(SELECT 709 FROM PG_SLEEP(15))-- | Jul 02, 26 11:43

555

EFSArCBy'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||' | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy'" | Jul 02, 26 11:43

555

@@AAvyj | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 02, 26 11:43

555

EFSArCBy | Jul 21, 26 12:37

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

-1 OR 2+152-152-1=0+0+0+1 --

EFSArCBy | Jul 21, 26 12:38

-1 OR 2+412-412-1=0+0+0+1

EFSArCBy | Jul 21, 26 12:38

-1' OR 2+522-522-1=0+0+0+1 --

EFSArCBy | Jul 21, 26 12:38

-1' OR 2+670-670-1=0+0+0+1 or '0D6GN8C2'='

EFSArCBy | Jul 21, 26 12:38

-1" OR 2+850-850-1=0+0+0+1 --

EFSArCBy | Jul 21, 26 12:38

555*if(now()=sysdate(),sleep(15),0)

EFSArCBy | Jul 21, 26 12:38

5550'XOR(555*if(now()=sysdate(),sleep(15),0))XOR'Z

EFSArCBy | Jul 21, 26 12:38

5550"XOR(555*if(now()=sysdate(),sleep(15),0))XOR"Z

EFSArCBy | Jul 21, 26 12:38

(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/

EFSArCBy | Jul 21, 26 12:38

555-1; waitfor delay '0:0:15' --

EFSArCBy | Jul 21, 26 12:38

555-1); waitfor delay '0:0:15' --

EFSArCBy | Jul 21, 26 12:38

555-1 waitfor delay '0:0:15' --

EFSArCBy | Jul 21, 26 12:38

555jndqQOWJ'; waitfor delay '0:0:15' --

EFSArCBy | Jul 21, 26 12:38

555-1 OR 275=(SELECT 275 FROM PG_SLEEP(15))--

EFSArCBy | Jul 21, 26 12:38

555-1) OR 191=(SELECT 191 FROM PG_SLEEP(15))--

EFSArCBy | Jul 21, 26 12:38

555-1)) OR 320=(SELECT 320 FROM PG_SLEEP(15))--

EFSArCBy | Jul 21, 26 12:38

555YlKuyVgk' OR 681=(SELECT 681 FROM PG_SLEEP(15))--

EFSArCBy | Jul 21, 26 12:38

555wrGWAb1h') OR 695=(SELECT 695 FROM PG_SLEEP(15))--

EFSArCBy | Jul 21, 26 12:38

55535nEYBst')) OR 883=(SELECT 883 FROM PG_SLEEP(15))--

EFSArCBy | Jul 21, 26 12:38

555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)

EFSArCBy | Jul 21, 26 12:38

555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555'"

EFSArCBy | Jul 21, 26 12:38

@@eledD

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

-1 OR 2+863-863-1=0+0+0+1 -- | Jul 21, 26 12:38

555

-1 OR 2+533-533-1=0+0+0+1 | Jul 21, 26 12:38

555

-1' OR 2+403-403-1=0+0+0+1 -- | Jul 21, 26 12:38

555

-1' OR 2+238-238-1=0+0+0+1 or 'ZmhSuU8u'=' | Jul 21, 26 12:38

555

-1" OR 2+857-857-1=0+0+0+1 -- | Jul 21, 26 12:38

555

if(now()=sysdate(),sleep(15),0) | Jul 21, 26 12:38

555

EFSArCBy0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z | Jul 21, 26 12:38

555

EFSArCBy0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z | Jul 21, 26 12:38

555

EFSArCBy-1 waitfor delay '0:0:15' -- | Jul 21, 26 12:38

555

EFSArCByCzwWiQiG'; waitfor delay '0:0:15' -- | Jul 21, 26 12:38

555

EFSArCByZdJA1HzE' OR 324=(SELECT 324 FROM PG_SLEEP(15))-- | Jul 21, 26 12:38

555

EFSArCByga6Vo96U') OR 400=(SELECT 400 FROM PG_SLEEP(15))-- | Jul 21, 26 12:38

555

EFSArCByhggBokfW')) OR 22=(SELECT 22 FROM PG_SLEEP(15))-- | Jul 21, 26 12:38

555

EFSArCBy'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||' | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy'" | Jul 21, 26 12:38

555

@@qyde8 | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 21, 26 12:38

555

EFSArCBy | Jul 23, 26 03:33

555

EFSArCBy | Jul 23, 26 03:35

555

EFSArCBy | Jul 23, 26 03:35

555

EFSArCBy | Jul 23, 26 03:35

-1 OR 2+931-931-1=0+0+0+1 --

EFSArCBy | Jul 23, 26 03:35

-1 OR 2+653-653-1=0+0+0+1

EFSArCBy | Jul 23, 26 03:35

-1' OR 2+97-97-1=0+0+0+1 --

EFSArCBy | Jul 23, 26 03:35

-1' OR 2+797-797-1=0+0+0+1 or 'bCur8snE'='

EFSArCBy | Jul 23, 26 03:35

-1" OR 2+617-617-1=0+0+0+1 --

EFSArCBy | Jul 23, 26 03:35

555*if(now()=sysdate(),sleep(15),0)

EFSArCBy | Jul 23, 26 03:35

5550'XOR(555*if(now()=sysdate(),sleep(15),0))XOR'Z

EFSArCBy | Jul 23, 26 03:35

5550"XOR(555*if(now()=sysdate(),sleep(15),0))XOR"Z

EFSArCBy | Jul 23, 26 03:35

(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/

EFSArCBy | Jul 23, 26 03:35

555-1; waitfor delay '0:0:15' --

EFSArCBy | Jul 23, 26 03:35

555-1); waitfor delay '0:0:15' --

EFSArCBy | Jul 23, 26 03:35

555-1 waitfor delay '0:0:15' --

EFSArCBy | Jul 23, 26 03:35

555NFMq3UKq'; waitfor delay '0:0:15' --

EFSArCBy | Jul 23, 26 03:35

555-1 OR 713=(SELECT 713 FROM PG_SLEEP(15))--

EFSArCBy | Jul 23, 26 03:35

555-1) OR 510=(SELECT 510 FROM PG_SLEEP(15))--

EFSArCBy | Jul 23, 26 03:35

555-1)) OR 576=(SELECT 576 FROM PG_SLEEP(15))--

EFSArCBy | Jul 23, 26 03:35

555GaZRAWqS' OR 635=(SELECT 635 FROM PG_SLEEP(15))--

EFSArCBy | Jul 23, 26 03:35

555QNnNEs2y') OR 229=(SELECT 229 FROM PG_SLEEP(15))--

EFSArCBy | Jul 23, 26 03:35

555DtVJZNii')) OR 386=(SELECT 386 FROM PG_SLEEP(15))--

EFSArCBy | Jul 23, 26 03:35

555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)

EFSArCBy | Jul 23, 26 03:35

555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'

EFSArCBy | Jul 23, 26 03:35

555

EFSArCBy | Jul 23, 26 03:35

555'"

EFSArCBy | Jul 23, 26 03:35

@@Jenzq

EFSArCBy | Jul 23, 26 03:35

555

EFSArCBy | Jul 23, 26 03:35

555

EFSArCBy | Jul 23, 26 03:35

555

EFSArCBy | Jul 23, 26 03:35

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

-1 OR 2+213-213-1=0+0+0+1 -- | Jul 23, 26 03:36

555

-1 OR 2+686-686-1=0+0+0+1 | Jul 23, 26 03:36

555

-1' OR 2+65-65-1=0+0+0+1 -- | Jul 23, 26 03:36

555

-1' OR 2+359-359-1=0+0+0+1 or 'C9jVFh9W'=' | Jul 23, 26 03:36

555

-1" OR 2+995-995-1=0+0+0+1 -- | Jul 23, 26 03:36

555

if(now()=sysdate(),sleep(15),0) | Jul 23, 26 03:36

555

EFSArCBy0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z | Jul 23, 26 03:36

555

EFSArCBy0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z | Jul 23, 26 03:36

555

EFSArCBy-1 waitfor delay '0:0:15' -- | Jul 23, 26 03:36

555

EFSArCByUvK98Vg6'; waitfor delay '0:0:15' -- | Jul 23, 26 03:36

555

EFSArCByYIyX0dTc' OR 17=(SELECT 17 FROM PG_SLEEP(15))-- | Jul 23, 26 03:36

555

EFSArCBymzMsfaWz') OR 234=(SELECT 234 FROM PG_SLEEP(15))-- | Jul 23, 26 03:36

555

EFSArCByV7hySfcP')) OR 774=(SELECT 774 FROM PG_SLEEP(15))-- | Jul 23, 26 03:36

555

EFSArCBy'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||' | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy'" | Jul 23, 26 03:36

555

@@2YXi1 | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

EFSArCBy | Jul 23, 26 03:36

555

Add comment

Info

Please log in to comment!

Newsletter

Subscribe to my weekly newsletter. One time per week I will send you a short summary of the tutorials I have posted in the past week.