Skip to content

Django ubigeo peru es una libreria que te permitira implementar facilmente los ubigeos de peru en tus django app

License

Notifications You must be signed in to change notification settings

mbatle/django-ubigeo-peru

 
 

Repository files navigation

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

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

En tu urls.py

    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

About

Django ubigeo peru es una libreria que te permitira implementar facilmente los ubigeos de peru en tus django app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.1%
  • JavaScript 5.5%
  • HTML 4.4%