Commit graph

98 commits

Author SHA1 Message Date
aff9a4cfa7 Fixes: 1) Correct expected_parameters method to use precise query parameter naming with field_path and target_field. 2025-07-01 18:22:02 +03:00
5926ceb8bf Features: 1) Add missing call to super().__init__() in admin field constructor;
Fixes: 1) Correct use of `remote` to `remote_opts` for consistent model metadata reference;

Extra: 1) Improve formatting for better code readability.
2025-07-01 18:16:02 +03:00
83ac6b27e6 Features: 1) Add data-lookup-kwarg to autocomplete input for better filtering; 2) Streamline admin autocomplete URL structure for consistency;
Fixes: 1) Replace outdated jQuery UI paths with modern equivalents; 2) Ensure proper retrieval of JSON responses in autocomplete widget; 3) Correct misaligned parameter initialization in `AdminFilter`;

Extra: Minor formatting improvements and variable renaming for readability.
2025-07-01 18:12:50 +03:00
90c8f87502 Features: 1) Update URL generation logic in admin autocomplete to use _meta for app and model names;
Fixes: 1) Ensure default value for `lookup_val` is an empty string if not provided; 2) Correct `field_name` parameter in the autocomplete URL to use `field_path`;

Extra: 1) Minor cleanup by removing redundant variable declarations.
2025-07-01 18:01:20 +03:00
c5397c6608 Features: 1) Add RelatedAutocompleteFilter for admin filters with autocomplete support; 2) Introduce autocomplete_list_filter.html template for the new filter; 3) Enable dynamic filtering with client-side autocomplete functionality;
Fixes: 1) Add missing imports for `FieldListFilter` and `reverse` in `core/admin.py`;

Extra: 1) Include relevant JS and CSS assets for autocomplete functionality; 2) Add comments and structure for better readability in template and script.
2025-07-01 17:55:24 +03:00
a63aa0371a Features: 1) Remove custom AjaxAutocompleteListFilter and its related widget/templates to streamline admin functionality; 2) Simplify ProductAdmin by using default ModelAdmin.
Fixes: 1) Remove unnecessary imports related to the deleted functionality.

Extra: 1) Extensive cleanup to remove redundant code and references; 2) Minor formatting adjustments for improved readability.
2025-07-01 17:44:20 +03:00
9a31be98ad Fixes: 1) Corrected template path in AjaxAutocompleteListFilter.
Extra: Removed redundant `core/` prefix in the template path.
2025-07-01 17:38:16 +03:00
ac95048488 Fixes: 1) Update incorrect template path in AjaxAutocompleteListFilter. 2025-07-01 17:33:22 +03:00
4102ef990f Features: 1) Simplified paths for autocomplete list filter templates, scripts, and styles;
Fixes: 1) Correct file paths for JavaScript and CSS dependencies in admin filter components;

Extra: Streamlined template and asset references for better maintainability;
2025-07-01 17:29:17 +03:00
a5dea07062 Features: 1) Update template, CSS, and JS paths for autocomplete list filter component;
Fixes: 1) None;

Extra: 1) Adjust references from `djaa_list_filter` to `core/admin` directory for consistency;
2025-07-01 17:20:53 +03:00
1024760c15 Features: 1) Add autocomplete_list_filter support in Admin classes; 2) Introduce SkipVariableDoesNotExistFilter to suppress specific log warnings.
Fixes: 1) Clean up unused imports in `filters.py`.

Extra: 1) Apply consistent string quoting across `admin.py` for formatting standardization; 2) Update logging configuration for `django.template` with new filter.
2025-07-01 16:41:20 +03:00
c5fe0cb6c6 Features: 1) Add AjaxAutocompleteListFilter to enable autocomplete functionality for admin list filters; 2) Introduce AjaxAutocompleteSelectWidget for enhanced UI integration; 3) Update ProductAdmin to use new autocomplete list filter; 4) Add template and styles for AutocompleteListFilter.
Fixes: None;

Extra: Add supporting JS and CSS for autocomplete list filter functionality.
2025-07-01 16:28:07 +03:00
455c3d71b3 Revert "Features: 1) Add django-admin-autocomplete-list-filter dependency to manage autocomplete functionality in admin list filters; 2) Enable autocomplete_list_filter for ProductAdmin with fields category, author, and tags."
This reverts commit 283c3232cc.
2025-07-01 16:18:39 +03:00
283c3232cc Features: 1) Add django-admin-autocomplete-list-filter dependency to manage autocomplete functionality in admin list filters; 2) Enable autocomplete_list_filter for ProductAdmin with fields category, author, and tags.
Fixes: None;

