Skip to content

Social network "Dwitter" build with Django and styled with Bulma CSS Framework. This project is based on the tutorial on realpython.com

Notifications You must be signed in to change notification settings

MyNameIsCarsten/django-social

Repository files navigation

Social Network build with Django

By following and extending the tutorials on Real Python I have successfully build a social network with Django.

Users are able to post and see their own dweets, as well the dweets of users that they are following.

Users can easily follow and unfollow other users.

The project has strengthened my understanding of relationships between Django models and showed me how to use forms so that users can interact with my app and with each other.

I have additionally used the Bulma CSS framework to make my site look good.

Extended features

These features were not part of the tutorial, but where added by me (which I am very proud of):

Login

Login

Everyone is required to login before being able to access the plattform.

The navigation bar

Nav Bar

The navigation bar allows the user to always return to the dashboard (left), it shows their profile name and avatar and it gives quick access to:

  • Logout
  • Change password
  • Upload File

The Dashboard

Dashboard

The dashboard shows dweets of profiles the user is following, enables the user to like or unlike a dweet as well as post a new dweet.

Like and Unlike

Dweets can also contain images.

Like Unlike

Profiles

The network includes a page for viewing all profiles:

Profiles

The users can also view profiles by clicking on the avatars: (If the current user is accessing their own profile the get the opportunity to Change Avatar)

Profiles

What I have learned

First Tutorial

  • Implement one-to-one and many-to-many relationships between Django models
  • Extend the Django user model with a custom Profile model
  • Customize the Django admin interface

Second Tutorial

  • Integrate Bulma CSS and style your app
  • Use template inheritance to reduce repetition
  • Structure Django templates in a folder hierarchy
  • Build routing and view functions
  • Interlink pages of your app using dynamic URLs

Third Tutorial

  • Create the front-end interface to let users follow and unfollow profiles
  • Submit and handle a POST request in Django using buttons
  • Set up the model for your text-based content
  • Build styled templates to display content on the front end
  • Use intricate model relationships in template code

Fourth Tutorial

  • Create and render Django forms from your Dweet model
  • Prevent double submissions and display helpful error messages
  • Interlink pages of your app using dynamic URLs
  • Refactor a view function
  • Use QuerySet field lookups to filter your data on the back end

I am comfortable with the following concepts:

  • Using object-oriented programming in Python
  • Setting up a basic Django project
  • Managing routing and redirects, view functions, templates, models, and migrations in Django
  • Using and customizing the Django Admin interface
  • Reading and writing HTML with class attributes

In the process of building this project, I’ve learned how to:

  • Build a Django project from start to finish
  • Implement OneToOne and ForeignKey relationships between Django models
  • Extend the Django user model with a custom Profile model
  • Customize the Django admin interface
  • Integrate Bulma CSS to style my app
  • Create the front-end interface to follow and unfollow profiles
  • Submit and handle a POST request in Django using buttons
  • Set up the model for my text-based content
  • Build styled templates to display content on the front end
  • Use intricate model relationships in template code

Tutorial Steps Checklist

Tutorial Part 1

  • [ x ] Step 1: Set Up the Base Project
    • [ x ] Create a virtual environment and install Django
    • [ x ] Create a Django project and app
    • [ x ] Customize the Django admin interface
    • [ x ] Create users for your app
  • [ x ] Step 2: Extend the Django User Model
    • [ x ] Create a Profile Model
    • [ x ] Display Profile Information Within the User Admin Page
  • [ x ] Step 3: Implement a Post-Save Hook
    • [ x ] Coordinate Users and Profiles With a Signal
    • [ x ] Add Functionality Through Error-Driven Development
    • [ x ] Refactor Your Code Using a Decorator
    • [ x ] Confirm the Automatic Association in Your Admin

Tutorial Part 2

Tutorial Part 3

Tutorial Part 4

About

Social network "Dwitter" build with Django and styled with Bulma CSS Framework. This project is based on the tutorial on realpython.com

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published