Re: forward references
Good catch, but this was just an example to show the poblem I was facing. FWIW, if someone really wanted to implement _pre_delete for Reporter as discussed, they should add this version of the function to class Reporter: def _pre_delete( self ): for article in self.get_article_list(): article.delete() --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: forward references
Rock wrote: > Ahhh. That makes sense. Thanks! footnote: also note that all uses of "articles" in the function refers to the same object, so your first line articles = articles.get_list(reporter_id__exact=self.id) replaces the module with a sequence. it doesn't matter in this simple case, but may cause problems in larger examples. I'd recommend something like: article_list = articles.get_list(reporter_id__exact=self.id) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: forward references
Ahhh. That makes sense. Thanks! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: forward references
On Saturday 18 February 2006 13:03, Amit Upadhyay wrote: > from django.models.myapp import articles You will have to put thus inside the _pre_delete function, not at the top of the module. Luke -- "My capacity for happiness you could fit into a matchbox without taking out the matches first." (Marvin the paranoid android) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: forward references
from django.models.myapp import articlesOn 2/18/06, Rock <[EMAIL PROTECTED]> wrote: -- Amit UpadhyayBlog: http://www.rootshell.be/~upadhyay+91-9867-359-701 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: forward references
You would think so, but somehow that didn't work... Precisely what import statement would you use. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---