Extra: 1) Update `poetry.lock` with `django-admin-autocomplete-list-filter` details; 2) Register `djaa_list_filter` in installed apps.
2025-07-01 16:02:03 +03:00
8fe572ac1f Fixes: 1) Remove duplicate "partnumber" field from admin display list;
Extra: None;
2025-07-01 15:58:16 +03:00
43277bb30a Fixes: 1) Remove duplicate "partnumber" from core admin field list;
Extra: None;
2025-07-01 15:58:01 +03:00
e846426a85 Features: 1) Add "stocks__vendor" to list_filter in CategoryAdmin;
Fixes: None;

Extra: 1) Reorder mixins in `CategoryAdmin` class for consistency;
2025-07-01 15:57:39 +03:00
d008d9dd0f Features: 1) Remove custom BaseAutocompleteFilter and related admin filters to streamline list filtering; 2) Simplify ProductAdmin by eliminating unused autocomplete mixin and filters;
Fixes: 1) Remove unused imports from `core/admin.py`;

Extra: 1) Delete redundant `autocomplete_filter.html` template and associated filter classes for cleanup; 2) Minor refactoring of `ProductAdmin` class in alignment with the removal of filters.
2025-07-01 15:43:45 +03:00
c3d5160e61 Features: 1) Add BaseAutocompleteFilter and specialized filters (BrandAdminFilter, CategoryAdminFilter, TagsAdminFilter, VendorAdminFilter) for admin filtering;
Fixes: 1) Replace hardcoded `AutocompleteListFilter` with newly created filters for better modularity;

Extra: 1) Refactor queryset string handling and enhance readability in filter choices; 2) Update admin `list_filter` with new filter classes.
2025-07-01 15:20:46 +03:00
76c700c3a0 Fixes: 1) Add missing import for AutocompleteListFilter from local filters module;
Extra: Removed unused import for `AutocompleteListFilter` from external library.
2025-07-01 15:15:00 +03:00
d0b4706c16 Features: 1) Implement AutocompleteListFilter class enhancing admin filter customization; 2) Add AutocompleteFilterMixin for simplified admin filter inclusion functionality;
Fixes: 1) Remove unused `django-autocompletefilter` package and adjust imports; 2) Clean up related settings and dependency references;

Extra: Minor formatting adjustments in `payments/admin.py`.
2025-07-01 15:06:32 +03:00
86406ac169 Features: 1) Add django-autocompletefilter==0.0.9 and implement in ProductAdmin for improved list filters; 2) Replace dalf with autocompletefilter across project dependencies and admin logic; 3) Update related dependencies including ipython==9.4.0 and drf-spectacular-sidecar==2025.7.1;
Fixes: 1) Remove deprecated `dalf` package from dependencies and configurations;

Extra: Update `poetry.lock` file and related hashes to reflect changes;
2025-07-01 14:50:05 +03:00
f9620ed339 Features: 1) Integrate DALFModelAdmin into ProductAdmin for enhanced admin functionality;
Fixes: 1) Remove unused `get_select2_language` import and `media` property logic from `ProductAdmin`;

Extra: 1) Cleanup redundant imports; 2) Code formatting improvements for readability.
2025-07-01 14:16:57 +03:00
ab33a7b0c8 Features: 1) Add dynamic inclusion of autocomplete.js and corresponding i18n language script to admin media files.
Fixes: 1) None.

Extra: 1) Refactor `media` property structure for improved readability and maintainability.
2025-07-01 14:08:23 +03:00
9ababbcfa2 Features: 1) Add custom media property to ProductAdmin for enhanced select2 functionality and styling;
Fixes: 1) Replace `DALFModelAdmin` with `ModelAdmin` in `ProductAdmin` class; 2) Remove invalid use of `DALFChoicesField` for `list_filter` in `ProductAdmin`;

Extra: 1) Add missing import for `forms` and `get_select2_language`; 2) General cleanup and refactoring of `ProductAdmin` class.
2025-07-01 14:00:54 +03:00
9cb62295b2 Fixes: 1) Fix import ordering in core/admin.py;
Extra: Align imports with PEP8 guidelines for better readability and organization;
2025-07-01 13:50:04 +03:00
4b67aae05c Features: 1) Add DALFChoicesField to admin imports; 2) Enhance list_filter with DALFChoicesField for multiple fields;
Fixes: 1) None;

