1. Refine UI/UX
Apply Tailwinds
Rewrite all page
2. Add new feature to model
Add new field
- description - long - short
- use default + editable instead of auto_add_now
- track up vote
- Change timezone
- Add time left track
-Add participant
-Add up/down vote attribute
-- Choice
- Add total_vote
-Add calculate_percentage of vote
3. Refine View
-Redirect instead of home page
-Add context to result, detail view
-Apply ChartJS
-Delete home
In this commit, I change default field of pub_date into auto_add_now and it change the way pub_date assign work so I need to add several updates to address issues and errors in the code and tests related to the handling of the pub_date attribute in the Question model.
Test Updates
- Modified the create_question function in tests to accept pub_date when necessary and set it explicitly in the tests to match the new model definition.
Ensured the correct ordering of past questions in the index view.
Model Update
- Modified the Question model to use auto_now_add=True for pub_date to set it to the current date and time automatically.