Implement product_csr app #74
Open
kajal-082 wants to merge 19 commits into
Open
Conversation
| db="product_db", | ||
| host="localhost", | ||
| port=27017, | ||
| ) No newline at end of file |
There was a problem hiding this comment.
MongoDB connect ignores configured environment variables
High Severity
MONGO_USER, MONGO_PASS, MONGO_PORT, and MONGO_HOST are defined from environment variables but never used. The connect() call hardcodes host="localhost" and port=27017, while docker-compose exposes port 27019 and requires authentication. The app will fail to connect to MongoDB in any standard deployment.
Additional Locations (1)
Member
|
We can remove node modules from the PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Note
Medium Risk
Adds new HTTP endpoints plus MongoEngine persistence and seed tooling, and changes runtime configuration (dotenv, MongoDB container creds, DB setup), which can affect local/prod deployment behavior. Risk is moderate due to new data paths and hard-coded Mongo connection settings.
Overview
Introduces two new Django apps:
product(in-memory CRUD endpoints under/product/products/...) andproduct_csr(MongoDB-backed product/category API under/product-csr/..., including filtering, category assignment, and CSV bulk upload).Updates Django configuration to load env vars, register the new apps, wire new URL routes, and connect via
mongoengine, and adjusts the devdocker-compose.yamlMongo image/version and root credentials. Adds seed utilities and a management command forproduct_csr, along with unit and integration tests covering service validation and API behavior.Written by Cursor Bugbot for commit 8ef7341. Configure here.