Skip to content

Merge Django Functionality#97

Merged
catvec merged 274 commits into
masterfrom
django
Feb 16, 2026
Merged

Merge Django Functionality#97
catvec merged 274 commits into
masterfrom
django

Conversation

@catvec

@catvec catvec commented Feb 8, 2026

Copy link
Copy Markdown
Collaborator

Rewrite of the app using Django.

catvec and others added 30 commits December 29, 2025 20:26
Simplified the deal detail page to focus on animated gradients using the extracted palette colors. Replaced complex layout with centered content over an animated background featuring morphing blobs, floating particles, and motion path animations.

Changes:
- Add anime.js with multi-layered animations (morphing SVG blobs, 50 staggered particles, motion paths)
- Simplify page layout to centered title, price, expiry, and CTA button
- Set default palette to black (#000000) and foreground to white (#ffffff)
- Add default_palette() function to avoid lambda serialization issues in migrations
- Fix README.md to reference correct .env.example file
Replaced simple circular blobs with irregular organic shapes that smoothly drift across the screen. Added decorative squiggly lines and geometric accent shapes for visual interest.

Changes:
- Create irregular blob shapes using SVG paths with random radii and quadratic curves
- Distribute blobs evenly across screen using grid system with randomization
- Make blob size scalable based on palette color count (fewer colors = bigger blobs)
- Add 5 animated squiggly lines with stroke dash animation
- Add 8 rotating geometric accent shapes
- Remove particle system in favor of cleaner blob-focused design
- Use CSS transforms for smooth animation without jitter
Added k-means clustering to extract color proportions from images, enabling
gradient backgrounds weighted by color dominance. This is a work-in-progress
commit with partial implementation.

Changes:
- Add extract_colors_with_proportions() using k-means clustering
- Update palette_colors structure from list of hex to list of {color, percentage}
- Update default_palette() to return new dict structure
- Add dependencies: Pillow, numpy, scikit-learn

Still TODO (see PROGRESS.md):
- Update admin.py, views.py, widgets.py for new data structure
- Update templates to use .color accessor
- Reset migrations
- Scale blobs proportionally based on color percentages

Note: This commit contains incomplete changes and will not work without
completing the remaining updates documented in PROGRESS.md
Simplified approach: colors are now sorted by prominence (most dominant first)
using k-means clustering. Visual elements scale based on color position:
dominant colors get bigger blobs, more instances, and more gradient space.

Changes:
- Use k-means clustering to extract and sort colors by prominence
- Most dominant color gets 0-40% of gradient, others share 40-100%
- Blob size scales from 300px (dominant) to 90px (least prominent)
- Blob count scales from 3 (dominant) to 1 (least prominent)
- Add numpy and scikit-learn dependencies
- Add g++ to Dockerfile for building scientific Python packages
- Update PROGRESS.md with completed implementation details

Visual impact:
- Color 1: largest blobs (300px), 3 instances, 40% of gradient
- Color 2+: progressively smaller blobs and fewer instances
- Fixed CSRF token missing error in re-extract colors button by implementing
  proper CSRF token handling with dynamic form creation
- Fixed CSS gradient artifact in deal detail page by improving color
  distribution calculation in linear gradient
- Updated migration help text for palette_colors field to clarify color order
- Added QWEN.md documentation for project context and migration management

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Added django-object-actions package to requirements
- Updated DealAdmin to use DjangoObjectActions mixin
- Replaced custom JavaScript button with proper admin action
- Added the package to INSTALLED_APPS in settings
- Removed old change_view method that handled form submission
- Updated readonly_fields and fieldsets to remove old button reference
- Updated documentation to reflect the new implementation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Added image_search action to django-object-actions
- Updated change_actions to include both reextract_colors and image_search
- Updated documentation to reflect the new implementation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Removed image_search_button from readonly_fields
- Removed image_search_button from fieldsets
- Cleaned up unused method since it's now an object action
- Both actions now properly implemented as django-object-actions

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Restored the image_search method that was accidentally removed
- Combined both actions properly in the change_actions tuple
- Fixed the admin configuration to properly use django-object-actions

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Implement a decorator-based approach to automatically apply Unfold theme CSS
classes to django-object-actions buttons, ensuring visual consistency with
the admin interface without manual configuration.

Changes:
- Create unfold_action decorator in deals/admin_mixins.py that automatically
  injects Unfold theme classes to match History/View on site buttons
- Update DealAdmin to use @unfold_action decorator on action methods
- Remove manual CSS styling (delete admin-styles.css)
- Remove STYLES configuration from settings.py
- Rename QWEN.md to AGENT.md and create symlinks (QWEN.md, CLAUDE.md)
- Add documentation notes about running Django commands in Docker container
Automatically detect when the image URL is modified on an existing deal
and re-extract the color palette from the new image. This ensures colors
stay in sync with the image without manual intervention.

Changes:
- Add image change detection in save_model
- Automatically call extract_colors_from_url when image URL changes
- Show success/error messages for automatic re-extraction
Mark Phase 3 as completed and document recent work:
- Automatic Unfold theme styling for django-object-actions
- Automatic color palette re-extraction on image changes
Remove 'Recent Changes' section and add clear instructions:
- This file is for architecture and setup documentation
- Use CURRENT_WORK.md for tracking active development
- Add admin_mixins.py to Key Files and Components
- Update admin customization description with new features
Fixed nav bar to top of viewport and adjusted animation container to start below header, ensuring navigation is always visible on deal detail pages.
Allow SECRET_KEY to be overridden via environment variable while providing a safe default for development.
- Make navigation header transparent with blur effect on deal pages
- Extend animated gradient background to full viewport
- Move content to top of page with striking typography
- Display price and expiration in same row
- Add game image with shadow and rounded corners
- Move title, price, and expiration above image
- Constrain image to max 800px width and 60vh height
- Add color bar accent above image
- Display price in glowing box with prominent styling
- Remove sidebar with metadata (added date, status, colors)
- Add left border accent to content sections
- Reduce top padding for tighter spacing
- Use foreground color for title text for better readability
- Add gradient backgrounds to price tag and button using palette
- Add animated shine effect to price tag
- Add glowing shadows using palette colors
- Style expiration badge with frosted glass effect
- Add hover animations and transitions to button
- Remove decorative left borders and color bar
- Adjust typography sizing for better hierarchy
- Add emoji icon to expiration time
- Reduce price font size to match expiration (0.875rem/1rem)
- Reduce price tag padding to match badge height (0.5rem 1rem)
- Reduce border-radius to 0.5rem for consistency
- Reduce spacing between back button and title (1rem)
- Move 'Get This Deal' button to fixed floating footer at bottom
- Add transparent frosted glass effect to both header and footer
- Match header blur (20px) and border styling to footer
- Fix image shadow to fit actual image dimensions (width: auto)
- Reduce image border-radius to 0.5rem
- Make button more compact (smaller font, padding, border-radius)
- Add bottom padding to content to prevent footer overlap
- Add subtle shimmer animation that sweeps across title text
- Use foreground color for all nav text for better visibility
- Add soft glow effect using palette colors
- Add minimal text stroke for definition
- Fix title overflow with proper padding (extra bottom padding)
- Remove white background tint from nav for cleaner look
- Apply animated gradient shimmer using palette colors on title
- Shimmer cycles through palette colors (0, 2, 4) across text
- Style subscribe button with palette color gradients
- Add hover effect to button with reversed gradient
- Increase glow visibility with palette colors
- Use palette accent colors (3 and 5) for subtle shimmer effect
- Base gradient on foreground color for readability
- Slow down animation to 6s with ease-in-out for smoothness
- Reduce glow intensity for more subtle holographic effect
- Animate back-and-forth for natural shimmer appearance
- Relocate price and expiration info to floating footer alongside button
- Update footer layout with flexbox for side-by-side arrangement
- Fix TypeError in admin when updating deals with palette_colors
- Handle both list and JSON string formats for palette_colors
- Update CURRENT_WORK.md with recent detail page enhancements
- Convert Python lists to JSON strings in value_from_datadict
- Validate and return JSON strings as-is instead of parsing
- Fixes TypeError when Django's JSONField tries to parse list objects
- Ensures compatibility with JSONField's expected string format
- Replace hardcoded palette_colors.N with |first and |slice filters
- Add text stroke effect to title for border shimmer
- Reduce title bottom margin from 1.5rem to 0.5rem
- Remove extra bottom padding from title
- Make shimmer effect more subtle (300% vs 250% background-size)
- Update both detail and home templates for consistency
- Add color distance calculation for perceptual difference
- Select diverse colors ensuring minimum distance between palette colors
- Use more k-means clusters (12+) then select most diverse subset
- Prevent similar shades dominating the palette

- Redesign detail page with cleaner layout
- Move title next to back button in simple foreground color
- Make image full-width with 16:9 aspect ratio
- Add price and expiry markers overlaid on image bottom
- Make entire image card clickable to deal link
- Add separate "Deal Link" button below image
- Keep animated background with diverse color palette
catvec added 27 commits January 13, 2026 22:35
The web service when there was an error would restart super rapidly and
cause cpu usage to spike. This was annoying during development.
so watchmedo doesn't restart when the program exits
The flower reverse proxy and permissions code was put in the config app.
It makes more sense to put it in the tasks app :)
The key was to:

- enable the xheaders option in flower
- set the url_prefix to /admin/flower in flower
- make revproxy view in tasks.views to add the "/admin/flower/" path on
  to the end of the upstream path

This makes flower and django revproxy match up with where they think
they're hosted.
The default Unfold admin theme converts list views into stacked
cards on mobile, which is hard to read with many columns. Override
the change_list_results template and add CSS to keep it as a normal
horizontally-scrollable table on all screen sizes.
@catvec catvec requested a review from ROODAY February 8, 2026 19:58
@catvec catvec merged commit 953aef8 into master Feb 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant