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

Add model and form to create and edit exhibitors #9128

Open
wants to merge 5 commits into
base: dev-v3
Choose a base branch
from

Conversation

Shivangi-ch
Copy link

Fixes #9111

Short description of what this resolves:

Added model and form to create and edit exhibitors

Changes proposed in this pull request:

  • Added model for Exhibitors inside events app.
  • Added form to create and edit exhibitors in forms.py file

PS - This PR builds on top of work done in PR #9125. Please merge it before merging this PR.

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • The unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All the functions created/modified in this PR contain relevant docstrings.

@Shivangi-ch
Copy link
Author

@hongquan Could you please review this PR

@hongquan
Copy link
Member

Please add only one new migration file per app. Your new "events" app is adding 3 new migrations. It is redundant. Also please format your new code with Ruff.

event_topic_id = models.ForeignKey(EventTopic, on_delete=models.CASCADE, null=True)

def __str__(self):
return self.name
Copy link
Member

Choose a reason for hiding this comment

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

You name field is defined as null=True, so self.name can be None. It is illegal for __str__ (must always be string).

Copy link
Author

Choose a reason for hiding this comment

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

Sorry for the delay. I have added the suggested changes. Pls review.

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.

2 participants