GithubHelp home page GithubHelp logo

ayushma00 / django-social-network-app Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 47 KB

A social network app to make post, edit, like (Twitter clone)

Home Page: https://youtu.be/b-GK5WOyRqs

Python 57.76% JavaScript 20.60% CSS 0.43% HTML 21.20%
ajax database-modeling django-rest-framework pagination user-authentication-and-activation

django-social-network-app's Introduction

Social Network

This repository contains the implementation of a social network using Django, Python, JavaScript, HTML, and CSS. The network application allows users to make posts, follow other users, and interact with posts by liking them. Below is a guide to understanding the structure of the project and its functionality.

Demo Video

A demo video showcasing the functionality of the social network application can be found here.

Project Structure

  • django-social-network-app This directory contains the Django project named "project4."
    • network: Django app for the social network.
      • migrations: Directory for database migrations.
      • templates/network: HTML templates for the application.
      • static/network: Static files such as JavaScript and CSS.
      • urls.py: URL configuration for the app.
      • views.py: Views associated with each route.
      • models.py: Definition of database models.
      • forms.py: Forms for user interaction.

Running the Application

  1. Clone the repository to your local machine.
  2. Navigate to the django-social-network-app directory.
  3. Run python manage.py runserver to start the Django web server.
  4. Visit the website in your browser to access the application.

Functionality Overview

  • New Post: Users can create new text-based posts by filling in text into a text area and submitting the post.
  • All Posts: The "All Posts" page displays all posts from all users, with the most recent posts first. Each post includes the username of the poster, post content, post timestamp, and the number of likes.
  • Profile Page: Clicking on a username loads the user's profile page, displaying the number of followers and following users, along with all posts in reverse chronological order. Users can follow or unfollow other users from this page.
  • Following: The "Following" page displays posts made by users that the current user follows. Similar to the "All Posts" page but with a limited set of posts.
  • Pagination: Posts are paginated, with 10 posts per page. Pagination links allow users to navigate between pages.
  • Edit Post: Users can edit their own posts by clicking an "Edit" button/link on the post. Post content is replaced with a textarea for editing, and changes are saved asynchronously without reloading the entire page.
  • Like and Unlike: Users can toggle whether they like a post. Like counts are updated asynchronously without page reload.

Additional Notes

  • Modifications to the network/models.py file are necessary for defining models and database interactions.
  • Bootstrap's Pagination features can be utilized for displaying pagination links in HTML.
  • JavaScript's fetch function is used for asynchronous communication with the server for actions like editing posts and updating likes.

django-social-network-app's People

Contributors

ayushma00 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.