I have added related_name to text1 and text2, so at least syncdb
worked, but how can I now make this query.
In manager:
self.compare_set.filter(~Q(Q(compare__user=request.user)(Q(compare__text1__id=id)|
Q(compare__text2__id=id.all()
this doesn't work
--
You received this message because
I have model of text, like that:
class Text(models.Model):
text = models.CharField()
user = models.ForeignKey(User) #author
And i need to compare two of texts, so i need table like this:
class Compare(models.Model):
text1 = models.ForeignKey(Text)
text2 =
Hello, this is rather python problem, but maybe You can help. What i
want to do is to return value in another function calling from other
function.
It doesnt mean i want this:
def Func():
return 1
def Func2():
return Func()
I want function Func to return 1 directly in Func2 as it is
Hello, i want to make function that wraps all things related to
comments, so there should be part that gets comments from database and
part that checks if comment was added. Then i can simply write just
one line of code in view where i want comments. Problem is that after
successful comment post,
4 matches
Mail list logo