Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problemas com python 3.5.2 e django 1.9 #5

Open
FabianoAlmeidaMelo opened this issue Feb 28, 2017 · 1 comment
Open

problemas com python 3.5.2 e django 1.9 #5

FabianoAlmeidaMelo opened this issue Feb 28, 2017 · 1 comment

Comments

@FabianoAlmeidaMelo
Copy link
Contributor

  • 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...
@FabianoAlmeidaMelo
Copy link
Contributor Author

FabianoAlmeidaMelo commented Mar 1, 2017

# -*- coding: utf-8 -*-

from datetime import date

from django.forms import FloatField, DecimalField, MultiValueField, ValidationError

try:
    # python 2
    from django.utils.encoding import smart_unicode as smart_char
except:
    # python 3
    from django.utils.encoding import smart_str  as smart_char

try:
    # django < 1.9
    from widgets import BRDecimalWidget, PointWidget, BRFloatWidget
except:
    # django >= 1.9
    from localbr.widgets import BRDecimalWidget, PointWidget, BRFloatWidget

from django.forms.fields import EMPTY_VALUES
from django.utils.safestring import mark_safe
from django.forms.fields import Field
from django.contrib.gis.geos import Point
from localflavor.br import forms as lfbr_forms

import re

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant