EgbieAndersonUku1 / Fullstack-fruit-and-veg

Fullstack Fruit & Veg Shop: A web application developed with HTML, CSS, and JavaScript for the frontend, and Django for the backend. Features include user authentication, a product catalogue, shopping cart functionality, and order management. and much more
https://fullstack-fruit-and-veg.vercel.app
0 stars 0 forks source link

Refactor Ban Logic: Introduced BanUser Model and Tests #23

Closed EgbieAndersonUku1 closed 1 week ago

EgbieAndersonUku1 commented 1 week ago

Refactored User Ban Logic: Moved ban-related functionality from the User model to a new BanUser model. This creates a separation section within the admin section allowing an administration to easily use the Ban features instead of having it all in the User model admin

Admin Integration: Added the BanUser model to the Django admin panel for easier management. Enhanced Model: Implemented methods for banning, unbanning, and checking ban status with support for both permanent and temporary bans. Tests: Created comprehensive tests for the BanUser model, including checks for ban attributes, proper functionality of ban methods, and correct handling of ban expiration.

Todo

Write more tests.

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **fullstack-fruit-and-veg** | ⬜️ Ignored ([Inspect](https://vercel.com/egbies-projects/fullstack-fruit-and-veg/CmhzxTamTQk6UoCh6VDHkkVjwoDB)) | | | Sep 14, 2024 6:56pm |