invalid literal for int() with base 10: 'social'
/ category /social/でページを開こうとすると次のエラーが発生します。
def all_partners(request,category):
p = Content.objects.filter(category_id=category)
return render_to_response('reserve/templates/category.html', {'p':p},
context_instance=RequestContext(request))
class ContentCategory(models.Model):
content_category = models.CharField('User-friendly name', max_length = 200)
def __unicode__(self):
return self.content_category
class Content(models.Model):
category = models.ForeignKey(ContentCategory)
external = models.CharField('User-friendly name', max_length = 200, null=True, blank=True)
host = models.CharField('Video host', max_length = 200, null=True, blank=True)
slug = models.CharField('slug', max_length = 200, null=True, blank=True)
def __unicode__(self):
return self.slug
url(r'^category/(?P<category>[-\w]+)/$', 'all_partners'),
これを修正する方法について何かアイデアはありますか?"p = Content..."
エラーはラインにあると思います。