On Saturday, March 05, 2011 07:19:23 am Bobby Roberts wrote:
> hi all... i'm banging my head against a wall here.
>
> consider this model
>
> class mymodel(models.Model):
> id = models.AutoField (primary_key=True)
> Barcode = models.IntegerField(unique = True, blank=False)
>
hi all... i'm banging my head against a wall here.
consider this model
class mymodel(models.Model):
id = models.AutoField (primary_key=True)
Barcode = models.IntegerField(unique = True, blank=False)
CustomerId= models.ForeignKey(Customer, db_index=True,
blank=True, null =
Model3(models.Model):
Goal is to get only those objects of Model1 which have model_3
field ,in Model2, equal to number let's say 201 :-)
1. main point to do foreign key search is to edit sphinx.config int he
way Sphinx can find "it's way through our tables", to create the
a
Model3(models.Model):
Goal is to get only those objects of Model1 which have model_3
field ,in Model2, equal to number let's say 201 :-)
1. main point to do foreign key search is to edit sphinx.config int he
way Sphinx can find "it's way through our tables", to create the
a
arching TextFields but I have a problem with ForeignKey field.
>>>
>>> >> How can i do that? Can anyone point me to the right direction?
>>>
>>> >> Thanks
>>>
>>> >> Model example:
>>>
>>> >> class Model1
oblem with ForeignKey field.
>>>
>>> >> How can i do that? Can anyone point me to the right direction?
>>>
>>> >> Thanks
>>>
>>> >> Model example:
>>>
>>> >> class Model1(models.Model):
>>>
>>> >>
;> searching TextFields but I have a problem with ForeignKey field.
>>
>> >> How can i do that? Can anyone point me to the right direction?
>>
>> >> Thanks
>>
>> >> Model example:
>>
>> >> class Model1(models.Model):
>>
>
>> text_field =models.TextField(max_length=250)
> >> fek_field = models.ForeignKey('Model2')
>
> >> class Model2(models.Model):
> >> text_field = models.TextField(max_length=250)
>
> >> --
> >> View this message in
>
s.ForeignKey('Model2')
>>
>> class Model2(models.Model):
>> text_field = models.TextField(max_length=250)
>>
>> --
>> View this message in
>> context:http://old.nabble.com/Django-Sphinx-Foreign-key-search-tp28219147p282...
>> Sent from
roup.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
>
--
View this mes
On 13/04/10 09:04, urukay wrote:
Hi,
I'm trying to create full text search on model, everything goes fine
when
searching TextFields but I have a problem with ForeignKey field.
How can i do that? Can anyone point me to the right direction?
Do you mean you want the results for Model2 searches
> class Model2(models.Model):
> text_field = models.TextField(max_length=250)
>
> --
> View this message in
> context:http://old.nabble.com/Django-Sphinx-Foreign-key-search-tp28219147p282...
> Sent from the django-users mailing list archive at Nabble.com.
--
You received this me
Field(max_length=250)
fek_field = models.ForeignKey('Model2')
class Model2(models.Model):
text_field = models.TextField(max_length=250)
--
View this message in context:
http://old.nabble.com/Django-Sphinx-Foreign-key-search-tp28219147p282...
Sent from the django-users mailing
Field(max_length=250)
fek_field = models.ForeignKey('Model2')
class Model2(models.Model):
text_field = models.TextField(max_length=250)
--
View this message in context:
http://old.nabble.com/Django-Sphinx-Foreign-key-search-tp28219147p28219147.html
Sent from the django-use
On 12/3/07, Robin Becker <[EMAIL PROTECTED]> wrote:
>
> Well I see the search box, and when I enter the id of a known A and hit
> the go
> button The page that returns has
>
> "23 results (6380 total)" beside the go button and in the body of the page
> I see
>
> 23 as
>
>
> however there's no other
Karen Tracey wrote:
> On 12/3/07, Robin Becker <[EMAIL PROTECTED]> wrote:
>>
>> I have a simple model with a foreign key relation
>>
>> class A(models.Model):
>> id = models.CharField('ABCDEFG', .)
>
>
> Do you really have an explicit field named 'id'? Do you also include
> primary_ke
On 12/3/07, Robin Becker <[EMAIL PROTECTED]> wrote:
>
>
> I have a simple model with a foreign key relation
>
> class A(models.Model):
> id = models.CharField('ABCDEFG', .)
Do you really have an explicit field named 'id'? Do you also include
primary_key=True over in that '' part?
I have a simple model with a foreign key relation
class A(models.Model):
id = models.CharField('ABCDEFG', .)
class B(models.Model):
def __str__(self):
return self.name
class Admin:
list_display = ('name',)
list_display_links = ('name',)
o
18 matches
Mail list logo