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.
These features were not part of the tutorial, but where added by me (which I am very proud of):
- Login
- The navigation bar
- Like and Unlike (including use of Model methods fpr DTL)
- Profile Images
- Dweets can contain images
Everyone is required to login before being able to access the plattform.
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 shows dweets of profiles the user is following, enables the user to like or unlike a dweet as well as post a new dweet.
Dweets can also contain images.
The network includes a page for viewing all 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
)
- 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
- 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
- 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
- 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
- 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
- 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
- [ 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
- [ x ] Step 4: Create a Base Template With Bulma
- [ x ] Create a Base Template
- [ x ] View Your Base Template
- [ x ] Add Bulma CSS to Your Base Template
- [ x ] Step 5: List All User Profiles on the Front End of Your Django App
- [ x ] Write the Routes and Code Logic
- [ x ] Write the Profile List Template
- [ x ] Step 6: Access Individual Profile Pages
- [ x ] Build a Profile Page Template
- [ x ] Link the Profile Pages
- [ x ] Step 7: Follow and Unfollow Other Profiles
- [ x ] Add Buttons to Your Profiles
- [ x ] Handle POST Requests in Django Code Logic
- [ x ] Step 8: Create the Back-End Logic For Dweets
- [ x ] Make the Model
- [ x ] Add Dweets Through the Admin Interface
- [ x ] Step 9: Display Dweets on the Front End
- [ x ] Display Personal Dweets on Each Profile Page
- [ x ] Create a Dashboard View
- [ x ] Step 10: Submit Dweets Using Django Forms
- [ x ] Create a Text Input Form
- [ x ] Render the Form in Your Template
- [ x ] Make Form Submissions Possible
- [ x ] Step 11: Prevent Double Submissions and Handle Errors
- [ x ] Prevent Double Submissions
- [ x ] Handle Submission Errors
- [ x ] Step 12: Improve the Front-End User Experience
- [ x ] Improve the Navigation
- [ x ] Sort the Dweets