Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

django-italian-utils

Build Status Coverage Status

Utility library which simplifies the creation of Italian applications

Italian README

Install

Use pypi to install the package

pip install django-italian-utils

Add italian_utils to installed apps

#...

INSTALLED_APPS = (
    # ...
    'italian_utils',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
)

# ...

Run migrations

python manage.py migrate

Contents

Validators for codice fiscale and partita iva inside your models.

from italian_utils.validators import validate_codice_fiscale, validate_partita_iva

class Persona(models.Model):
    codice_fiscale = models.CharField(
        max_length=16,
        validators=[validate_codice_fiscale]
    )

    # ...

class Azienda(models.Model):
    partita_iva = models.CharField(
        max_length=11,
        validators=[validate_partita_iva]
    )

    # ...

A dictionary of Italian region and provinces with abbreviations.

City list

You can import the CSV file containing the list of cities provided by istat with a manage.py command

python manage.py importacomuni <file_csv>

TODO

  • Link models of cities, provinces and regions using istat codes

About

Libreria di utility per semplificare la creazione di applicazioni italiane

Resources

License

Packages

No packages published

Languages