KhunakornP / A-plus-management

Productivity and task manager for students and academics alike.
Apache License 2.0
2 stars 0 forks source link

Added calendar page that shows the tasks and events that are in a given month #31

Closed ErikLupical closed 6 days ago

KhunakornP commented 1 week ago
  • in line 74 in views.py please remove the main block.
  • in settings.py please uncomment the python decouple config and remove DEBUG = True
  • in views.py please change the hardcoded render URL to a dynamic URL
  • please add unittests for your code and ensure that they pass

BEFORE you do all these things however please approve the branches for event and task views and fetch the changes from main since you copied directly from the pull request you dont have migrations yet which is why the calendar is breaking in @Jangsoodlor review

KhunakornP commented 1 week ago

Also, DO NOT COMMIT MIGRATION FILES! since the branch did not merge from feature/events which has migrations if new migration files are committed the migrations may break.

PS: If you don't review the other pull requests I will have no other choice but to ask @BioB3 to review instead and exclude you in future reviews even if the work pertains to you work.

Jangsoodlor commented 6 days ago

The code is now working, but there's a small visual bug here. In months where the first day of the week is Sunday, there seems to be a blank row on the top of the calendar. image

KhunakornP commented 6 days ago
  • I get this warning message every time I load a calendar page of a month and year I haven't been to. You can fix this later so focus on fixing other ones.

I think this is an issue with how the today_midnight() is currently modeled since it uses .replace() which removes the localtime support of django's timezone object. I think to fix this you just have to convert the datetime to one with localtime

KhunakornP commented 6 days ago
  • I get this warning message every time I load a calendar page of a month and year I haven't been to. You can fix this later so focus on fixing other ones.

I think this is an issue with how the today_midnight() is currently modeled since it uses .replace() which removes the localtime support of django's timezone object. I think to fix this you just have to convert the datetime to one with localtime

actually scratch that its an issue with the event dates which does not use today_midnight() so the problem must be with how the events were originally created. Did you perhaps use the datetime module instead of django's timezone when creating the events?

BioB3 commented 6 days ago
  • I get this warning message every time I load a calendar page of a month and year I haven't been to. You can fix this later so focus on fixing other ones.

I think this is an issue with how the today_midnight() is currently modeled since it uses .replace() which removes the localtime support of django's timezone object. I think to fix this you just have to convert the datetime to one with localtime

actually scratch that its an issue with the event dates which does not use today_midnight() so the problem must be with how the events were originally created. Did you perhaps use the datetime module instead of django's timezone when creating the events?

Yes, it is stated in the warning message that Event.start_date received a "naive datetime" while timezone is available and that's all this message is about.

KhunakornP commented 6 days ago

Um, It would appear that in your models.py Events have an associated task board which is clearly wrong please delete the task board field.

BioB3 commented 6 days ago

We have agreed to let me take over implementing this feature, so I'll close this pull request and open a new one after I've done revising the calendar. Most changes here will be removed because I planned on using Fullcalendar API.