Reputation: 577
I am trying to build a message tagging application, and I've been encountering this error message.
Internal Server Error: /
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
TypeError: 'unicode' object is not callable
I've been getting this error constantly, no matter what I tried, including deleting the whole models.py file.
Below are some snippets of the files.
models.py
class Tag(models.Model):
tag_name = models.CharField(max_length=100)
date_created = models.DateTimeField(auto_now_add=True)
def __unicode__(self):
return self.tag_name
views.py
def multiple(request):
qs = Tag.objects.all()
template = loader.get_template('multiple.html')
context = RequestContext(request, {
'qs': qs,
})
I'm not sure how to fix this problem, especially because it's not actually referencing any of the files that I've created.
Upvotes: 1
Views: 1994
Reputation: 6735
I think this is your problem:
urlpatterns = patterns('app.views', url(r'^$', 'multiple.'), )
^
See the dot? That breaks looking up the view function.
Upvotes: 2