Skip to main content

License GitHub release Ask DeepWiki Build status GitHub issues CodeQL

Django ISTAT API italian places

Django ISTAT is a Django app to localize the ISTAT API. The result is a Django app that you can plug into your existing Django project to localize the ISTAT API.

Detailed documentation is in the “docs” directory.

Quick start

  1. Add “comuni_italiani”, “rest_framework” and “django_filters” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...,
        "rest_framework",
        "django_filters",
        "comuni_italiani",
    ]

    The API filters and ?search= rely on the django-filter and DRF search backends:

    REST_FRAMEWORK = {
        "DEFAULT_FILTER_BACKENDS": [
            "django_filters.rest_framework.DjangoFilterBackend",
            "rest_framework.filters.SearchFilter",
        ],
    }
  2. Include the polls URLconf in your project urls.py like this:

    path("comuni_italiani/", include("comuni_italiani.urls")),
  3. Run python manage.py migrate to create the comuni_italiani models.

  4. Start the development server

  5. Run the management command to populate the database with the ISTAT API data:

    ``python manage.py import_istat_data``
    
    (If use the --force option, the command start without asking for confirmation)
  6. Visit http://127.0.0.1:8000/comuni-italiani/ to view the API index.

  7. Visit http://127.0.0.1:8000/comuni-italiani/regioni/ to view the API regioni.

  8. Visit http://127.0.0.1:8000/comuni-italiani/province/ to view the API province.

  9. Visit http://127.0.0.1:8000/comuni-italiani/comuni/ to view the API cities.

Metadata

Release files for django-istat-italian-places 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-istat-italian-places 0.4.0
File Size Uploaded
django_istat_italian_places-0.4.0.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-istat-italian-places 0.4.0
File Interpreter ABI Platform
django_istat_italian_places-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.7 kB

Release files / django_istat_italian_places-0.4.0.tar.gz

Download URL django_istat_italian_places-0.4.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
291426becf5b6534e024ed7e286171d6cf75849de9540300550d7c922564a290
BLAKE2b-256 checksum
How to use checksums
b70a355badf1336ebc0c4a56b7472b76f607de1a2f95992b4e5b7ccd4478b345
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / django_istat_italian_places-0.4.0-py3-none-any.whl

Download URL django_istat_italian_places-0.4.0-py3-none-any.whl
Size 27.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a70404c3ed8dcc5d578787db75192d201b702c960dd75ca9dee7ae118470466
BLAKE2b-256 checksum
How to use checksums
407caf500edd8b6edd266df379246315e7255b9dc9866a281c93020e4cb475b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7.8

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page