Giter Site home page Giter Site logo

django-municipios's People

Contributors

cadu-leite avatar douglas avatar joilsonmarques avatar leandrolbueno avatar lskbr avatar luizvital avatar luzfcb avatar viniciuscb avatar zokis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-municipios's Issues

Resolução reversa da URL pro base_url.js não funciona se instalo o django-municipios como um pacote

Olá,

Estou tentando usar o django-municipios em um projeto. Inicialmente, instalei ele via pip e segui as instruções do README -- incluindo colocar o URLConf.

O que acontece, porém, é que a URL do base_url.js passada pelo SelectMunicipioWidget.Media é a seguinte:

<script type="text/javascript" src="/base_url.js"></script>

Quando deveria ser

<script type="text/javascript" src="/municipios/base_url.js"></script>

Quando, em vez de usar o pacote instalado pelo pip, eu copio o municipios/ pra raiz do projeto, ele faz do jeito certo.

Será que fiz algo errado na instalação?


Analisando melhor, vi que isso deve ser ter a ver com uma das últimas linhas de código do municipios/widgets.py:

base_url_js = reverse_lazy('municipios-base-url-js')

Minha teoria:

Ao tentar reverter a URL usando o pacote instalado, o django não vê que tem um projeto incluindo o URLConf do municipios, e que portanto ele deve colocar o municipios/ na frente da URL.

Quando tenta reverter a URL usando a app no próprio diretório do projeto, ele consegue "perceber" e coloca o caminho na frente.

Import incorreto de modulo removido no django 1.6

ImportError at /
No module named defaults
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.6
Exception Type: ImportError
Exception Value:
No module named defaults
Exception Location: /home/sutransdev/1envs_virtualenv/projetoposto-dev/local/lib/python2.7/site-packages/municipios/urls.py in , line 1
Python Executable: /home/sutransdev/1envs_virtualenv/projetoposto-dev/bin/python
Python Version: 2.7.5
Python Path:
['/home/sutransdev/projetos/projetoposto/projetoposto/projetoposto',
'/home/sutransdev/1envs_virtualenv/projetoposto-dev/src/django-userena',
'/home/sutransdev/projetos/projetoposto/projetoposto/projetoposto',
'/home/sutransdev/projetos/projetoposto/projetoposto',
'/home/sutransdev/1envs_virtualenv/projetoposto-dev/lib/python2.7',
'/home/sutransdev/1envs_virtualenv/projetoposto-dev/lib/python2.7/plat-x86_64-linux-gnu',
'/home/sutransdev/1envs_virtualenv/projetoposto-dev/lib/python2.7/lib-tk',
'/home/sutransdev/1envs_virtualenv/projetoposto-dev/lib/python2.7/lib-old',
'/home/sutransdev/1envs_virtualenv/projetoposto-dev/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/sutransdev/1envs_virtualenv/projetoposto-dev/local/lib/python2.7/site-packages',
'/home/sutransdev/projetos/projetoposto/projetoposto/projetoposto/projetoposto',
'/home/sutransdev/projetos/projetoposto/projetoposto/projetoposto']
Server time: Qua, 6 Nov 2013 15:12:35 -0300

Licenciamento

Opa,

Seria uma boa colocar uma licença. Recomendo a LGPLv3. ;-)

Falta o release no PyPI

Olá pessoal da ZNC!

Tchurma, acho que vocês publicaram este release da lib aqui no Github, mas esqueceram de puxar para o PyPI.

A versão do PyPI não tem migrações e falha em Django 1.10.

Abraços

Fixture de cidade e municipios

Disponibilizar fixture de cidade e municipios.

json + zip. talvez abrir um outro projeto !?!
talvez coloque em um server meu.

mas é possível pegar no ibge. só mais complicado. se não rolar este finds (28/05/2011)
pode cobrar.
[]s

Pequenas atualizações para o suporte ao Django 1.10

Erro 1:
O mapeamento Regular Expression para views no urls.py está sendo feito com strings ao invés das assinaturas das funções, e na versão Django 1.10 isso não será mais permitido.
Erro 2:
Também no urls.py, a variável global "urlpatterns" precisa receber uma lista python, e não mais um retorno de "patterns()"

O Django 1.9 já está exibindo um Warning destes erros.

python2.7/site-packages/municipios/urls.py:12: RemovedInDjango110Warning: Support for string view arguments to url() is deprecated and will be removed in Django 1.10 (got teste). Pass the callable instead.
python2.7/site-packages/municipios/urls.py:12: RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead.

Se eu tiver tempo, mandarei um pull request. Mas pelo menos já estou avisando.

BTW, excelente projeto, parabéns.

add 1st Migration

Precisa adicionar uma migration para ficar compatível com Django 1.7

Fazer merge

Fazer um merge considerando as alterações feitas no modelo e settings

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.