![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Timezone localization without any thinking or doing whatsoever.
The purpose of this django app is to piggy back off of Django's already great timezone handling and add some automagic to the equation. This package is perfect for you if:
$ pip install django-easytz
USE_TZ
is set to True in your settings file. This is Django's default since they introdcued timezone support in 1.4easytz.middleware.TimezonesMiddleware
to your MIDDLEWARE_CLASSES
easytz
to your INSTALLED_APPS
./manage.py syncdb
to add the model for storing users timezonesOn the client side, jstz (http://pellepim.bitbucket.org/jstz/) is used to set a cookie with the users timezone. A middleware picks up the cookie and activates the timezone using Django's timezone handling. If a user is authenticated, it will also set the timezone in the session under a key called timezone as well as save it to the database.
Anytime you want to access a users timezone, you can do so by calling my_user.tz
. This will get_or_create a timezone entry for the user. If there is no entry present, it defaults to what is set in settings.TIME_ZONE
or 'GMT'. From there, its up to you to use Django's built in handling. Django automatically converts aware datetimes that are used in templates. If you're in Django, just do the following
from django.utils import timezone
def foo(request):
timezone.localtime(timezone.now(), request.user.tz)
...
There is a simple storage model in easytz.models.TimezoneStore
with the following fields:
If you want to cut down on redundant queries, just make sure to select_related timezone if you are accessing the .tz
property on users.
user = User.objects.select_related('timezone').get(user_id = 1)
users = User.objects.select_related('timezone').all()
FAQs
Timezone localization without any thinking or doing whatsoever.
We found that django-easytz demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.