Extra: 1) Refactor `list_filter` for improved consistency.
2025-07-01 13:49:48 +03:00
19c0ca377a Features: 1) Add ActivationActionsMixin functionality to admin classes for streamlined activation/deactivation actions; 2) Utilize @register decorator for model admin classes across apps for cleaner registration.
Fixes: 1) Correct use of `@action` decorator within `ActivationActionsMixin` for defining admin actions; 2) Remove unused `BasicModelAdmin` inheritance from multiple admin classes.

Extra: Refactor and simplify admin imports and site registration for better readability and maintainability.
2025-07-01 13:43:14 +03:00
9e2bf380dd Features: 1) Introduced ActivationActionsMixin to centralize activation-related admin actions; 2) Integrated DALFModelAdmin for enhanced admin functionality in ProductAdmin.
Fixes: 1) Removed unused imports to reduce clutter; 2) Simplified media property in `ProductAdmin` by removing unnecessary customization logic.

Extra: Refactored all admin model classes to utilize `ActivationActionsMixin` for consistency and maintainability.
2025-07-01 13:37:50 +03:00
1edec85c3a Features: 1) None;
Fixes: 1) Correct handling of the Select2 i18n file path in admin media to prevent issues with optional language files;

Extra: 1) Minor refactoring to streamline JavaScript file list construction.
2025-07-01 12:54:50 +03:00
a98b81d284 Features: 1) None;
Fixes: 1) Update paths for JavaScript assets to remove redundant `admin/js/vendor` prefix;

Extra: 1) Simplify file list construction by adjusting paths for consistency.
2025-07-01 12:53:42 +03:00
4411f6144d Features: 1) Add conditional handling for both request and obj in get_fieldsets; 2) Dynamically include language-specific Select2 file based on settings configuration;
Fixes: 1) Add missing `settings` import in `admin.py` to avoid potential errors;

Extra: 1) Refactor JavaScript file inclusion logic for enhanced clarity and maintainability; 2) Add inline comment to suppress unresolved reference warnings; 3) Update variable naming for consistency and readability.
2025-07-01 12:47:26 +03:00
c7d8fcbe03 Features: 1) Add new sitemap path for detailed section with pagination.
Fixes: 1) Replace `DALFRelatedFieldAjax` with `DALFRelatedOnlyField` for vendor stock field.

Extra: 1) Minor formatting adjustments in `api_urls.py` for readability.
2025-07-01 00:16:08 +03:00
1e2b64514b Features: 1) Update admin fields for tags and stocks__vendor to use DALFRelatedFieldAjax;
Fixes: 1) Resolve inconsistency by replacing `DALFRelatedOnlyField` with `DALFRelatedFieldAjax`;

Extra: Clean up admin field definitions to align with the latest field usage.
2025-06-30 17:15:53 +03:00
ef42a7dbe7 Features: 1) Add media property in ProductAdmin to include custom Select2 JS and CSS integration for improved admin interface;
Fixes: 1) Correct list_filter fields for brand and category in ProductAdmin to use proper lookup names;

Extra: 1) Add missing import for forms and get_select2_language from
2025-06-30 17:13:02 +03:00
027c001d25 Fixes: 1) Correct list filter fields to use brand__name and category__name for accurate filtering;
Extra: None;
2025-06-30 17:06:44 +03:00
9591494fee Features: 1) Add "dalf" package to dependencies for enhancing Django admin list_filter capabilities; 2) Update "notebook" package to version 7.4.4 and adjust its dependencies; 3) Integrate "dalf" filters in admin list_filter configuration;
Fixes: 1) Correct admin list_filter configurations with appropriate DALF fields;

Extra: 1) Update PyCharm project settings to use Google-style docstrings.
2025-06-30 16:59:32 +03:00
e932d81572 Features: 1) Add management command to delete products with no associated order in batches.
Fixes: 1) Remove duplicate field 'is_active' in ProductAdmin.general_fields.

Extra: 1) Add transaction management for batch deletions; 2) Improve command output with success message.
2025-06-29 22:07:59 +03:00
eb68132dd3 Features: 1) None;
Fixes: 1) Correct formatting of multi-line expressions for better readability; 2) Ensure consistent use of single-line expressions where appropriate; 3) Fix minor spacing issues in text fields; 4) Adjust admin model field `general_fields` to include `priority`;

