Closed 01darshants closed 1 month ago
This pull request implements changes to improve the review submission process and update the UI accordingly. The main changes include modifying the get_reviews
function to optionally render a page, updating the SubmitResponse
class to render the index template with updated context, and adjusting the client-side JavaScript to handle the review submission process more effectively.
sequenceDiagram
participant Client
participant Server
participant Database
Client->>Server: POST /submit_review
Server->>Database: Save new review
Server->>Database: Update summary
Server->>Server: Generate updated context
Server->>Client: Render index.html with updated context
Client->>Client: Reset form fields
Client->>Client: Display success message
Change | Details | Files |
---|---|---|
Modified get_reviews function to support optional page rendering |
|
SentimentAnalysis/analysis/views.py |
Updated SubmitResponse class to render index template |
|
SentimentAnalysis/analysis/views.py |
Improved client-side review submission process |
|
SentimentAnalysis/analysis/templates/index.html |
Added new imports in views.py |
|
SentimentAnalysis/analysis/views.py |
Summary by Sourcery
Refactor the 'SubmitResponse' class to use Django's 'View' instead of 'APIView', enhance error handling in the JavaScript code for review submission, and fix the handling of the 'renderpage' parameter in the 'get_reviews' function.
Bug Fixes:
Enhancements: