asifpy / django-crudbuilder

Generic CRUD implementation in Django
https://django-crudbuilder.readthedocs.org/en/latest/index.html
Apache License 2.0
193 stars 67 forks source link

Erro when load model of other app #7

Closed marcoshemann closed 8 years ago

marcoshemann commented 8 years ago

I have this structure cadastro/models.py /forms.py /views.py /urls.py perfil/models.py

in cadastro/views.py

from perfil.models import proxy ****>> OTHER APP .... class ProxyCrud(BaseCrudBuilder): model = Proxy search_feilds = ['nome'] tables2_fields = ('nome')

Show this error:

File "/home/wm.0.2/lib/python3.4/site-packages/crudbuilder/urls.py", line 20, in pluralized = helpers.plural(model) File "/home/wm.0.2/lib/python3.4/site-packages/crudbuilder/helpers.py", line 67, in plural if (text[-2:-1] in vowels) or (text[0] in string.uppercase): AttributeError: 'module' object has no attribute 'uppercase'

asifpy commented 8 years ago

Thanks for the bug report, it appears that Python 3 removed string.uppercase! I will check what will be compatible for both python27 and python3

asifpy commented 8 years ago

The issue is not related with different apps, its related to string module. Resolved here : https://github.com/asifpy/django-crudbuilder/commit/aa0d85d4378452f451e76b7f46a7a0c94b0f940a