class Category(models.Model):
title = models.CharField(max_length=100, db_index=True,unique=True)
slug = models.SlugField(max_length=100, unique=True)
def __unicode__(self):
return self.title
def get_absolute_url(self):
return (reverse('tags',[str(self.slug)])
class Blog(models.Model):
title = models.CharField(max_length=100, unique=True)
slug = models.SlugField(max_length=100, unique=True)
body = models.TextField()
posted = models.DateField(db_index=True, auto_now_add=True)
category = models.ManyToManyField(Category)
def __unicode__(self):
return self.title
def get_absolute_url(self):
return (reverse('posts',[str(self.slug)])
これは私のモデルであり、iveはクラスの行でばかげたエラーを受け取りました:
16行1列目で「クラス」に遭遇しました:
"(" ... ")" ... "[" ... "、"..."。"のいずれかを期待していました ... "+" ...
"-" ... "*" ... "/" ... "//" ... "<<" ... ">>" ... "% "..." ^ "..." | " ... "&" ... ">" ...
"<" ... "==" ... "<=" ... "> =" ... "<>" ... " !="..."または"..."および"..." not "..." is "..." in "..." if "..." for "..."、 「..。
どういう意味ですか?