Coder Social home page Coder Social logo

django-localbr's Introduction

django-localbr

Localization of FormFields, Widgets and etc to Brazilian Portuguese

Exemplo:

    class CadastroForm(forms.ModelForm):

        cpf = BRCPFField(always_return_formated=True, return_format=u'%s%s%s%s')

        class Meta:
            model = models.Cadastro
            fields = (
                'nome_completo',
                'cpf',
                'empresa',
                'mail',
                'celular',
            )

django-localbr's People

Contributors

luizvital avatar zokis avatar ssdboa avatar cadu-leite avatar deniscostadsc avatar josethomazini avatar leandrolbueno avatar

Stargazers

Cauane avatar

Watchers

 avatar  avatar James Cloos avatar Fabiano de Almeida Melo avatar Thiago Marra avatar  avatar Erich Rodrigues Ferrares avatar Ana Clara avatar  avatar  avatar

django-localbr's Issues

South gera erros ao utilizar BRDecimalField

Sei que não é um erro direto com este projeto, porém creio que a chance é grande de quem estiver utilizando Django, utilizar também o South Migrations, e com isso, os campos deste projeto causam erros no South:

python manage.py schemamigration vendas --initial
Creating migrations directory at '/vendas/migrations'...
Creating __init__.py in '/vendas/migrations'...
 ! Cannot freeze field 'vendas.cupomdesconto.porcentagem'
 ! (this field has class utils.modelfields.BRDecimalField)

 ! South cannot introspect some fields; this is probably because they are custom
 ! fields. If they worked in 0.6 or below, this is because we have removed the
 ! models parser (it often broke things).
 ! To fix this, read http://south.aeracode.org/wiki/MyFieldsDontWork

Já li o endereço que o South recomenda, mas não consegui entender como posso utilizar um field BRDecimalField usando o método add_introspection_rules.

Acredito que isso vale pelo menos uma dica no readme do projeto, ou senão um pedaço de código comentado nas fields, informando como fazer se tiver usando o djando-localbr com o South.

Grato.

problemas com python 3.5.2 e django 1.9

  • ImportError: cannot import name 'smart_unicode'

.../formfields.py", line 4, in

File ".../formfields.py", line 5, in

  • from widgets import BRDecimalWidget, PointWidget, BRFloatWidget
    ImportError: No module named 'widgets'
    Performing system checks...

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.