opensource-nepal / django-nepali Goto Github PK
View Code? Open in Web Editor NEWA django package on top of 'nepali' python package which supports nepali date time, time conversion, etc on django projects.
License: GNU General Public License v3.0
A django package on top of 'nepali' python package which supports nepali date time, time conversion, etc on django projects.
License: GNU General Public License v3.0
Following Community Standards include:
Implement Github actions for triggering the release process (eg. building code, compiling docs, publishing package, etc). This Github action should be dependent on the Github release.
As an extended package of 'nepali', we need to create a new field called NepaliDateField in Django that supports Nepali dates. This field will be used in both Django models and forms.
class MyNepaliInfo(models.Model):
...
birthday = NepaliDateField(...)
...
This field will support both Python's date and nepalidate.
info = MyNepaliInfo()
info.birthday = nepalidate(2051, 4, 29) # nepali date
...
info.save()
# OR
info.birthday = datetime.date(1994, 8, 13) # Python's date
# OR
MyNepaliInfo.objects.create(
...
birthday = nepalidate(2051, 4, 29),
...
)
Filtering should be done by both Python's date and nepalidate. Also, user should be able to filter with nepali date's year, month, or day.
# filtering with nepalidate
MyNepaliInfo.objects.filter(birthday=nepalidate(2051, 2, 29))
# filtering with Python's date
MyNepaliInfo.objects.filter(birthday=date(1994, 8, 13)
# date range filtering
MyNepaliInfo.objects.filter(birthday__range=(nepalidate1, nepalidate2))
MyNepaliInfo.objects.filter(birthday__gt=nepalidate1)
# Filtering with Nepali year, same goes for the month and day
MyNepaliInfo.objects.filter(birthday__year=2051)
# Filtering with English year
MyNepaliInfo.objects.filter(birthday__year_en=1994)
class MyNepaliInfoForm(forms.Form):
...
birthday = NepaliDateFormField(...)
...
...
Setup and configure Django tests on this project. The tests might extend to model testing, form testing, template testing, etc.
This task also includes running tests on GitHub Actions
Create a model/form field for the nepali phone number.
Example usage:
class MyInfo(models.Model):
...
phone_number = NepaliPhoneNumberField(...)
...
As an extended package of 'nepali', we need to create a new field called NepaliDateTimeField in Django that supports Nepali dates and times. This field will be used in both Django models and forms.
The implementation will be the same as the implementation of "NepaliDate". Please refer to issue #5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.