{"id":16550581,"url":"https://github.com/agusmakmun/django-address-model","last_synced_at":"2025-10-28T18:30:53.186Z","repository":{"id":56254202,"uuid":"201621074","full_name":"agusmakmun/django-address-model","owner":"agusmakmun","description":"django abstract model that provide the complete address, eg: no, na/rt, ca/rw, village/desa, sub district/kecamatan, district/kabupaten, province, country, postal code, currency code, phone code, etc.","archived":false,"fork":false,"pushed_at":"2020-11-18T09:48:51.000Z","size":990,"stargazers_count":14,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T17:05:50.292Z","etag":null,"topics":["django","django-address","django-address-model","django-models","django-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agusmakmun.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-10T11:31:13.000Z","updated_at":"2024-09-17T02:20:54.000Z","dependencies_parsed_at":"2022-08-15T15:31:15.649Z","dependency_job_id":null,"html_url":"https://github.com/agusmakmun/django-address-model","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agusmakmun%2Fdjango-address-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agusmakmun%2Fdjango-address-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agusmakmun%2Fdjango-address-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agusmakmun%2Fdjango-address-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agusmakmun","download_url":"https://codeload.github.com/agusmakmun/django-address-model/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238689796,"owners_count":19514095,"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":["django","django-address","django-address-model","django-models","django-plugin"],"created_at":"2024-10-11T19:34:54.526Z","updated_at":"2025-10-28T18:30:52.648Z","avatar_url":"https://github.com/agusmakmun.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=====================\nDjango Address Model\n=====================\n\n|pypi version| |license| |build status|\n\ndjango abstract model that provide the complete address, eg: no, na/rt, ca/rw, village,\nsub district, district, province, country, postal code, currency code, phone code, etc.\n\n\n.. image:: https://i.imgur.com/5mV5Jje.png\n\n\n**Support Languages**\n\n1. ID - Indonesia\n\n\nQuick start\n-----------\n\n1. Django Log Viewer is available directly from `PyPI`_:\n\n::\n\n    pip install django-address-model\n\n\n2. Add ``\"django_address\"`` to your ``INSTALLED_APPS`` setting like this\n\n::\n\n    INSTALLED_APPS = [\n        ...\n        \"django_address\",\n    ]\n\n\n3. Create an initial address\n\n::\n\n    python manage.py create_address --language=id --show-print=true\n\n\n\nUsage Example\n-------------\n\nIn your ``models.py``\n\n::\n\n    from django.db import models\n    from django_address.models import AddressModel\n\n\n    class Profile(AddressModel, models.Model):\n        name = models.CharField(max_length=100)\n        email = models.EmailField(blank=True, null=True)\n        phone = models.CharField(max_length=15, blank=True, null=True)\n\n        def __str__(self):\n            return self.name\n\n        class Meta:\n            ordering = ('-id',)\n\n\n`ORM Usage Example`\n\n\n::\n\n    \u003e\u003e\u003e from django_address.models import SubDistrict\n    \u003e\u003e\u003e from app.models import Profile\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e sub_district = SubDistrict.objects.first()\n    \u003e\u003e\u003e profile_data {'name': 'Summon Agus', 'email': 'summon@mail.com', 'phone': '+6282133338888',\n                      'address': 'Jl. Karto Dimejo', 'number': 35, 'na': 3, 'ca': 34, 'village': 'Sinduarjo',\n                      'sub_district': sub_district}\n    \u003e\u003e\u003e profile = Profile.objects.create(**profile_data)\n    \u003e\u003e\u003e profile.number\n    35\n    \u003e\u003e\u003e profile.address\n    'Jl. Karto Dimejo'\n    \u003e\u003e\u003e profile.village\n    'Sinduarjo'\n    \u003e\u003e\u003e profile.sub_district\n    'Ngaglik'\n    \u003e\u003e\u003e profile.sub_district.district\n    'Sleman'\n    \u003e\u003e\u003e profile.get_full_address(format_address='id', include_country=True)\n    'Jl. Karto Dimejo No.35, RT.3/RW.34 Sinduarjo, Ngaglik, Sleman, Yogyakarta, Indonesia - 55581'\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e profile.get_full_address_json()\n    {\n      'na': 3,\n      'ca': 34,\n      'number': 35,\n      'village': 'Sinduarjo',\n      'address': 'Jl. Karto Dimejo',\n      'sub_district': {\n        'id': 1,\n        'district': 1,\n        'deleted_at': None,\n        'postal_code': '55581',\n        'name': 'Ngaglik'\n      },\n      'district': {\n        'id': 1,\n        'name': 'Sleman',\n        'deleted_at': None,\n        'province': 1\n      },\n      'province': {\n        'id': 1,\n        'name': 'Yogyakarta',\n        'deleted_at': None,\n        'country': 1\n      },\n      'country': {\n        'id': 1,\n        'phone_code': '+62',\n        'deleted_at': None,\n        'name': 'Indonesia',\n        'currency_code': 'IDR',\n        'code': 'ID',\n        'states': [\n          'Aceh',\n          'Bali',\n          'Banten',\n          'Bengkulu',\n          'Gorontalo',\n          'Jakarta',\n          'Jambi',\n          'Jawa Barat',\n          'Jawa Tengah',\n          'Jawa Timur',\n          'Kalimantan Barat',\n          'Kalimantan Selatan',\n          'Kalimantan Tengah',\n          'Kalimantan Timur',\n          'Kalimantan Utara',\n          'Kepulauan Bangka Belitung',\n          'Kepulauan Riau',\n          'Lampung',\n          'Maluku',\n          'Maluku Utara',\n          'Nusa Tengga     ra Barat',\n          'Nusa Tenggara Timur',\n          'Papua (Irian Jaya)',\n          'Papua Barat',\n          'Riau',\n          'Sulawesi Barat',\n          'Sulawesi Selatan',\n          'Sulawesi Tengah',\n          'Sulawesi Tenggara',\n          'Sulawesi Utara',\n          'Sumatera Barat',\n          'Sumatera Selatan',\n          'Sumatera Utara',\n          'Yogyakarta'\n        ]\n      }\n    }\n    \u003e\u003e\u003e\n\n\n.. |pypi version| image:: https://img.shields.io/pypi/v/django-address-model.svg\n   :target: https://pypi.python.org/pypi/django-address-model\n\n.. |license| image:: https://img.shields.io/badge/license-MIT-green.svg\n   :target: https://raw.githubusercontent.com/agusmakmun/django-address-model/master/LICENSE\n\n.. |build status| image:: https://travis-ci.org/agusmakmun/django-address-model.svg?branch=master\n   :target: https://travis-ci.org/agusmakmun/django-address-model\n\n.. _`PyPI`: https://pypi.python.org/pypi/django-address-model\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagusmakmun%2Fdjango-address-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagusmakmun%2Fdjango-address-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagusmakmun%2Fdjango-address-model/lists"}