Skip to content

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

Notifications You must be signed in to change notification settings

heraldmatias/django-ubigeo-peru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django-Ubigeo-Peru


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

Dependencias

Python

  • south

Javascript

  • jquery

Instalar

En tu settings.py

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

En tu urls.py

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

Usar

En tu models.py:

    from ubigeo.models import Ubigeo

    class MyModel(models.Model):
        name = models.CharField(max_length=120)
        ubigeo = models.ForeignKey(Ubigeo)

en tu forms.py:

    from ubigeo.models import Ubigeo
    from ubigeo.fields import UbigeoFormField
    from ubigeo import constant

    class MyModelForm(form.ModelForm):
        ubigeo = UbigeoFormFiel(ubigeo=constant.ALL)

        class Meta:
            model = Ubigeo

Opciones:

  • ONLY_PERU
  • ONLY_INTERNATIONAL
  • ALL

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published