Frequently used functions and constants about datetime in Django projects
Project description
django-datetime-helpers
Frequently used functions and constants about datetime in Django projects
Installing
pip install django-datetime-helpers
Examples
# Quering all Users who join today
users = User.objects.filter(
created_at__date=today()
)
# Quering all Users who join in last 12 hours
users = User.objects.filter(
created_at__gte=secons_ago(12 * HOUR)
)
# Declaring constanst
USER_SOMETHING_TIMEOUT = 5 * MINUTE
# Waiting for something
time.sleep(MINUTE)
For more examples see source code.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django_datetime_helpers-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cb515665da36086f08a60512a5de716d3b37bf58feed228ae31ac18005e8ad8 |
|
MD5 | cde3ac7dd2ec05db297030e3b04c2726 |
|
BLAKE2b-256 | 997f9c26ecbc7cc9d6777bdc273c68188760ed88ac32ccc69417f4083610ecf7 |
Close
Hashes for django_datetime_helpers-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f878386a093d749732e427a91264d81fb1a95f570613bec7d36b85558baf24f |
|
MD5 | 02feb18875cc2816f7bfab06ea27a7e3 |
|
BLAKE2b-256 | 0d08f4c6a862dd55c57bcbd71cd748a992fa77c23fa25cf99d01bc62762f5500 |