Django app para aplicaciones que requieran usar los ubigeos del Perú.
Project description
# Django Ubigeo Perú
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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-ubigeo-peru-0.2.4.tar.gz
(57.8 kB
view hashes)
Built Distribution
Close
Hashes for django_ubigeo_peru-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5cb93e44885ffe08d9f4cb70dad502b9a7a793da8fc8e0dd8cd7ff506cb4cb8 |
|
MD5 | c8264356188e95d6867505c42e093018 |
|
BLAKE2b-256 | c6a8b57e086681e7fcc5e71046f49bde69ba47d38c31b7354ae9ccdb54880fd7 |