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:
@@ -16,6 +16,7 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@6.1/dist/fancybox/fancybox.css"/>
|
||||
<script src="https://cdn.jsdelivr.net/npm/swiper@12/swiper-bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@6.1/dist/fancybox/fancybox.umd.js"></script>
|
||||
<script src="{% static 'js/header-category-dropdown.js' %}"></script>
|
||||
{% block add_css %}
|
||||
<!-- Additional CSS -->
|
||||
{% endblock %}
|
||||
@@ -48,9 +49,10 @@
|
||||
closeButton.addEventListener('click', hideToast)
|
||||
}
|
||||
|
||||
window.setTimeout(hideToast, 4000)
|
||||
window.setTimeout(hideToast, 4000)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<script src="{% static 'js/favorites.js' %}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user