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

Update scripts used to populate new database. #132

Open
garg3133 opened this issue Jan 16, 2024 · 0 comments
Open

Update scripts used to populate new database. #132

garg3133 opened this issue Jan 16, 2024 · 0 comments

Comments

@garg3133
Copy link
Member

There are a bunch of scripts in the scripts/ directory of the project which can be used to populate the initial data when setting up this project by running python3 manage.py shell < scripts/add_batch.py command (for example).

However, these scripts are stored in many files, which can be confusing to users as to which scripts to run and in what order. Also, the add_data.py script is not working right now and the user data in acc.xlsx is also old and very few.

So, we need to do the following:

  • Create a parent script named populate.py, which is the only script the user would need to run while populating the database. Inside this script, import the function from other individual scripts and run them (in the order they should be run).
  • Update acc.xlsx file to include some more dummy data, and add_data.py file to be able to use the Excel file and populate the data into the database.

Out of all the scripts currently present in the scripts/ directory, add_batch.py and add_data.py are the only two important scripts. And the logic for creating profile.reg_no should be included in the add_data.py file only.

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

No branches or pull requests

1 participant