ku-polls/polls
sosokker c116a2ff0d Update Test and Model for Default pub_date Handling
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.
2023-09-08 22:36:41 +07:00
..
migrations Add is_published, can_vote to QuestionModel/ Add test for can_vote, is_published 2023-09-05 21:25:04 +07:00
static/polls Add is_published, can_vote to QuestionModel/ Add test for can_vote, is_published 2023-09-05 21:25:04 +07:00
templates Add is_published, can_vote to QuestionModel/ Add test for can_vote, is_published 2023-09-05 21:25:04 +07:00
__init__.py Create the polls app. 2023-08-26 16:28:34 +07:00
admin.py Add end_date customizer to admin panel 2023-09-07 22:43:54 +07:00
apps.py Add docstring to classes and methods and clean the code. 2023-08-28 23:04:08 +07:00
models.py Update Test and Model for Default pub_date Handling 2023-09-08 22:36:41 +07:00
tests.py Update Test and Model for Default pub_date Handling 2023-09-08 22:36:41 +07:00
urls.py Add docstring to classes and methods and clean the code. 2023-08-28 23:04:08 +07:00
views.py Add is_published, can_vote to QuestionModel/ Add test for can_vote, is_published 2023-09-05 21:25:04 +07:00