A sleek social media platform for sharing, connecting, and vibing.
Posta lets users drop short text posts, follow others, and engage with content in a slick, dynamic interface. Create, edit, and like posts without clunky page reloads.
- ๐ข Register: New users join the party.
- ๐ Login/Logout: Secure sign-in and sign-out.
- โ๏ธ Create: Authenticated users post from the main or profile page.
- ๐ View All: Paginated feed of everyone's posts.
- โ๏ธ Edit: Tweak your posts dynamically with JS.
- โค๏ธ Like/Unlike: Like or unlike posts with real-time count updates.
- ๐ค Profiles: Show off your posts, followers, and following stats.
- ๐ค Follow/Unfollow: Connect or disconnect from user profiles.
- ๐ฐ Following Feed: Chronological posts from those you follow.
- โก Dynamic Frontend: JavaScript + Fetch API for seamless post creation, editing, liking, and following.
- No page refreshes, just pure flow.
- Models:
- ๐ง
User: ExtendsAbstractUserwith a followers/following system. - ๐
Post: Tracks content, author, timestamp, likes, and likers.
- ๐ง
- Views & URLs:
- Function-based views for HTML rendering (
index,profile,login). - API endpoints (
edit_post,like_post,follow_user) returnJsonResponse.
- Function-based views for HTML rendering (
- Security:
- ๐
@login_requiredlocks down sensitive views. - ๐ก๏ธ
@csrf_exemptfor API endpoints, secured by session checks. - Post edits verify ownership.
- ๐
- Pagination:
- ๐ 10 posts per page for "All Posts", "Following", and profiles.
- ๐จ Templates: Django Templating with
layout.htmlfor consistency. - ๐ Styling: Bootstrap for a clean, responsive look.
- ๐ JavaScript (
network/static/network/index.js):- Handles dynamic actions (edit, like, follow) with the
fetchAPI. - Updates DOM for instant feedback.
- Handles dynamic actions (edit, like, follow) with the
Powering the dynamic frontend with REST-like vibes:
POST /new_post/: Drop a new post.PUT /edit_post/<int:post_id>: Update your post.PUT /like_post/<int:post_id>: Toggle post likes.PUT /follow/<int:user_id>: Toggle follow status.GET /load_posts/<str:filter>: Fetch posts (not primary JS logic).
Built for speed, style, and connection. Postaโs where itโs at.
