-
Notifications
You must be signed in to change notification settings - Fork 0
Cleanup personal #130
Merged
Cleanup personal #130
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In 50dd4a6 ("contactlist: Add selector for Position and Special Function") we remove the only user of this method. Remove dead code.
Fix table header for groups Fixes ef3b68f ("Multiple positions per contact")
Create migrations with ./manage.py makemigrations Note, that the new migration doesn't actually change the database scheme: buczek@theinternet:~/git/mpicms (progress)$ ./manage.py sqlmigrate personal 0028 DEBUG 2025-02-08 20:08:42,206 asyncio Using selector: EpollSelector BEGIN; -- -- Change Meta options on group -- -- -- Change Meta options on position -- -- -- Change Meta options on specialfunction -- -- -- Change Meta options on status -- COMMIT;
We want to split responsibilities for defining positions and assigning contacts to position. Therefore we no longer want the positions inline panel in the contact model admin. Make positions into a simple ManyToMany field. Add sql code to autogenerated migration to transfer data from the old through table "personal_contactpositions" to the new one ("personal_contact_positions"). Adapt queries.
We want to reference Group from Contact in the following commit, so move the class in the source file.
We want to split responsibilities for defining groups and assigning groups to position. Therefore we no longer want thegroupspositions inline panel in the contact model admin. Make groups into a simple ManyToMany field. Add sql code to autogenerated migration to transfer data from the old through table "personal_contactgroups" to the new one ("personal_contact_groups"). Adapt queries.
We no longer need modelcluster for Groups and Contact, as they are edited seperately. Downgrade base class from modelcluster.models.ClusterableModel to django.db.models.Model
Fixes 50dd4a6 ("contactlist: Add selector for Position and Special Function")
Use FieldsPanels inside a single MutiFieldPanel, because this is a bit compacter. Rearrange order. Intentionally skip "status" for now as the usage is not yet clear and no choices are defined.
Only Contact is used as snippet, but not Positon or Group, so remove the @register_snippet decorator.
Change default string representation from "Dr. Henry Jeckyl" to "Jekyll, Henry". Add property method "name" to return the same representation. Add property name_and_title to return name with title(s) included ("Jekyll, Dr. Henry, PhD MD")
Save vertical space by combining names and titles into one column.
Remove title column from Contact admin list view and rearrange the other columns.
Sign in
to join this conversation on GitHub.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cleanup personal.models: