Particularly, how do you write the project in such a way that database
queries don't constantly have to reach across 5 classes?

For example, this query needs to know the innards of the Definition,
UserDefinition, and UserData classes:
        basic_query = Definition.objects.filter(concept = concept)
        month_ago = datetime.now() - timedelta(days = 30)
        inner_query = self.user_data.user_definitions.filter
(created__gt =
            month_ago)
        query = basic_query.exclude(user_definitions__in =
inner_query)

I imagine I'm not the only one that has had this problem. Can anyone
recommend some strategies or books for coping?
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to