{"id":16417462,"url":"https://github.com/furious-luke/django-address","last_synced_at":"2025-12-17T10:52:17.866Z","repository":{"id":41612438,"uuid":"1621701","full_name":"furious-luke/django-address","owner":"furious-luke","description":"A Django address model and field. Addresses may be specified by address components or by performing an automatic Google Maps lookup.","archived":false,"fork":false,"pushed_at":"2023-10-13T21:23:29.000Z","size":495,"stargazers_count":441,"open_issues_count":49,"forks_count":179,"subscribers_count":19,"default_branch":"develop","last_synced_at":"2025-10-26T20:43:57.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/furious-luke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["banagale"]}},"created_at":"2011-04-16T01:58:58.000Z","updated_at":"2025-10-23T00:06:32.000Z","dependencies_parsed_at":"2024-06-18T16:56:18.050Z","dependency_job_id":null,"html_url":"https://github.com/furious-luke/django-address","commit_stats":{"total_commits":173,"total_committers":23,"mean_commits":7.521739130434782,"dds":"0.48554913294797686","last_synced_commit":"6e5b13859b8a795b08189dde7ce1aab4cca18827"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/furious-luke/django-address","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furious-luke%2Fdjango-address","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furious-luke%2Fdjango-address/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furious-luke%2Fdjango-address/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furious-luke%2Fdjango-address/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/furious-luke","download_url":"https://codeload.github.com/furious-luke/django-address/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furious-luke%2Fdjango-address/sbom","scorecard":{"id":414193,"data":{"date":"2025-08-11","repo":{"name":"github.com/furious-luke/django-address","commit":"6e5b13859b8a795b08189dde7ce1aab4cca18827"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":1,"reason":"Found 2/12 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/test-pr.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/publish.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/publish.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:97: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/publish.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-pr.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/test-pr.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-pr.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/test-pr.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-pr.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/test-pr.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-pr.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/test-pr.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-pr.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/test-pr.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-pr.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/test-pr.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/test.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/test.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/test.yml/develop?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/test.yml/develop?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/furious-luke/django-address/test.yml/develop?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating python:3.9-slim to python:3.9-slim@sha256:369a16fc95ce13e4e1e1c76a5eaa88bd16e955dc82a55c2a69c3c25bb61dd590","Warn: pipCommand not pinned by hash: Dockerfile:9-19","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:49","Warn: pipCommand not pinned by hash: .github/workflows/test-pr.yml:51","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:49","Info:   0 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'","Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"67 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-190 / GHSA-2gwj-7jmv-h26r","Warn: Project is vulnerable to: PYSEC-2023-13 / GHSA-2hrw-hx67-34x6","Warn: Project is vulnerable to: PYSEC-2022-1 / GHSA-53qw-q765-4fww","Warn: Project is vulnerable to: PYSEC-2022-20 / GHSA-6cw3-g6wv-c2xv","Warn: Project is vulnerable to: PYSEC-2023-225 / GHSA-7h4p-27mh-hmrw","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: PYSEC-2022-2 / GHSA-8c5j-9r9f-c6w8","Warn: Project is vulnerable to: PYSEC-2022-245 / GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2022-19 / GHSA-95rw-fx8r-36v6","Warn: Project is vulnerable to: PYSEC-2023-226 / GHSA-h8gc-pgj2-vjm3","Warn: Project is vulnerable to: PYSEC-2023-100 / GHSA-jh3w-4vvf-mjgr","Warn: Project is vulnerable to: PYSEC-2022-3 / GHSA-jrh2-hc4r-7jwx","Warn: Project is vulnerable to: PYSEC-2022-213 / GHSA-p64x-8rxx-wf6q","Warn: Project is vulnerable to: PYSEC-2023-12 / GHSA-q2jf-h9jm-m7p4","Warn: Project is vulnerable to: PYSEC-2023-222 / GHSA-qmf9-6jqf-j8fq","Warn: Project is vulnerable to: PYSEC-2022-304 / GHSA-qrw5-5h28-6cmg","Warn: Project is vulnerable to: PYSEC-2023-61 / GHSA-r3xc-prgr-mg9p","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2021-439 / GHSA-v6rh-hp5x-86rv","Warn: Project is vulnerable to: PYSEC-2024-47 / GHSA-vm8q-m57g-pff3","Warn: Project is vulnerable to: PYSEC-2022-191 / GHSA-w24h-v9qh-8gxj","Warn: Project is vulnerable to: PYSEC-2024-28 / GHSA-xxj9-f6rv-m3x4","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: GHSA-2m57-hf25-phgg","Warn: Project is vulnerable to: PYSEC-2021-333 / GHSA-p5w8-wqhj-9hhf","Warn: Project is vulnerable to: PYSEC-2023-87 / GHSA-rrm6-wvj7-cwh2","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637","Warn: Project is vulnerable to: PYSEC-2014-5 / GHSA-296w-6qhq-gf92","Warn: Project is vulnerable to: PYSEC-2011-2 / GHSA-3jqw-crqj-w8qw","Warn: Project is vulnerable to: PYSEC-2012-3 / GHSA-59w8-4wm2-4xw8","Warn: Project is vulnerable to: PYSEC-2012-4 / GHSA-5h2q-4hrp-v9rr","Warn: Project is vulnerable to: PYSEC-2014-6 / GHSA-625g-gx8c-xcmg","Warn: Project is vulnerable to: PYSEC-2015-8 / GHSA-6565-fg86-6jcx","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: PYSEC-2012-2 / GHSA-78vx-ggch-wghm","Warn: Project is vulnerable to: PYSEC-2015-9 / GHSA-7fq8-4pv5-5w5c","Warn: Project is vulnerable to: PYSEC-2015-4 / GHSA-7qfw-j7hp-v45g","Warn: Project is vulnerable to: PYSEC-2011-9 / GHSA-7wph-fc4w-wqp2","Warn: Project is vulnerable to: PYSEC-2014-2 / GHSA-89hj-xfx5-7q66","Warn: Project is vulnerable to: PYSEC-2016-2 / GHSA-c8c8-9472-w52h","Warn: Project is vulnerable to: PYSEC-2016-3 / GHSA-crhm-qpjc-cm64","Warn: Project is vulnerable to: PYSEC-2014-4 / GHSA-f7cm-ccfp-3q4r","Warn: Project is vulnerable to: PYSEC-2016-16 / GHSA-fp6p-5xvw-m74f","Warn: Project is vulnerable to: PYSEC-2011-8 / GHSA-fwr5-q9rx-294f","Warn: Project is vulnerable to: PYSEC-2015-5 / GHSA-gv98-g628-m9x5","Warn: Project is vulnerable to: PYSEC-2015-20 / GHSA-h582-2pch-3xv3","Warn: Project is vulnerable to: PYSEC-2011-5 / GHSA-h95j-h2rv-qrg4","Warn: Project is vulnerable to: GHSA-hmr4-m2h5-33qx","Warn: Project is vulnerable to: PYSEC-2015-6 / GHSA-jhjg-w2cp-5j44","Warn: Project is vulnerable to: PYSEC-2016-15 / GHSA-pw27-w7w4-9qc7","Warn: Project is vulnerable to: PYSEC-2015-10 / GHSA-q5qw-4364-5hhm","Warn: Project is vulnerable to: PYSEC-2011-4 / GHSA-rm2j-x595-q9cj","Warn: Project is vulnerable to: PYSEC-2014-1 / GHSA-rvq6-mrpv-m6rm","Warn: Project is vulnerable to: PYSEC-2014-7 / GHSA-rw75-m7gp-92m3","Warn: Project is vulnerable to: PYSEC-2019-16 / GHSA-vfq6-hq5r-27r6","Warn: Project is vulnerable to: PYSEC-2014-3 / GHSA-wqjj-hx84-v449","Warn: Project is vulnerable to: PYSEC-2011-3 / GHSA-wxg3-mfph-qg9w","Warn: Project is vulnerable to: PYSEC-2011-1 / GHSA-x88j-93vc-wpmp","Warn: Project is vulnerable to: PYSEC-2007-1","Warn: Project is vulnerable to: PYSEC-2008-1","Warn: Project is vulnerable to: PYSEC-2008-2","Warn: Project is vulnerable to: PYSEC-2009-3","Warn: Project is vulnerable to: PYSEC-2015-11","Warn: Project is vulnerable to: PYSEC-2015-7","Warn: Project is vulnerable to: PYSEC-2016-18","Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T23:24:36.027Z","repository_id":41612438,"created_at":"2025-08-18T23:24:36.027Z","updated_at":"2025-08-18T23:24:36.027Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27781993,"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","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-11T07:11:31.343Z","updated_at":"2025-12-17T10:52:17.846Z","avatar_url":"https://github.com/furious-luke.png","language":"Python","funding_links":["https://github.com/sponsors/banagale"],"categories":["Python"],"sub_categories":[],"readme":"# Django Address \n\n**Django models for storing and retrieving postal addresses.** \n\n---\n\n# Overview\nDjango Address is a set of models and methods for working with postal addresses.\n\n# Requirements\n * Python (3.5, 3.6, 3.7, 3.8)\n * Django (2.2, 3.0)\n\nWe **recommend** and only officially support the latest patch release of each Python and Django series. \n\n# Installation\nFor more detailed instructions, [view the Readme for the example site](https://github.com/furious-luke/django-address/blob/master/example_site/README.md) included with this package.\n\n```bash\npip install django-address\n```\n\nThen, add `address` to your `INSTALLED_APPS` list in `settings.py`:\n\n```python\nINSTALLED_APPS = [\n    # ... \n    'address',\n    # ... \n]\n```\n\nYou can either store your Google API key in an environment variable as `GOOGLE_API_KEY` or you can\n specify the key in `settings.py`. If you have an environment variable set it will override what you put in settings.py.\n For more information, including enabling the Google Places API, refer to [the example site](https://github.com/furious-luke/django-address/blob/master/example_site/README.md).\n \n```\nGOOGLE_API_KEY = 'AIzaSyD--your-google-maps-key-SjQBE'\n```\n\n# The Model\n\nThe rationale behind the model structure is centered on trying to make\nit easy to enter addresses that may be poorly defined. The model field included\nuses Google Maps API v3 (via the nicely done [geocomplete jquery plugin](http://ubilabs.github.io/geocomplete/)) to\ndetermine a proper address where possible. However if this isn't possible the\nraw address is used and the user is responsible for breaking the address down\ninto components.\n\nIt's currently assumed any address is represent-able using four components:\ncountry, state, locality and street address. In addition, country code, state\ncode and postal code may be stored, if they exist.\n\nThere are four Django models used:\n\n```\n  Country\n    name\n    code\n\n  State\n    name\n    code\n    country -\u003e Country\n\n  Locality\n    name\n    postal_code\n    state -\u003e State\n\n  Address\n    raw\n    street_number\n    route\n    locality -\u003e Locality\n```\n\n# Address Field\n\nTo simplify storage and access of addresses, a subclass of `ForeignKey` named\n`AddressField` has been created. It provides an easy method for setting new\naddresses.\n\n## ON_DELETE behavior of Address Field\n\nBy default, if you delete an Address that is related to another object, \nDjango's [cascade behavior](https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.on_delete) \nis used. This means the related object will also be deleted. You may also choose\nto set `null=True` when defining an address field to have the address set\nto Null instead of deleting the related object. For more information and an example,\nsee the readme for the `django-address` example_site.\n \n## Creation\n\nIt can be created using the same optional arguments as a ForeignKey field.\nFor example:\n\n```python\n  from address.models import AddressField\n\n  class MyModel(models.Model):\n    address1 = AddressField()\n    address2 = AddressField(related_name='+', blank=True, null=True)\n```\n\n## Setting Values\n\nValues can be set either by assigning an Address object:\n\n```python\n  addr = Address(...)\n  addr.save()\n  obj.address = addr\n```\n\nOr by supplying a dictionary of address components:\n\n```python\n  obj.address = {'street_number': '1', 'route': 'Somewhere Ave', ...}\n```\n\nThe structure of the address components is as follows:\n\n```python\n  {\n    'raw': '1 Somewhere Ave, Northcote, VIC 3070, AU',\n    'street_number': '1',\n    'route': 'Somewhere Ave',\n    'locality': 'Northcote',\n    'postal_code': '3070',\n    'state': 'Victoria',\n    'state_code': 'VIC',\n    'country': 'Australia',\n    'country_code': 'AU'\n  }\n```\n\nAll except the `raw` field can be omitted. In addition, a raw address may\nbe set directly:\n\n```python\nobj.address = 'Out the back of 1 Somewhere Ave, Northcote, Australia'\n```\n\n## Getting Values\n\nWhen accessed, the address field simply returns an Address object. This way\nall components may be accessed naturally through the object. For example::\n\n```python\n  route = obj.address.route\n  state_name = obj.address.locality.state.name\n```\n\n## Forms\n\nIncluded is a form field for simplifying address entry. A Google maps\nauto-complete is performed in the browser and passed to the view. If\nthe lookup fails the raw entered value is used.\n\nTODO: Talk about this more.\n\n## Partial Example\n\nThe model:\n\n```python\nfrom address.models import AddressField\n\nclass Person(models.Model):\n  address = AddressField(on_delete=models.CASCADE)\n```\n\nThe form:\n\n```python\nfrom address.forms import AddressField\n\nclass PersonForm(forms.Form):\n  address = AddressField()\n```\n\nThe template:\n\n```html\n\u003chead\u003e\n{{ form.media }} \u003c!-- needed for JS/GoogleMaps lookup --\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  {{ form }}\n\u003c/body\u003e\n```\n\n## Running Django-Address Tests\nDjango-address currently has partial form and model test coverage using `django.test.TestCase`.\n\nTo run the current tests:\n\n 1. [Clone](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) `django-address` locally.\n 1. Navigate to the example site, . `/django-address/example_site`\n 1. Create a [virtual environment](https://www.tangowithdjango.com/book17/chapters/requirements.html#virtual-environments) and install the example site dependencies. For example:\n \n    ```\n    mkvirtualenv -p python3 django-address\n    pip install -r requirements.txt\n    ```\n 1. Run `./manage.py test`\n\n## Important note regarding US Territories\nDjango-address does not currently support the parsing of US territories aka Protectorates such as Guam or Puerto Rico.\n\nThis topic is under active consideration and its status is described in [#82](https://github.com/furious-luke/django-address/issues/82)\n \n## Project Status Notes\n\nThis library was created by [Luke Hodkinson](@furious-luke) originally focused on Australian addresses.\n\nIn 2015 Luke began working to abstract the project so it could handle a wider variety of international addresses.\n\nThis became the current `dev` branch.  While good progress was made on this, the branch became stale and releases\ncontinued under the current model architecture on master. \n\nThe project is currently in open development, read more about the project status [in this issue](https://github.com/furious-luke/django-address/issues/98).  \n\nIf you have questions, bug reports or suggestions please create a New Issue for the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffurious-luke%2Fdjango-address","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffurious-luke%2Fdjango-address","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffurious-luke%2Fdjango-address/lists"}