feat: add favorites feature for users
All checks were successful
Build and Push Docker Image / build (push) Successful in 51s
All checks were successful
Build and Push Docker Image / build (push) Successful in 51s
- Implemented `Favorite` model with unique user-item constraint and timestamped records - Added `favorites:index` and `favorites:toggle` views with AJAX support for toggling favorites - Built templates and front-end assets for the favorites page and integration with item grids - Extended header with favorites link and dynamic counter - Added tests covering models, views, and templates for the favorites functionality - Updated admin to enable management of favorites via Django admin interface
This commit is contained in:
7
templates/_fragments/item-grid.html
Normal file
7
templates/_fragments/item-grid.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="items-grid"{% if favorites_grid %} data-favorites-grid data-empty-message="{{ empty_message|escape }}"{% endif %}>
|
||||
{% for item in items %}
|
||||
{% include "catalog/_fragments/item-card.html" with item=item %}
|
||||
{% empty %}
|
||||
<p class="item-list-empty">{{ empty_message }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user