Skip to content

Cleanup personal #130

Merged
merged 19 commits into from
Feb 9, 2025
Merged

Cleanup personal #130

merged 19 commits into from
Feb 9, 2025

Commits on Feb 7, 2025

  1. Configuration menu
    Copy the full SHA
    e7cfdaa View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2025

  1. personal: Remove Group.members method

    In 50dd4a6 ("contactlist: Add selector
    for Position and Special Function") we remove the only user of this
    method. Remove dead code.
    donald committed Feb 8, 2025
    Configuration menu
    Copy the full SHA
    f1c9406 View commit details
    Browse the repository at this point in the history
  2. personal: Fix Contact admin table head

    Fix table header for groups
    
    Fixes ef3b68f ("Multiple positions per
    contact")
    donald committed Feb 8, 2025
    Configuration menu
    Copy the full SHA
    5c01a7f View commit details
    Browse the repository at this point in the history
  3. Make migrations

    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;
    donald committed Feb 8, 2025
    Configuration menu
    Copy the full SHA
    578096e View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2025

  1. personal: Change positions to ManyToManyField

    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.
    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    f43cb59 View commit details
    Browse the repository at this point in the history
  2. personal: Move Group class definition before Contact

    We want to reference Group from Contact in the following commit, so move
    the class in the source file.
    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    108adbb View commit details
    Browse the repository at this point in the history
  3. personal: Change groups to ManyToManyField

    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.
    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    14a1c79 View commit details
    Browse the repository at this point in the history
  4. personal: Downgrade from ClusterableModel to Model

    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
    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    4eaae09 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2fbd052 View commit details
    Browse the repository at this point in the history
  6. personal.views: Remove unnecessary semicolon

    Fixes 50dd4a6 ("contactlist: Add
    selector for Position and Special Function")
    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    6a957c5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ac2eca9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    768a10b View commit details
    Browse the repository at this point in the history
  9. Make migrations

    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    de599d8 View commit details
    Browse the repository at this point in the history
  10. personal: Rearrange Contact Model Admin

    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.
    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    3142661 View commit details
    Browse the repository at this point in the history
  11. personal: Remove @register_snppet decorator From Position, Group

    Only Contact is used as snippet, but not Positon or Group, so remove
    the @register_snippet decorator.
    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    0a502c0 View commit details
    Browse the repository at this point in the history
  12. personal: Add Contact string represeantation

    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")
    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    148f103 View commit details
    Browse the repository at this point in the history
  13. contactlist: Use name_and_title

    Save vertical space by combining names and titles into one column.
    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    9b17dc6 View commit details
    Browse the repository at this point in the history
  14. personal: Remove columns from Contact list view

    Remove title column from Contact admin list view and rearrange the other
    columns.
    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    865d18c View commit details
    Browse the repository at this point in the history
  15. Update translations

    donald committed Feb 9, 2025
    Configuration menu
    Copy the full SHA
    80e672a View commit details
    Browse the repository at this point in the history