How to fix "File is not a zip file" - django

I am trying to upload some data representing information about products.
The first row of my excel file represents the id of the product.
The data in the column cells (begin from the 2nd row and then) represent serial numbers.
I can not upload successfully my .xls file , taking back the error File is not a zip file.
my view
def excel_view(request):
if "GET" == request.method:
return render(request, 'excel/excel_form.html', {})
else:
excel_file = request.FILES["excel_file"]
# you may put validations here to check extension or file size
wb = openpyxl.load_workbook(excel_file)
sheet_obj = wb.active
# getting a particular sheet by name out of many sheets
worksheet = wb["Sheet1"]
# print(worksheet)
excel_data = list()
# iterating over the rows and
# getting value from each cell in row
#flag=0
header_list=[] #list to store drug index
input_dict={} #dict to store serial numbers per drug
i = 0 #index of columns
j = 0 #index of rows
for row in worksheet.iter_rows():
....
my template
<title>
Excel file upload and processing
</title>
<body style="margin-top: 30px;margin-left: 30px;">
<h1>Excel file upload and processing</h1>
<form action="{% url 'excel_functionality' %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<input type="file"
title="Upload excel file"
name="excel_file"
style="border: 1px solid black; padding: 5px;"
required="required">
<p>
<input type="submit"
value="Upload"
style="border: 1px solid green; padding:5px; border-radius: 2px; cursor: pointer;">
</form>
my Traceback
Environment:
Request Method: POST
Request URL: http://example/excel/
Django Version: 1.11.16
Python Version: 2.7.12
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'bootstrap3',
'bootstrap_themes',
'intranet',
'crispy_forms',
'fm',
'dal',
'dal_select2',
'django_crontab',
'django_tables2',
'django_filters']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/www/vhosts/intranet.health-nutrition.gr/health_nutrition/intranet/views.py" in excel_view
3355. wb = openpyxl.load_workbook(excel_file)
File "/usr/local/lib/python2.7/dist-packages/openpyxl/reader/excel.py" in load_workbook
174. archive = _validate_archive(filename)
File "/usr/local/lib/python2.7/dist-packages/openpyxl/reader/excel.py" in _validate_archive
124. archive = ZipFile(f, 'r', ZIP_DEFLATED)
File "/usr/lib/python2.7/zipfile.py" in __init__
770. self._RealGetContents()
File "/usr/lib/python2.7/zipfile.py" in _RealGetContents
811. raise BadZipfile, "File is not a zip file"
Exception Type: BadZipfile at /excel/
Exception Value: File is not a zip file
Why this happened, any idea?

Related

MemoryError when passing big QuerySet from Views to Template (Django, PostgreSQL)

I'm building a GIS-related web application, and the way it displays the contents of the database on a map is pretty straightforward: the view collects several (currently 122) GeoJSON files and passes them to the template. The template iterates all of them and displays them (using Leaflet). However, I cannot manage to make it work, as every attempt results in a Memory Error.
The database I'm using is a PostgreSQL one, in case it helps. I'm also using a TextField in the model, is it possible that to be source of the issue?
Any advice will be much appreciated :)
The view:
geodata = GeojsonData.objects.filter(connection = my_con).iterator()
view = "map"
return render(request, "map.html", {'geojsonData': geodata})
The template:
{% for dat in geojsonData %}
{% with dat.name as name %}
{% with dat.geodata as gj %}
{{gj}}
L.geoJSON(name).addTo(map);
{% endwith %}
{% endwith %}
{% endfor %}
The model:
class GeojsonData(models.Model):
name = models.CharField(max_length=2000, unique=True)
connection= models.ForeignKey(Connection, related_name='Connection', default=1)
geodata = models.TextField()
The traceback:
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/map/1/
Django Version: 1.11.4
Python Version: 3.6.2
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'myapp.apps.myappConfig']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "C:\Users\Xabi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\exception.py" in inner
41. response = get_response(request)
File "C:\Users\Xabi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "C:\Users\Xabi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\handlers\base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\Xabi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\contrib\auth\decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "C:\Users\Xabi\Desktop\...\views.py" in mapa
92. return render(request, "map.html", {'geojsonData': geodata})
File "C:\Users\Xabi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\shortcuts.py" in render
31. return HttpResponse(content, content_type, status)
File "C:\Users\Xabi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\http\response.py" in __init__
303. self.content = content
File "C:\Users\Xabi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\http\response.py" in content
336. content = self.make_bytes(value)
File "C:\Users\Xabi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\http\response.py" in make_bytes
247. return bytes(value.encode(self.charset))
File "C:\Users\Xabi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\functional.py" in _curried
15. return _curried_func(*(args + moreargs), **dict(kwargs, **morekwargs))
File "C:\Users\Xabi\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\safestring.py" in _proxy_method
107. return SafeBytes(data)
Exception Type: MemoryError at /map/1/
Exception Value:
Not sure if you've already solved your problem. But maybe instead of doing the loop in your template, you can do the loop in python and pass the end result to your template?

pass argument to view with reverse django

I have a view create_rating where after I submit a form I want it to be processed on a view rating_upload and then i want to redirect back to the create_rating view. Cant seem to get it to work, my latest code below. I would think when i click submit on the create-rating page that it should send video_id to rating_upload, and from there I can just send it back to create_rating as an argument. The docs show this too. I tried several things the latest error is what i have shown..
urls:
urlpatterns = [
url(r'^upload', UploadVideo.as_view(), name='upload'),
url(r'^(?P<pk>[0-9]+)/$', VideoView.as_view(), name='videoview'),
url(r'^(?P<video_id>\d+)/create_rating', create_rating, name='create_rating'),
url(r'^(?P<video_id>\d+)/rating_upload', rating_upload, name='rating_upload'),
url(r'^(?P<video_id>\d+)/rating_uploaded', rating_upload, name='rating_upload')
]
views:
def create_rating(request, video_id):
vid = get_object_or_404(Video, pk=video_id)
past_ratings = vid.rating.order_by('date_created')[:5]
template = loader.get_template('create_rating.html')
context = {
'vid': vid, 'past_ratings': past_ratings
}
return HttpResponse(template.render(context, request))
def rating_upload(request, video_id):
template = loader.get_template('rating_upload.html')
rated_video = Video.objects.get(pk=video_id)
context = {
'rated_video': rated_video
}
return HttpResponseRedirect(reverse('create_rating', video_id))
template, create_rating.html:
<p>{{ vid.title }}</p>
<form action="{% url 'rating_upload' vid.pk %}" method="post">
{% csrf_token %}
<input type="text" name="rate_comment">
<input type="submit" value="Rate Video">
Latest error:
Request Method: POST
Request URL: http://127.0.0.1:8000/video/32/rating_uploaded
Django Version: 1.10.5
Python Version: 2.7.10
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'video']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/Users/RyanHelling/virtualenvs/env1/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
39. response = get_response(request)
File "/Users/RyanHelling/virtualenvs/env1/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/Users/RyanHelling/virtualenvs/env1/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/RyanHelling/PycharmProjects/flash2/video/views.py" in rating_upload
63. return HttpResponseRedirect(reverse('create_rating', video_id))
Exception Type: TypeError at /video/32/rating_uploaded
Exception Value: an integer is required
Try
return HttpResponseRedirect(reverse('create_rating', args=(video_id,)))
instead of
return HttpResponseRedirect(reverse('create_rating', video_id))
Documentation suggests passing your args as a tuple.

django-debug-toolbar: 'list' does not support the buffer interface

I made a few modifications to my model, adding some image fields and installing Pillow, deleteing some models or model fields.
As Site is not yet in production, I simply dropped the database and re-created it, and synced it. Then I got this error.
I can't figure out what could be the source of this sudden error. In the settings.py I added a media_root but nothing else.
Environment:
Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.6.2
Python Version: 3.4.0
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'backoffice',
'public',
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.google',
'allauth.socialaccount.providers.twitter',
'widget_tweaks',
'rosetta',
'debug_toolbar',
'template_debug')
Installed Middleware:
('debug_toolbar.middleware.DebugToolbarMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')
Template error:
In template C:\Python34\lib\site-packages\debug_toolbar\templates\debug_toolbar\base.html, error at line 5
'list' does not support the buffer interface
1 : {% load i18n %}{% load static from staticfiles %}{% load url from future %}
2 : <style type="text/css">
3 : #media print { #djDebug {display:none;}}
4 : </style>
5 : <link rel="stylesheet" href=" {% static 'debug_toolbar/css/toolbar.css' %} " type="text/css" />
6 : {% if toolbar.config.JQUERY_URL %}
7 : <script src="{{ toolbar.config.JQUERY_URL }}"></script>
8 : <script>var djdt = {jQuery: jQuery.noConflict(true)};</script>
9 : {% else %}
10 : <script>var djdt = {jQuery: jQuery};</script>
11 : {% endif %}
12 : <script src="{% static 'debug_toolbar/js/toolbar.js' %}"></script>
13 : <div id="djDebug" style="display:none;" dir="ltr"
14 : data-store-id="{{ toolbar.store_id }}" data-render-panel-url="{% url 'djdt:render_panel' %}"
15 : {{ toolbar.config.ROOT_TAG_EXTRA_ATTRS|safe }}>
Traceback:
File "C:\Python34\lib\site-packages\django\core\handlers\base.py" in get_response
201. response = middleware_method(request, response)
File "C:\Python34\lib\site-packages\debug_toolbar\middleware.py" in process_response
121. bits[-2] += toolbar.render_toolbar()
File "C:\Python34\lib\site-packages\debug_toolbar\toolbar.py" in render_toolbar
68. return render_to_string('debug_toolbar/base.html', context)
File "C:\Python34\lib\site-packages\django\template\loader.py" in render_to_string
164. return t.render(Context(dictionary))
File "C:\Python34\lib\site-packages\django\template\base.py" in render
140. return self._render(context)
File "C:\Python34\lib\site-packages\django\test\utils.py" in instrumented_test_render
85. return self.nodelist.render(context)
File "C:\Python34\lib\site-packages\django\template\base.py" in render
840. bit = self.render_node(node, context)
File "C:\Python34\lib\site-packages\django\template\debug.py" in render_node
78. return node.render(context)
File "C:\Python34\lib\site-packages\django\templatetags\static.py" in render
106. url = self.url(context)
File "C:\Python34\lib\site-packages\django\contrib\staticfiles\templatetags\staticfiles.py" in url
12. return staticfiles_storage.url(path)
File "C:\Python34\lib\site-packages\django\utils\functional.py" in inner
213. self._setup()
File "C:\Python34\lib\site-packages\django\contrib\staticfiles\storage.py" in _setup
311. self._wrapped = get_storage_class(settings.STATICFILES_STORAGE)()
File "C:\Python34\lib\site-packages\django\contrib\staticfiles\storage.py" in __init__
37. *args, **kwargs)
File "C:\Python34\lib\site-packages\django\core\files\storage.py" in __init__
154. self.location = abspathu(self.base_location)
File "C:\Python34\lib\ntpath.py" in abspath
545. path = _getfullpathname(path)
Exception Type: TypeError at /
Exception Value: 'list' does not support the buffer interface
All right, my fault. Error was in fact pretty explicit.
Unlike the TEMPLATE_DIRS, MEDIA_ROOT is not supposed to be a list.
Django Debug toolbar will return an error every time you mess up with variables types in
the "settings.py" file.
In case anyone does similar mistakes, I'll leave Q&A here.

django-openid-auth: TemplateSyntaxError

I'm trying to set up django-openid-auth on my django project. I've followed steps 1-8 of the provided guide and have tried going to /openid/login/ on my server. However, when I go to that page I see
TemplateSyntaxError at /openid/login/
Could not parse the remainder: '-logo' from 'openid-logo'. The syntax of 'url' changed in Django 1.5, see the docs.
I'm a bit confused since this is in a template included in the app - I didn't write the template myself. If anybody knows what I'm doing wrong, I'd really appreciate some help.
Here's my stacktrace:
Environment:
Request Method: GET
Request URL: http://localhost:8000/openid/login/
Django Version: 1.5.2
Python Version: 2.7.5
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'wseeruploader.apps.fileupload',
'django_openid_auth',
'crispy_forms')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Template error:
In template /usr/lib/python2.7/site-packages/django_openid_auth/templates/openid/login.html, error at line 8
Could not parse the remainder: '-logo' from 'openid-logo'. The syntax of 'url' changed in Django 1.5, see the docs.
1 : {% load i18n %}
2 : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
3 : <html>
4 : <head>
5 : <title>Sign in with your OpenID</title>
6 : <style type="text/css">
7 : input.openid {
8 : background: url( {% url openid-logo %} ) no-repeat;
9 : background-position: 0 50%;
10 : padding-left: 16px;
11 : }
12 : </style>
13 : </head>
14 : <body>
15 : <h1>Sign in with your OpenID</h1>
16 : {% if form.errors %}
17 : <p class="errors">{% trans "Please correct errors below:" %}<br />
18 : {% if form.openid_identifier.errors %}
Traceback:
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
115. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/site-packages/django_openid_auth/views.py" in login_begin
171. }, context_instance=RequestContext(request))
File "/usr/lib/python2.7/site-packages/django/shortcuts/__init__.py" in render_to_response
29. return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
File "/usr/lib/python2.7/site-packages/django/template/loader.py" in render_to_string
170. t = get_template(template_name)
File "/usr/lib/python2.7/site-packages/django/template/loader.py" in get_template
146. template, origin = find_template(template_name)
File "/usr/lib/python2.7/site-packages/django/template/loader.py" in find_template
135. source, display_name = loader(name, dirs)
File "/usr/lib/python2.7/site-packages/django/template/loader.py" in __call__
43. return self.load_template(template_name, template_dirs)
File "/usr/lib/python2.7/site-packages/django/template/loader.py" in load_template
49. template = get_template_from_string(source, origin, template_name)
File "/usr/lib/python2.7/site-packages/django/template/loader.py" in get_template_from_string
157. return Template(source, origin, name)
File "/usr/lib/python2.7/site-packages/django/template/base.py" in __init__
125. self.nodelist = compile_string(template_string, origin)
File "/usr/lib/python2.7/site-packages/django/template/base.py" in compile_string
153. return parser.parse()
File "/usr/lib/python2.7/site-packages/django/template/base.py" in parse
274. compiled_result = compile_func(self, token)
File "/usr/lib/python2.7/site-packages/django/template/defaulttags.py" in url
1266. viewname = parser.compile_filter(bits[1])
File "/usr/lib/python2.7/site-packages/django/template/base.py" in compile_filter
353. return FilterExpression(token, self)
File "/usr/lib/python2.7/site-packages/django/template/base.py" in __init__
570. "from '%s'" % (token[upto:], token))
Exception Type: TemplateSyntaxError at /openid/login/
Exception Value: Could not parse the remainder: '-logo' from 'openid-logo'. The syntax of 'url' changed in Django 1.5, see the docs.
Since you are using django-1.5
You should change:
{% url openid-logo %}
to
{% url 'openid-logo' %}
Relevant documentation can be found in the release notes
The upshot of this is that if you are not using {% load url from future %} in your templates, you’ll need to change tags like {% url myview %} to {% url "myview" %}. If you were using {% load url from future %} you can simply remove that line under Django 1.5

