Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

django-francedata

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-francedata

A Django app to provide a database structure, API and import scripts to manage French communes, intercommunalités, départements and régions, with their structure and data from Insee and the DGCL.

  • 0.16.2
  • PyPI
  • Socket score

Maintainers
1

.. image:: https://badge.fury.io/py/django-francedata.svg :target: https://pypi.org/project/django-francedata/

.. image:: https://github.com/entrepreneur-interet-general/django-francedata/actions/workflows/django.yml/badge.svg :target: https://github.com/entrepreneur-interet-general/django-francedata/actions/workflows/django.yml

.. image:: https://github.com/entrepreneur-interet-general/django-francedata/actions/workflows/codeql-analysis.yml/badge.svg :target: https://github.com/entrepreneur-interet-general/django-francedata/actions/workflows/codeql-analysis.yml

================= Django-Francedata

Provides a database structure, API and import scripts to manage French communes, intercommunalités, départements and régions, with their structure and data from Insee and the DGCL.

This app was created as a part of Open Collectivités <https://github.com/entrepreneur-interet-general/opencollectivites>_.

Unaccent extension ##################

If the PostgreSQL user specified in the Django settings is not a superuser, connect to the postgres user and create the Unaccent extension manually::

psql
\c <dbname>
"CREATE EXTENSION  IF NOT EXISTS unaccent;"

Quickstart ##########

  1. Add "francedata" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [ ... "django_json_widget", "simple_history", "francedata", ]

  2. Run python manage.py migrate to create the francedata models.

  3. Run the two initialization commands to get the communes, EPCIs, départements and régions structure::

    python manage.py cog_import python manage.py banatic_import

  4. Visit http://127.0.0.1:8000/admin/ to see the data.

Commands ########

cog_import:


  • goal: load the following data from the Code officiel géographique (COG): list of regions, departements and communes, with how they are linked and:
    • insee and siren ids for the regions/departements
    • insee for the communes
  • parameters:

banatic_import:


Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc