Nepali DateTime Field
Highly motivated package from Django’s DateField & DateTimeField. The library is intended to provide Bikram Sambat Date Time fields for Django’s Model and Form.
Note: Currently only supports DateField. DateTimeField will be supported soon in future releases.
The package is dependent on nepali-datetime package and the UI for the date picker is implemented from https://github.com/leapfrogtechnology/nepali-date-picker.
Supports: Django 2.0+
Installation
$ pip install django-nepali-datetime-field
Quick start
Add nepali_datetime_field to your INSTALLED_APPS list:
INSTALLED_APPS = [ ... 'nepali_datetime_field', ]Importing NepaliDateField model field to models.py file:
from nepali_datetime_field.models import NepaliDateField class YourModel(models.Model): ... nepali_date = NepaliDateField()Importing NepaliDateField form field to forms.py file:
from nepali_datetime_field.forms import NepaliDateField class YourForm(forms.Form): ... nepali_date = NepaliDateField()Whenever using NepaliDateField form field, don’t forget to add Widget’s media on the <head> section of the html as below:
<html> <head> ... {{ form.media }} ... </head> <body> ... {{ form }} ... </body> </html>Querying the model field:
import nepali_datetime nepali_date = nepali_datetime.date(1995,10,1) # get query YourModel.objects.get(nepali_date=nepali_date) # filter query YourModel.objects.filter(nepali_date=nepali_date) # date range query from_date = nepali_datetime.date(1990,1,1) to_date = nepali_datetime.date(1999,12,30) YourModel.objects.filter(nepali_date__range=(from_date, to_date))
More Usage
Check some of the usage details in example_app/tests.py.
Demo
Play around with the live demo here.
Metadata
Release files for django-nepali-datetime-field 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_nepali_datetime_field-0.8.0.tar.gz | 5.7 kB | Without provenance | Details for django_nepali_datetime_field-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_nepali_datetime_field-0.8.0-py3-none-any.whl | Python 3 | none | any | Details for django_nepali_datetime_field-0.8.0-py3-none-any.whl |
Total release size: 13.4 kB
Release files / django_nepali_datetime_field-0.8.0.tar.gz
| Download URL | django_nepali_datetime_field-0.8.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00d69f5d5aa6ea64e2a9964d5ba6c489b0e51325aeb7029e1b18cc4a323894ae
|
|
BLAKE2b-256 checksum How to use checksums |
8f2d5f080338f4b5e2cddbf91c312491042a761dc62e75a39aeae1ff409f55df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / django_nepali_datetime_field-0.8.0-py3-none-any.whl
| Download URL | django_nepali_datetime_field-0.8.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34eaab138856f69374db7af7274bafd7621224937feaf84a610e9d9872b52b37
|
|
BLAKE2b-256 checksum How to use checksums |
15fc62ff130c5414a9030410673356d21e376e59cf045ecdabdef40aaf06f833
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for django-nepali-datetime-field 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.