can I use Django comment on other pages?

I wonder whether it is possible to use Django in-built comments framework for other pages, that is not related to "blog entries". For example I want to add comments field on each every page about a movie.
I tried to follow the instructions here https://docs.djangoproject.com/en/dev/ref/contrib/comments/ but got the following error. I already added the necessary APP, and did syncdb.
Environment:
Request Method: GET
Request URL: http://localhost:8000/movie/603/
Django Version: 1.4
Python Version: 2.7.2
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'forms',
'social_auth')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Template error:
In template C:\xampp\htdocs\tddd27_project\templates\movie_info.html, error at line 3
'comments' is not a valid tag library: Template library comments not found, tried django.templatetags.comments,django.contrib.staticfiles.templatetags.comments,django.contrib.admin.templatetags.comments,forms.templatetags.comments
1 : {% extends "base.html" %}
2 : {% load string_extras %}
3 : {% load comments %}
4 : {% block title %}{{ content.original_title }}{% endblock title %}
5 : {% block content %}
6 :
7 : <h2>{{ content.original_title }} - ({{ content.release_date|year}})</h2>
8 : <table>
9 : <tr>
10 : <td><img src="http://cf2.imgobject.com/t/p/w185/{{ content.poster_path}}"></td>
11 : <td>{{ content.overview }}</td>
12 : </tr>
13 :
Traceback:
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\core\handlers\base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "C:\xampp\htdocs\tddd27_project\views.py" in movie_view
65. return render_to_response('movie_info.html',{'content':content}, RequestContext(request))
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\shortcuts\__init__.py" in render_to_response
20. return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\loader.py" in render_to_string
169. t = get_template(template_name)
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\loader.py" in get_template
145. template, origin = find_template(template_name)
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\loader.py" in find_template
134. source, display_name = loader(name, dirs)
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\loader.py" in __call__
42. return self.load_template(template_name, template_dirs)
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\loader.py" in load_template
48. template = get_template_from_string(source, origin, template_name)
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\loader.py" in get_template_from_string
156. return Template(source, origin, name)
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\base.py" in __init__
125. self.nodelist = compile_string(template_string, origin)
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\base.py" in compile_string
153. return parser.parse()
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\base.py" in parse
267. compiled_result = compile_func(self, token)
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\loader_tags.py" in do_extends
214. nodelist = parser.parse()
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\base.py" in parse
267. compiled_result = compile_func(self, token)
File "c:\tools\python27\lib\site-packages\django-1.4-py2.7.egg\django\template\defaulttags.py" in load
1043. (taglib, e))
Exception Type: TemplateSyntaxError at /movie/603/
Exception Value: 'comments' is not a valid tag library: Template library comments not found, tried django.templatetags.comments,django.contrib.staticfiles.templatetags.comments,django.contrib.admin.templatetags.comments,forms.templatetags.comments
Can you see something missing here?
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'forms',
'social_auth')
django.contrib.comments does not appear to be in that list...