Skip to content

Instantly share code, notes, and snippets.

@cbronazc
Last active August 29, 2015 14:13
Show Gist options
  • Save cbronazc/ad7835964642eecafe79 to your computer and use it in GitHub Desktop.
Save cbronazc/ad7835964642eecafe79 to your computer and use it in GitHub Desktop.
Django Twitter Clone

Django twitter clone - DTC

Build an app that:

  • Allows anyone to go to the home page
  • Has a login button on the home page
  • Allows a user to login with a username and password
    • This shouldn't be http basicauth, it should allow multiple users to login with different credentials.
    • Password should be encrypted in some way, no plain text
  • Has a form to create a post which displays to logged in users only, that has the following two fields:
    • message (text field). Example: A picture of my dog
    • flickr image id (text field). Example: 5151806026
  • All posts are displayed on the home page for everyone to see. Each post has:
    • the post message
    • The photo
      • Use the flickr api to get the image source url, you will need to make your own api key
      • Any size is ok, Medium-640 is a good one
    • the username
    • the timestamp
  • The home page should also support json requests (aka, build an api)
    • /home or /home.html shows the html version and home.json shows the json version
    • The json request should return a list of all posts, each having the same 4 things that the html page does
  • Has instructions in the readme.md about how to build the app
    • virtualenv, requirements.txt, db commands, run commands etc...

Notes:

  • The database can be mysql, postgresql, or sqlite
  • Design is mostly optional, but it should have some form of styling so it doesn't look like its 1995. Nothin fancy needed.
  • Must use django framework, you can use any other packages you like besides that. If you do, include a requirements.txt file.

When you are done, send us a link to the github repo.

@rsubra13
Copy link

Hi Caleb,
I have got a query. Please clarify on this.

Can I assume the logged in user knows his Flickr ID and he enters it while creating the 'tweet' (So that the same ID can be used in the Flickr API to retrieve the images)?

@cbronazc
Copy link
Author

Yes, for example they would just enter: 5151806026. Thats a valid photo id. 16676365400 is another one.

@rsubra13
Copy link

Great, Thanks Caleb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment