At 6:22 PM -0800 2/26/06, hsitz wrote: >Have you taken a look at the Many-to-many relationships example? Looks >like you're trying to manually create the links between tables, whereas >you're supposed to use the Model API's built-in 'set_xxxxx' method. > >http://www.djangoproject.com/documentation/models/many_to_many/
Wow, thanks a lot! Just what I needed! One problem I foresee, though, is that I also have some many_to_one fields. Many_to_one fields do not have a set_FOO method. Since I might need to change the relationship of such a field after the record is created, how do I do that? Notes to the documentation maintainers: 1) I looked through the db_api documentation and this wasn't in there -- I think it should be there. 2) I didn't expect something called "examples" to contain documentation per se, but rather more just sample code. Something like that many_to_many "example" needs to be called "documentation' and not an example. Feature suggestion: With all of the get_FOO_this and set_FOO_that methods etc., it sure would be nice to have some tool akin to "django-admin.py sqlall <app>" that would show me all of the possible methods for this model. It would help, for example, knowing that set_FOOs (a) gets the "s" appended to it or not, and (b) that there isn't one for FOOBAR because FOOBAR is a many_to_one and not a many_to_many. Thanks again. -- Glenn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---