Hi,
I am working on a large project that requires i export applications to
csv.
the problem is the Application model has about six foreignkey fields
including one to the Profiles model. also there are two backward
relations to the Application models as well
in other words the model structure is a little complex.
now i want to export the data (its a school management app) with their
relationships

class Application(models.Model):
    profile = models.ForeignKey(Profiles, editable=False)
    ...
    ...
class School(models.Model):
    '''the schools attended by the applicant'''
    application = models.ForeignKey(Application)

class WorkExperience(models.Model):
    '''the jobs doen by the applicant'''
    application = models.ForeignKey(Application)

and so on.
right now i am looking for an alternative to picking each Aplication
object, one by one, and using select_related() to get related data
also thought about using custom sql but am not sure it is the right
thing to do...(maybe i'm just being lazy)
Any thoughts on how i can get around this?
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to