Example Django App - Social Media NewsFeed

Posted by Chris Bartos on March 2, 2016

This is a very simple example of a News Feed. You have permission to use this, tinker with it, use it as a template in your own apps.

You can find the source here: News Feed Example

Steps to Run Example:

Step 1: Create a virtual environment

I included a “requirements.txt” file that you can use to install all the dependencies for running the app.

NOTE: if you already have Django 1.9+ installed, you can probably skip this step.

Simply run:

$ virtualenv venv
$ source venv/bin/activate
$ cd news_feed
$ pip install -r requirements.txt

Step 2: Run the Django app

I also included a very light weight Sqlite Database. No need to ‘migrate’ anything.

Go into the Django app and run:

$ python manage.py runserver

Step 3: Try out different URLs

There is NO authentication in this system, all you have to do is change the URL to see a different News Feed.

Here are the URLs you can try:

http://localhost:8000/feed/christy/

http://localhost:8000/feed/bob/

http://localhost:8000/feed/dorthy/

There is also an Admin site that you can use to change the data:

http://localhost:8000/admin

To access the admin site:

Username: admin

Password: adminadmin



Django REST Framework Email Course

You'll get 1 lesson everyday for 7 days.
You'll learn:

  • Serializers
  • Request Methods
  • Endpoints
  • Basic Authentication
  • and more...
Powered by ConvertKit

Django REST Framework Documentation got you down? Just want to get SOMETHING working?

You can learn Django REST Framework in ONE week at about 15 - 30 minutes per day (1 lesson per day for the next 7 days).

Click the button below to sign up and start learning Django REST Framework today!

click here to receive the first lesson in minutes!
(once you sign up, you'll get a new lesson everyday for the next 7 days)


Get some value from this post? Please like and share this post because more people also deserve some value. :-)