jrief / django-angular

Let AngularJS play well with Django
http://django-angular.awesto.com/
MIT License
1.23k stars 294 forks source link

[InvalidTemplateLibrary]; cannot import name 'import_by_path' #238

Closed saintcrawler closed 8 years ago

saintcrawler commented 8 years ago

Trying to install this app into clean project. Pip-installed, then added 'djangular' to the INSTALLED_APPS. But when i try to load very simple view, i've got this error: Invalid template library specified. ImportError raised when trying to load 'djangular.templatetags.djangular_tags': cannot import name 'import_by_path'. Here's my view:

def intro(request):
    return render(request, 'mf/index.html', {'greetings': 'hi there!'})

And index.html:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Minefields</title>
</head>
<body>

  <h1>{{ greetings }}</h1>

</body>
</html>

Am i dumb and forgot to add something, or is it a real error? Btw, when i tried JsonResponse first, it was fine.

P.S. virtualenv packages (using python 3.5):

Django==1.9.2
django-angular==0.7.15
wheel==0.24.0
jrief commented 8 years ago

In Django 1.9 this has been renamed to import_string. This has been fixed in the current Github version, which will be released soon.

saintcrawler commented 8 years ago

OK. Thank you!