Conversation
Added a full user authentication system (login, registration, logout) to allow friends to maintain their own personal rankings on a hosted instance. - Added `users` table to `models.py` and linked items to a `user_id` foreign key. - Implemented robust database migration to gracefully handle existing data, assigning them to a "default_user" (password: "password") to prevent data loss. - Created `login.html` and `register.html` templates and updated `base.html` navigation with a user dropdown. - Scoped all ranking operations and database queries to the currently logged-in user's ID. - Added a `login_required` decorator for protecting views and API endpoints. - Updated the README with comprehensive instructions for free hosting on PythonAnywhere. Co-authored-by: NSC508 <46616024+NSC508@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR implements a robust user authentication system, allowing multiple users to maintain their own personal multi-media rankings on a single hosted instance of Geli.
Key Changes:
userstable and linked allitemsto a specificuser_id. Included an automatic migration script that safely transitions existing single-user data to adefault_user(username:default_user, password:password)./login,/register, and/logoutroutes. Passwords are securely hashed usingwerkzeug.security.@login_requireddecorator that protects personal ranking pages and returns appropriate401 Unauthorizedresponses for API calls if a session expires.README.mdfor deploying the multi-user app for free on PythonAnywhere.PR created automatically by Jules for task 17959128693190551621 started by @NSC508