Hello Julio and thank you for your helpful response.

I think you got the main idea, but I'm not sure

Here's a quick spec. I got from the guy.

"Export market"  (which shows the table after carrier logs in with
columns below)

| date_load | container_type | shipowner | container_type | place_load
| place_unload | forwarder | notes |

shipowners,container_type,places are foreignkeys to
Shipowner,Container,Place models.

"Import market" (which displays the table after forwarder logs in with
columns below)

| date_load | container_type | shipowner | container_type | place_load
| place_unload | carrier | notes |

Forwarders put an offer in "Export" market and Carriers put an offer in
the "Import market".

You will notice that the difference is in carrier/forwarder field.

Places,containers,shipowners are edited only by admin.

>From your notes, I state that:

"Offer" app with:
class Offer(models.Model):
    date_available=  models.DateField()
    type = ( import/export tuple)
    place_load = models.ForeignKey(Place)
    place_unload = models.ForeignKey(Place)
    shipowner = models.ForeignKey(Shipowner)
    container_type = models.ForeignKey(Container)
    note = models.TextField()

class Import(models.Model):
    carrier = models.ForeignKey(Carrier)

class Export(models.Model):
    forwarder = models.ForeignKey(Forwarder)

I have splitted Forwarder,Carrier to the separate app as in the future
they will have their own small sites/company presentation and I will
put models in these apps.

Do you think this solution is reasonable ?

Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to