-
-
Notifications
You must be signed in to change notification settings - Fork 66
delete get_timezone and APP_TIME_ZONE #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b6875c4
to
2b97bad
Compare
The time zone function was a dirty fallback to set it to "America/New York" by default, since that's the one I needed. I'm pretty sure I put a TODO somewhere in the code to implement this the right way and remove the dirty code, but I didn't remember to do it. I need to find a way to allow others to merge if the tests passed (I can't see if they were executed). Let me know when I can merge (once it's no longer a draft). |
Normally you should, once the workflow run has been granted. Btw, tests seem to not run on this MR, any idea why? |
I've been reading GitHub's documentation here and there, can't seem to find the reason why the tests are not running. I thought by adding the pull request target condition in the workflow as stated in the documentation and changing the configuration to allow them, it would work but apparently not : name: Tests
on:
push:
branches-ignore:
- 'main'
workflow_dispatch:
pull_request_target:
types: [assigned, opened, synchronize, reopened]
branches-ignore:
- 'main' |
Still a draft ? Or can I proceed to merge it ? |
It's not needed since settings.TIME_ZONE can be used and is guaranteed to exist and be valid.
d0fe671
to
4085d14
Compare
I want to review and double-check some things, I'll tell you soon, probably tonight. |
Awesome. |
And the test job keeps not running and that's really a pain, I can't work efficiently without tests runs on my PR. It seems like we are hitting a not-so-uncommon corner case of Github, there is Github discussion on the subjects here. It seems to be related to CI job name and branch protection rules of the Github repo (which I can't see), would you please give one more try? Sorry and thank you. |
Yes, I'll check it out. I agree it's annoying. I'm wondering if adding you as collaborator (if you want it too) would solve the problem or if more permission would be required. |
@deronnax I tried updating the workflow name from "tests" to "testing" and change the name in the branch rule as explained in the link in your comment and updated the settings so anyone can see the worklow and have write and read permission, but it still shows here as "Waiting for status to be reported". I tried creating a new account and added it as a collaborator, and it has the right permissions needed to see the worklow, launch them and it has the push rights directly into the repository. So, if you're interested, I can add you, but I'm gonna need the email address you used in your github account. Once added you can remove the comment if you don't want your email address to show here. In the meantime, I saw the tests ran well in the forked repo, I can merge it and then see afterwards. |
I think you can invite me with just my handle, @deronnax . OK for being part of the repo, until we figure out this problem at least. |
I sent the invitation.
2 reasons:
|
get_timezone
is not needed: settings.TIME_ZONE can be used and is guaranteed to exist and be valid. The fallback of APP_TIME_ZONE, despite it should never happen since TIME_ZONE necessarily exist, is misleading: nowhere in Django the default timezone isAmerica/New York
(it was the default parameter for the project generation years ago and it's not the case anymore, see the doc https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-TIME_ZONE).Still a draft currently. Don't mind the "parallelize test runs" commit.