Skip to content

Update scripts used to populate new database. #132

@garg3133

Description

@garg3133

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions