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

Feat : Added populate.py to populate dummy data for the db #138

Merged
merged 10 commits into from
May 21, 2024

Conversation

Priyansh61
Copy link
Member

Fixes Issue : #132

Description of PR :

PR adds python3 manage.py populate command to the application, this way the user can add all the dummy data in the server using a single command.

Avoided use of python3 manage.py shell > add_xy.py since this was causing some import statements conflict. And this way we DJango Command Manager to efficiently handle the populate command without any issue.

@Priyansh61 Priyansh61 requested a review from garg3133 February 3, 2024 18:00
Copy link
Member

@garg3133 garg3133 left a comment

Choose a reason for hiding this comment

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

Good work! A few points apart from reviews below:

  • I think the command should be moved to the main app (AlumniConnect) as the command is not related to any specific application but a global command.
  • It was throwing error on the first run and needed defusedxml package to be updated. Please do pip freeze > requirements.txt to update all the required dependencies.

applications/adminportal/management/commands/populate.py Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
scripts/add_batch.py Outdated Show resolved Hide resolved
scripts/add_data.py Outdated Show resolved Hide resolved
scripts/add_batch.py Outdated Show resolved Hide resolved
scripts/add_data.py Outdated Show resolved Hide resolved
@Priyansh61 Priyansh61 requested a review from garg3133 February 17, 2024 07:42
Copy link
Member

@garg3133 garg3133 left a comment

Choose a reason for hiding this comment

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

xlrd should also be removed from the requirement.txt, but otherwise looks good!

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