I'm working on a similar script to convert a legacy database. Just a
hint from a tough lesson learned, you work the opposite order that OO
may teach you and you save() first, then aggregate.
So example:
class PhoneNumber(meta.Model):
number = meta.CharField()
class Contact(meta.Model):
I do, however, see methods for **set_relatedclass** when I dir the
primary class. The
documentation, to the best of my knowledge, doesn't mention how to use
these
methods.
Check out http://www.djangoproject.com/documentation/models/
many_to_many/. The basic syntax is ``obj.set_realtedclasse
Adrian Holovaty wrote:
> On 11/4/05, wrb <[EMAIL PROTECTED]> wrote:
> > What's the syntax to change or populate ForeignKey and ManyToMany
> > fields?
>
> See the documentation:
>
> http://www.djangoproject.com/documentation/db_api/#relationships-joins
> http://www.djangoproject.com/documentation/
On 11/4/05, wrb <[EMAIL PROTECTED]> wrote:
> What's the syntax to change or populate ForeignKey and ManyToMany
> fields?
See the documentation:
http://www.djangoproject.com/documentation/db_api/#relationships-joins
http://www.djangoproject.com/documentation/models/many_to_one/
http://www.djangop
4 matches
Mail list logo