Skip to content

ORM created now#48

Open
johnnvij wants to merge 10 commits intoevuventures:primaryfrom
James-Cheaper:orm_setup
Open

ORM created now#48
johnnvij wants to merge 10 commits intoevuventures:primaryfrom
James-Cheaper:orm_setup

Conversation

@johnnvij
Copy link
Collaborator

@johnnvij johnnvij commented May 5, 2025

ORM models for User and Product with local DB

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: The line results = CheaperScraper.scraper.scrape(pages) incorrectly attempts to access scraper as a class variable.

Suggestion: results = scraper.scrape(pages) already correctly invokes the instance method.

class UserAccount(models.Model):
email = models.EmailField(max_length=50, unique=True)
password = models.CharField(max_length=100)
password_hash = models.CharField(max_length=100, default='defaultpass123') # added default
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concern: Using a default plaintext password ('defaultpass123') is insecure.

Suggestion: Avoid setting a default password, especially one that’s hardcoded and predictable. If necessary for testing, override it in fixtures or during test setup instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments