redsolution / django-generic-ratings

This application provides rating functionality to a Django project. (forked from https://bitbucket.org/frankban/django-generic-ratings)
http://readthedocs.org/projects/django-generic-ratings/
MIT License
7 stars 2 forks source link

Can't import ratings.view, can not import name forms? #1

Closed bschollnick closed 13 years ago

bschollnick commented 13 years ago

Folks,

I'm new to Django, so I suspect that I have missed something... But I have followed the install process, and when I go to now open a page on my Django app, I am getting an error:

ViewDoesNotExist at /accounts/bschollnick3/activate/bed5f5b57666dc2515684f8cd7155d9396ecc90e/ Could not import ratings.views. Error was: cannot import name forms Request Method: GET Request URL: http://127.0.0.1:8000/accounts/bschollnick3/activate/bed5f5b57666dc2515684f8cd7155d9396ecc90e/ Django Version: 1.3 Exception Type: ViewDoesNotExist Exception Value:
Could not import ratings.views. Error was: cannot import name forms

As far as I can tell, everything is configured right...

Any suggestions?

bschollnick commented 13 years ago

Template error

In template /Users/Benjamin/dropbox/Programming/django/Versions2/VersionCheck/templates/indigo-plugin-details.html, error at line 40 'ratings_tags' is not a valid tag library: ImportError raised loading ratings.templatetags.ratings_tags: cannot import name forms 30 31
32 33 Author's WebSite {{ IndigoPlugin.author.Authorwebsite }} 34 35
36 37 Author's
Email
{{ IndigoPlugin.author.Author_email }} 38 39
40 {% load ratings_tags %} 41
42 {% get_rating_score for film as score %} 43
44 {% if score %} 45 Average score: {{ score.average|floatformat }} 46 Number of votes: {{ score.num_votes }} 47 {% else %} 48 How sad: nobody voted {{ film }} 49 {% endif %} 50

Environment:

Request Method: GET Request URL: http://127.0.0.1:8000/Details/External%20IP%20Address%20&%20Dynamic%20DNS%20Updater

Django Version: 1.3 Python Version: 2.7.1 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.humanize', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'easy_thumbnails', 'guardian', 'ratings', 'userena', 'VersionCheck', 'VersionCheck.profiles', 'userena.contrib.umessages'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'userena.middleware.UserenaLocaleMiddleware')

Template error: In template /Users/Benjamin/dropbox/Programming/django/Versions2/VersionCheck/templates/indigo-plugin-details.html, error at line 40 'ratings_tags' is not a valid tag library: ImportError raised loading ratings.templatetags.ratings_tags: cannot import name forms 30 :

31 :

32 :

33 : Author's WebSite {{ IndigoPlugin.author.Authorwebsite }}

34 :

35 :

36 :

37 : Author's
Email
{{ IndigoPlugin.author.Author_email }}

38 :

39 :

40 : {% load ratings_tags %}

41 :

42 : {% get_rating_score for film as score %}

43 :

44 : {% if score %}

45 : Average score: {{ score.average|floatformat }}

46 : Number of votes: {{ score.num_votes }}

47 : {% else %}

48 : How sad: nobody voted {{ film }}

49 : {% endif %}

50 :

Traceback: File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in get_response

  1. response = callback(request, _callback_args, *_callback_kwargs) File "/Users/Benjamin/dropbox/Programming/django/Versions2/../Versions2/VersionCheck/views.py" in ip_details
  2. return render_to_response ( 'indigo-plugin-details.html', {'IndigoPlugin':plugin_information[0]}) File "/Library/Python/2.7/site-packages/django/shortcuts/init.py" in render_to_response
  3. return HttpResponse(loader.render_to_string(_args, *_kwargs), **httpresponse_kwargs) File "/Library/Python/2.7/site-packages/django/template/loader.py" in render_to_string
  4. t = get_template(template_name) File "/Library/Python/2.7/site-packages/django/template/loader.py" in get_template
  5. template, origin = find_template(template_name) File "/Library/Python/2.7/site-packages/django/template/loader.py" in find_template
  6. source, display_name = loader(name, dirs) File "/Library/Python/2.7/site-packages/django/template/loader.py" in call
  7. return self.load_template(template_name, template_dirs) File "/Library/Python/2.7/site-packages/django/template/loader.py" in load_template
  8. template = get_template_from_string(source, origin, template_name) File "/Library/Python/2.7/site-packages/django/template/loader.py" in get_template_from_string
  9. return Template(source, origin, name) File "/Library/Python/2.7/site-packages/django/template/base.py" in init
  10. self.nodelist = compile_string(template_string, origin) File "/Library/Python/2.7/site-packages/django/template/base.py" in compile_string
  11. return parser.parse() File "/Library/Python/2.7/site-packages/django/template/base.py" in parse
  12. compiled_result = compile_func(self, token) File "/Library/Python/2.7/site-packages/django/template/defaulttags.py" in load
  13. (taglib, e))

Exception Type: TemplateSyntaxError at /Details/External IP Address & Dynamic DNS Updater Exception Value: 'ratings_tags' is not a valid tag library: ImportError raised loading ratings.templatetags.ratings_tags: cannot import name forms

bschollnick commented 13 years ago

v0.03 fixes this issue. Thanks for the quick response...