Skip to main content

Django app para aplicaciones que requieran usar los ubigeos del Perú.

Project description

# Django-Ubigeo-Peru

django-ubigeo-peru, es una app que te permitira implementar facilmente los ubigeos de la RENIEC en tus django app.

# Instalar

En tu settings.py

```python
INSTALLED_APPS = (
....
'ubigeo',
)
```


En tu urls.py

```python
urlpatterns = patterns('',
....
(r'^ubigeo/', include('ubigeo.urls')),
)
```

En tu forms.py
```
from django import forms
from ubigeo.fields import UbigeoField
from mymodels import Model


class IncidentForm(forms.ModelForm):

location = UbigeoField(required=False)
class Meta:
model = Model
fields = "__all__"
```
Puedes usar los parametros:
attrs_1 para atributos html para regiones
attrs_2 para atributos html para provincias
attrs_3 para atributos html para distritos
with_international para seleccionar con valores internacionales

# TODO
- Refactor Javascript functions to recieve a selector as an argument in the example aplication.

# Licencia
See LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django_ubigeo_peru-0.1.1.tar.gz (53.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page