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

Django 4 support: Option 5, migrating to django-filter (v2) #492

Merged
merged 9 commits into from
May 21, 2024

Commits on Dec 5, 2023

  1. Fixes unioslo#487 by implementing option 5 in the issue.

    Supports: python3.7+, django 3.2+. Tests included for this range.
    Breaking changes: None
    
    This implementation uses django-filter as intended. It sets a default filter backend and uses standard filter_class models where possible.
    
    Exceptions take place in the following views:
    
    HostList. Relies on manipulating the queryset, and said manipulation is also used in the filter-less HostDetail.
    *Zone*List. The abstraction model for these views is based around propagating a filterset into the parent class.
    Concerns:
    
    This patch creates explicit mapping filters for JSONField and CIDRField. It is unclear how well-tested these are.
    terjekv authored and Terje Kvernes committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    46a17e6 View commit details
    Browse the repository at this point in the history
  2. Update pyproject.toml fix package building (for tox)

      - Required as we intriduced the toml file for ruff.
      - Sets some default keys.
      - Make tox.ini use the lint and coverage environments.
      - Make tox runs that use pythons and django show versions for both.
    terjekv authored and Terje Kvernes committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    aa9c83d View commit details
    Browse the repository at this point in the history
  3. A few cleanup fixes.

      - Uses filterset_class correctly.
      - Applies the filter via MregMixin.
      - Test basic filtering in hostgroups.
    terjekv authored and Terje Kvernes committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    3d2a97f View commit details
    Browse the repository at this point in the history
  4. Hack support CI-fields.

      - Requires manual lookup declarations.
      - See unioslo#489 (comment)
    terjekv authored and Terje Kvernes committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    c3a469e View commit details
    Browse the repository at this point in the history
  5. Rebase to master, clean up imports a bit.

    terjekv authored and Terje Kvernes committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    e6ed647 View commit details
    Browse the repository at this point in the history
  6. Cleanup after rebase.

    terjekv authored and Terje Kvernes committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    454a07b View commit details
    Browse the repository at this point in the history
  7. Remove unused variable.

    terjekv authored and Terje Kvernes committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    bd4fe41 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

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

Commits on May 16, 2024

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