You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: developers/DJANGO.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ For example, `urls.py` should really only import from `views.py` (and `utils.py`
90
90
- Store Datetimes in the database in UTC.
91
91
- Only convert to a specific timezone at the View/Template layer (when rendering or collectin information from the user).
92
92
- Note Python has several timezone libraries that can sometimes [conflict or have performance issues](https://blog.ganssle.io/articles/2018/03/pytz-fastest-footgun.html). The fast and correct way to set a timezone of a datetime object is `dt_object.replace(tzinfo=ZoneInfo("America/Pacific"))` .
93
-
93
+
- Do not use the default server timezone or hardcode a timezone at any point. You should use UTC, or get the specific timezone from the domain objects (frontend UI should specify it)
94
94
### Managing Environments
95
95
96
96
- Django should have SMTP creds, and should set the ADMINS to the back-end developer that maintains that project. Or, use sentry\_sdk with [sentry.countable.ca](sentry.countable.ca)
0 commit comments