{"id":28157059,"url":"https://github.com/opensource-nepal/django-nepali","last_synced_at":"2025-05-15T08:17:26.563Z","repository":{"id":168321822,"uuid":"642463713","full_name":"opensource-nepal/django-nepali","owner":"opensource-nepal","description":"A django package on top of 'nepali' python package which supports nepali date time, time conversion, etc on django projects.","archived":false,"fork":false,"pushed_at":"2023-07-16T15:43:09.000Z","size":33,"stargazers_count":11,"open_issues_count":5,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-18T23:59:18.334Z","etag":null,"topics":["ad-to-bs","bs-to-ad","django","django-nepali","jinja","jinja2","nepal","nepali","nepali-date","nepali-date-converter","nepalidate","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opensource-nepal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-18T16:13:29.000Z","updated_at":"2024-08-29T10:34:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e40c418-8a49-4911-b80d-f7cdee05ef87","html_url":"https://github.com/opensource-nepal/django-nepali","commit_stats":null,"previous_names":["opensource-nepal/django-nepali"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensource-nepal%2Fdjango-nepali","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensource-nepal%2Fdjango-nepali/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensource-nepal%2Fdjango-nepali/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensource-nepal%2Fdjango-nepali/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensource-nepal","download_url":"https://codeload.github.com/opensource-nepal/django-nepali/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301583,"owners_count":22047907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ad-to-bs","bs-to-ad","django","django-nepali","jinja","jinja2","nepal","nepali","nepali-date","nepali-date-converter","nepalidate","python","python3"],"created_at":"2025-05-15T08:16:07.280Z","updated_at":"2025-05-15T08:17:26.548Z","avatar_url":"https://github.com/opensource-nepal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-nepali\n\n[![CI status](https://github.com/opensource-nepal/django-nepali/actions/workflows/python-package.yml/badge.svg?branch=main)](https://github.com/opensource-nepal/django-nepali/actions)\n[![Downloads](https://img.shields.io/pypi/dm/django-nepali.svg?maxAge=180)](https://pypi.org/project/django-nepali/)\n[![codecov](https://codecov.io/gh/opensource-nepal/django-nepali/branch/main/graph/badge.svg?token=PTUHYWCJ4I)](https://codecov.io/gh/opensource-nepal/django-nepali)\n\nA django package on top of [nepali](https://github.com/opensource-nepal/py-nepali/) python package which supports nepali date time, time conversion, etc on django projects.\n\n## Requirements\n\n    django\n    nepali \u003e= 1.0.0\n\n## Installation\n\n    pip install django-nepali\n\nOn `settings.py`, add `'django_nepali'` to your `INSTALLED_APPS`.\n\n```python\nINSTALLED_APPS = [\n    ...\n    'django_nepali',\n    ...\n]\n```\n\n## Django Templates\n\n### nepalidatetime\n\nIn your Template\n\n```python\n{% load nepalidatetime %}\n```\n\n#### nepalinow\n\n`nepalinow` renders the current Nepali date and time in 'en-US' locale (English).\n\n##### For default date format\n\n```python\n{% nepalinow %}\n```\n\n##### For custom date format\n\n```python\n{% nepalinow '%Y-%m-%d' %}\n```\n\n#### nepalinow_ne\n\n`nepalinow_ne` renders the current Nepali date and time in 'ne' locale (Nepali).\n\n##### For default date format\n\n```python\n{% nepalinow_ne %}\n```\n\n##### For custom date format\n\n``` python\n{% nepalinow_ne '%Y-%m-%d' %}\n```\n\n#### nepalidate\n\n`nepalidate` renders the datetime object into nepali datetime format in 'en-US' locale (English).\n\n##### For default date format\n\n``` python\n{{ datetime_obj|nepalidate }}\n```\n\n##### For custom date format\n\n```python\n{{ datetime_obj|nepalidate:\"%Y-%m-%d\" }}\n```\n\n#### nepalidate_ne\n\n`nepalidate_ne` renders the datetime object into nepali datetime format in 'ne' locale (Nepali).\n\n##### For default date format\n\n```python\n{{ datetime_obj|nepalidate_ne }}\n```\n\n##### For custom date format\n\n```python\n{{ datetime_obj|nepalidate_ne:\"%Y-%m-%d\" }}\n```\n\n#### nepalihumanize\n\n`nepalihumanize` renders the datetime object to a human readable form for 'ne' locale (Nepali)\n\n```python\n{{ datetime_obj|nepalihumanize }}\n```\n\n##### Humanize threshold\n\nYou can provide a threshold input, measured in seconds, to the `nepalihumanize` filter. If the time difference between the current time and the `datetime_obj` is greater than the specified threshold, then instead of relative time as provided by the humanize function, the `datetime_obj` will be displayed in the specified format (if provided), or else in the default format.\n\n```python\n{{ datetime_obj|nepalihumanize:1000 }}\n```\n\n### nepalinumber\n\nIn your Template\n\n```python\n{% load nepalinumber %}\n```\n\n`nepalinumber` renders the english number into nepali format (devanagari)\n\n```python\n{{ forloop.counter|nepalinumber }}\n```\n\n```python\n{{ 150|nepalinumber }}\n```\n\n##### nepali_comma\n\nRenders the given value with commas added in Nepali style without converting the number.\n\n```python\n{{ number|nepali_comma }}\n```\n\nThis would convert a number such as `100000` into `1,00,000`.\n\n##### english_comma\n\nRenders the given value with commas added in English style without converting the number.\n\n```python\n{{ number|english_comma }}\n```\n\nThis would convert a number such as `100000` into `100,000`.\n\n##### nepalinumber with comma\n\nConverts the number into nepali number and renders it. Basically same as `{{ number|nepalinumber|nepali_comma }}`\n\n```python\n{{ number|nepalinumber_with_comma }}\n```\n\nThis would convert a number such as `1000` into `१,०००`.\n\n## Contribution\n\nWe appreciate feedback and contribution to this package. To get started please see our [contribution guide](CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensource-nepal%2Fdjango-nepali","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensource-nepal%2Fdjango-nepali","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensource-nepal%2Fdjango-nepali/lists"}