Skip to content

Conversation

@johnnvij
Copy link
Collaborator

@johnnvij johnnvij commented May 5, 2025

ORM models for User and Product with local DB

# Define which pages you want to scrape (you can use "/" for homepage)
pages = ["/"]

# Use the scraper to fetch and parse the pages
results = scraper.scrape(pages)
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