Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #41

Closed
wants to merge 2 commits into from
Closed

Dev #41

wants to merge 2 commits into from

Conversation

bartczak-pa
Copy link
Owner

@bartczak-pa bartczak-pa commented Sep 3, 2024

Summary by Sourcery

Add a new Technology model to the portfolio app and enhance the Hobby model by specifying the return type for its string representation method.

New Features:

  • Introduce a new Technology model with a unique name field and a string representation method.

Enhancements:

  • Enhance the Hobby model by specifying the return type of the string representation method.

Copy link
Contributor

sourcery-ai bot commented Sep 3, 2024

Reviewer's Guide by Sourcery

This pull request introduces a new model called Technology and updates the str method of the existing Hobby model. The changes are focused on enhancing the portfolio application's data structure.

File-Level Changes

Change Details Files
Added a new Technology model
  • Created a Technology class that inherits from models.Model
  • Added a 'name' field as a CharField with max_length of 50 and unique=True
  • Set the verbose_name_plural to 'Technologies' in the Meta class
  • Implemented a str method that returns the name of the technology
bartczak_tech/portfolio/models.py
Updated the Hobby model's str method
  • Added a return type annotation (-> str) to the str method
bartczak_tech/portfolio/models.py

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @bartczak-pa - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

bartczak_tech/portfolio/models.py Show resolved Hide resolved
class Technology(models.Model):
name = models.CharField(max_length=50, unique=True)

class Meta:
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Consider adding an ordering option in the Meta class

Adding an ordering option (e.g., ordering = ['name']) could be helpful for consistently displaying technologies in alphabetical order without additional sorting in views or templates.

    class Meta:
        verbose_name_plural = "Technologies"
        ordering = ['name']

@bartczak-pa
Copy link
Owner Author

Closed - Missing migrations

@bartczak-pa bartczak-pa closed this Sep 3, 2024
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.

1 participant