Thanks, Bill, for your comments.
Shortly after I posted here I did a little more digging and found this
thread from six months ago that described exactly my problem:
http://groups.google.com/group/django-users/browse_thread/thread/9400999651577bc2/8cc4fe267128d6a3
That thread didn't seem to have
On Thu, Jun 23, 2011 at 11:47 AM, Tom Evans wrote:
> On Thu, Jun 23, 2011 at 4:36 PM, Matthew Gardner wrote:
> > At this point, all I really want to do is add a row to the verb table
> that
> > contains the correct foreign key, without creating a new row in
On Thu, Jun 23, 2011 at 2:18 PM, Matthew Gardner wrote:
> class Verb(models.Model):
> word = models.ForeignKey('Word')
> # Verb-specific stuff
>
Sorry, this is more accurate:
class Verb(models.Model):
word = models.OneToOneField('Word')
# verb-
Verb (and Noun and Adjective, etc.) table(s), derived from
> a non-Model
> Word class?
>
> If there's a Noun instance "record" and a Verb instance "record", do they
> share
> any data (such that if you change it in one it is changed in the
> other) or d
with transactions and roll backs.
>
> And, of course, things could change in a future version even if this works
> now.
>
> Good luck, Bill
>
> On Thu, Jun 23, 2011 at 2:22 PM, Matthew Gardner wrote:
> > On Thu, Jun 23, 2011 at 2:18 PM, Matthew Gardner
I think you're right, Rich, that when you query on a table, it'll only grab
the results for that table. So when you do user.post_set.all(), it only
creates Post objects, because it only pulls data from that one table. When
you do user.betterpost_set.all(), the reason you don't see anything is tha
Hi all,
I'm seeing some funny behavior when using select_related to try to speed up
my code, and I'm wondering if I'm just misunderstanding something.
The basics of my code:
class A(models.Model):
# some stuff
class B(models.Model):
a = models.ForeignKey('A')
c = models.ForeignKey('
2011 at 7:42 PM, Javier Guerra Giraldez
wrote:
> On Sat, Jul 2, 2011 at 8:07 AM, Matthew Gardner wrote:
> > a = A.objects.get(pk=some_id)
> > b_set = a.b_set.select_related().all() # recommended in the Django
> > documentation for some queries
> > And b_set comes up e
8 matches
Mail list logo