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 for unix uid #41

Merged
merged 4 commits into from
Nov 21, 2024
Merged

Add model for unix uid #41

merged 4 commits into from
Nov 21, 2024

Conversation

SaranjeetKaur
Copy link
Contributor

@SaranjeetKaur SaranjeetKaur commented Nov 21, 2024

Description

This pull request introduces a new model called UnixUID to the imperial_coldfront_plugin application. The UnixUID model is designed to map a user to a unique identifier. The changes include the creation of a migration file and the addition of the new model to the existing models file.

Fixes #32

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • The documentation builds and looks OK (eg. python -m sphinx -b html docs docs/build)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

@SaranjeetKaur
Copy link
Contributor Author

SaranjeetKaur commented Nov 21, 2024

The steps that I have followed so far:

  • Added the UnixUID model to models.py
  • Then run python makemigrations.py (since, here it is equivalent to python manage.py makemigrations)
  • Then run pre-commit run --all-files to make sure all checks pass
  • All ok when running pytest too

Questions:

  1. The Django tutorial mentions 3 steps for making model changes:

    • Change your models (in models.py).
    • Run python manage.py makemigrations to create migrations for those changes.
    • Run python manage.py migrate to apply those changes to the database.

    I am not sure how to run the third step in the absence of a manage.py file

  2. How to deploy and view the changes to the app?

Copy link
Collaborator

@cc-a cc-a left a comment

Choose a reason for hiding this comment

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

Very nice. Just a couple of small tweaks.

imperial_coldfront_plugin/models.py Outdated Show resolved Hide resolved
imperial_coldfront_plugin/models.py Outdated Show resolved Hide resolved
@cc-a cc-a merged commit 51e46ff into main Nov 21, 2024
3 checks passed
@cc-a cc-a deleted the uxid branch November 21, 2024 16:08
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.

Add model for unix uid data
2 participants