Coder Social home page Coder Social logo

childcrud's People

Contributors

asavi-zz avatar cauaneandrade avatar deniscostadsc avatar josethomazini avatar luizvital avatar zokis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

childcrud's Issues

problemas com childcrud e municipios: python 3.5 django 1.9

problemas com childcrud e municipios:
python 3.5
django 1.9

    from views.py import ajax_create_update, ajax_list, fk_create_update
ImportError: No module named 'views'

solução:
from childcrud.views import ajax_create_update, ajax_list, fk_create_update

-------------

  File "/home/fabiano/ENVS/escolar/src/childcrud/childcrud/views.py", line 7, in <module>
    from django.db.models import get_model, DateField, DateTimeField, BooleanField
ImportError: cannot import name 'get_model'

**
django.db.models.loading.get_models will be removed in Django 1.9 #33

solução:
from django.apps import apps
apps.get_model('shop', 'Product')

-----------------

src/childcrud/childcrud/urls.py:14: 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.
  url(r'(?P<app_name>\w+)/(?P<model_name>\w+)/$', fk_create_update, name='fk-create')

solução:
try:
    from django.conf.urls import url
except:
    from django.conf.urls.defaults import patterns, url
from municipios.views import (
    base_url_js,
    base_url_js,
    municipios_ajax,
    teste,
)


urlpatterns = [
    'municipios.views',
    url(r'^$', base_url_js, name='municipios-base-url'),
    url(r'^base_url.js$', base_url_js, name='municipios-base-url-js'),
    url(r'^ajax/municipios/(?P<uf>\w\w)/$', municipios_ajax, name='municipios-ajax'),
    url(r'^teste/', teste, name='municipios-teste'),
]

---------------
    from municipios.views import (
  File "/home/fabiano/ENVS/escolar/lib/python3.5/site-packages/municipios/views.py", line 7, in <module>
    from forms import FormMunicipio
ImportError: No module named 'forms'

solução:
from municipios.forms import FormMunicipio

-------------------------------
  File "/home/fabiano/ENVS/escolar/lib/python3.5/site-packages/municipios/forms.py", line 4, in <module>
    from widgets import SelectMunicipioWidget
ImportError: No module named 'widgets'

solução:
from municipios.widgets import SelectMunicipioWidget

-------------------------------
/lib/python3.5/site-packages/municipios/views.py", line 8, in <module>
    from models import Municipio

solução:
from municipios.models import Municipio

---------------------
AttributeError: 'str' object has no attribute 'regex'

http://stackoverflow.com/questions/36288146/django-1-9-url-include-attributeerror-str-object-has-no-attribute-regex

childcrud.urls
estava:
urlpatterns = [
    ' ',   <--- esse era o problema
    url ...
http://stackoverflow.com/questions/35551720/django-how-to-work-with-ugly-url (similar)



-------------
invalid syntax (childcrud.py, line 78)

src/childcrud/childcrud/templatetags/childcrud.py", line 79
    raise template.TemplateSyntaxError, "tag requires exactly three arguments" #  % token.contents.split()[0]

def childcrud_html(parser, token):
    try:
        # split_contents() knows not to split quoted strings.
        tag_name, parent, parent_id, child = token.split_contents()
    except ValueError:
       raise template.TemplateSyntaxError, %r tag requires exactly three arguments" % token.contents.split()[0]

    return ChildCRUDHTMLNode(parent, parent_id, child)


solução:
        msg = "%r tag requires exactly three arguments" % token.contents.split()[0]
        raise template.TemplateSyntaxError(msg)
???
-------------
childcrud.py

deprecated:#from django.db.models import get_model
trocar get_model   from django.db.models import get_model
por from django.apps import apps
usar apps.get_model

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.