Extra: Refactored several multi-line statements to improve consistency and code style.
2025-06-29 19:08:17 +03:00
d3dbbcb242 Features: 1) Update Russian translation for "balances" in payments/locale/ru_RU/LC_MESSAGES/django.po; 2) Enable UI builder in Jazzmin settings; 3) Add "uuid" to readonly_fields in both blog/admin.py and core/admin.py;
Fixes: 1) Correct Russian translation for "balances" in locale files; 2) Fix mismatch in Jazzmin `site_brand` configuration to use project name;

Extra: Refactor locale files, add missing translation updates, and adjust formatting;
2025-06-29 18:50:33 +03:00
97785b29db Features: 1) Add multilingual title and content fields to the Post model in blog; 2) Introduce translation registration for Post in a new blog/translation.py; 3) Enhance PostAdmin with mixins and readonly slug.
Fixes: 1) Fix shebangs in Docker entry-point scripts to use `/usr/bin/bash`.

Extra: 1) Refactor slug fields in `core` migrations for `Brand`, `Category`, and `Product`; 2) Cleanup and simplify admin code in `core/admin.py`.
2025-06-29 16:14:59 +03:00
426af1ad2c Features: 1) Update admin icons for better visual representation ("order products" and "children").
Fixes: None;

Extra: 1) Normalize code formatting in `vibes_auth` manager methods for consistency; 2) Clean redundant indentation and comments in methods.
2025-06-26 13:10:56 +03:00
e6d59f053c Features: 1) Add is_active field to general_fields across all admin configurations; 2) Modify method definitions in BasicModelAdmin to utilize request parameter;
Fixes: 1) Correct method parameters for activation/deactivation actions in `BasicModelAdmin`;

Extra: 1) Improve formatting of `general_fields` lists for readability.
2025-06-24 17:12:21 +03:00
fa54271e89 Features: 1) Add autocomplete_fields for user in admin; 2) Extend general_fields in admin to include start_time, end_time, and used_on;
Fixes: 1) Make `used_on` a readonly field in admin;

Extra: 1) Minor formatting update in `search_fields`.
2025-06-23 16:00:12 +03:00
080fcb2a25 Features: 1) Add suppress(NotRegistered) to handle unregistered translation models safely; 2) Enhance add_translations_fieldset logic for better error handling;
Fixes: 1) Add missing import for `NotRegistered` in `admin.py`;

Extra: 1) Minor refactoring of `add_translations_fieldset` function for readability;
2025-06-23 15:33:35 +03:00
35ac700a44 Features: 1) Add verbose_name attribute to multiple Slug fields for better clarity;
Fixes: 1) Correct conditional handling of `fieldsets` to avoid duplicate `metadata` fields in admin view;

Extra: n/a;
2025-06-22 17:12:59 +03:00
43141bc3d5 Features: 1) Extend metadata field handling in admin to include both uuid and slug.
Fixes: _(no relevant changes detected)_.

Extra: 1) Update Russian locale binary (`django.mo`) file content.
2025-06-22 17:08:16 +03:00
437f3cff31 Features: 1) Simplify FieldsetsMixin class by including translation handling method inline; 2) Improve icon consistency with updated replacements in ModelAdmin classes.
Fixes: 1) Add missing `# type: ignore` comments for type-checking in admin site customizations.

Extra: 1) Refactor admin models by removing `TranslationFieldsetMixin` usage; 2) Streamline translation fieldset injection logic; 3) Code cleanup and minor comment adjustments.
2025-06-22 16:57:54 +03:00
0079998ed7 Features: 1) Add is_navtab, verbose_name, verbose_name_plural, and icon attributes to several inlines for better configuration and clarity;
Fixes: 1) Add `# type: ignore` comments to suppress type checking issues on model assignments;

Extra: 1) General code cleanup and improvements to the `admin.py` file.
2025-06-22 16:48:50 +03:00
15df6dd0c8 Features: 1) Add readonly_fields for uuid, modified, and created attributes across multiple admin models; 2) Improve type annotations for FieldsetsMixin class fields.
Fixes: 1) Resolve "type: ignore" addition for `ProductAdmin` model definition.

Extra: 1) Minor formatting adjustments for improved readability; 2) Enhance code clarity by standardizing `readonly_fields` across admin classes.
2025-06-22 16:41:32 +03:00