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()
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 ca
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
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."
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"
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-u
On 2/18/06, Rock <[EMAIL PROTECTED]> wrote:
def _pre_delete( self ):articles = articles.get_list(reporter_id__exact=self.id)for article in articles:article.delete()The problem is that this won't compile since articles is undefined.
What is the preferred way to deal w
7 matches
Mail list logo