Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Managing objects spred among several tables/databases.

Received: by 10.224.200.5 with SMTP id eu5mr3051728qab.1.1310660812544;
        Thu, 14 Jul 2011 09:26:52 -0700 (PDT)
X-BeenThere: django-users@googlegroups.com
Received: by 10.224.21.25 with SMTP id h25ls569815qab.5.gmail; Thu, 14 Jul
 2011 09:26:22 -0700 (PDT)
Received: by 10.224.210.193 with SMTP id gl1mr3158765qab.2.1310660782906;
        Thu, 14 Jul 2011 09:26:22 -0700 (PDT)
Received: by 10.224.210.193 with SMTP id gl1mr3158764qab.2.1310660782896;
        Thu, 14 Jul 2011 09:26:22 -0700 (PDT)
Return-Path: <tevans...@googlemail.com>
Received: from mail-vw0-f42.google.com (mail-vw0-f42.google.com [209.85.212.42])
        by gmr-mx.google.com with ESMTPS id z32si345525qcd.1.2011.07.14.09.26.21
        (version=TLSv1/SSLv3 cipher=OTHER);
        Thu, 14 Jul 2011 09:26:21 -0700 (PDT)
Received-SPF: pass (google.com: domain of tevans...@googlemail.com designates 209.85.212.42 as permitted sender) client-ip=209.85.212.42;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of tevans...@googlemail.com designates 209.85.212.42 as permitted sender) smtp.mail=tevans...@googlemail.com; dkim=pass (test mode) header...@googlemail.com
Received: by mail-vw0-f42.google.com with SMTP id 1so334097vwl.29
        for <django-users@googlegroups.com>; Thu, 14 Jul 2011 09:26:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        bh=a4s39+aodc56KOdU//MTN++zegNCYEURcEDDajX0U14=;
        b=MTPuBZzRGjGWsBqQ88TJ5t9bgqubW/DJ2pddFWUdiFzJ9L4K4mx/yj3YOUr+DZPhlf
         vBK31lrz2sX074OHgFS3bCoVt4jn40KoRV6U1eGl+KVsZxugsnwbwOW/0dOTjvVVmbWa
         h5ejrjNFG2QIy6bnf9RVzQcM6ohKh1XOXBThQ=
MIME-Version: 1.0
Received: by 10.52.94.13 with SMTP id cy13mr767663vdb.33.1310660781650; Thu,
 14 Jul 2011 09:26:21 -0700 (PDT)
Received: by 10.52.182.225 with HTTP; Thu, 14 Jul 2011 09:26:21 -0700 (PDT)
In-Reply-To: <52c3a01c-2d72-4463-a60f-57814b94d2fb@u24g2000prn.googlegroups.com>
References: <77497bde-24c0-4057-9a9f-fbe1bf6fc...@e26g2000prf.googlegroups.com>
	<e29c7a32-1d24-460c-8e75-4ea5c0563...@g3g2000prf.googlegroups.com>
	<dc106038-9645-4edd-b2c1-8c039e8b8...@c41g2000yqm.googlegroups.com>
	<CALvtuFQMGVmHWA5Djp9znTLsgeyY=pXZux3V9d7kVDzmfHZ...@mail.gmail.com>
	<6f8470b3-1d5a-4007-848d-a43fadc83...@t7g2000vbv.googlegroups.com>
	<CAFHbX1Jn+FZO=-VVCK1dqaVbJgjCHLO4QiJ0fcTD14ZEB9g...@mail.gmail.com>
	<bd8f56f9-d23d-4864-8fc1-7f74c996a...@hd10g2000vbb.googlegroups.com>
	<3c4039d5-a05d-4825-8137-8f5ba94b0...@h38g2000pro.googlegroups.com>
	<20110714133500.GC8...@ksp.sk>
	<4f167617-313b-4e9f-8fff-57c07e9b3...@p12g2000pre.googlegroups.com>
	<20110714151239.GD8...@ksp.sk>
	<52c3a01c-2d72-4463-a60f-57814b94d...@u24g2000prn.googlegroups.com>
Date: Thu, 14 Jul 2011 17:26:21 +0100
Message-ID: <CAFHbX1LWV1seV+3b6BhjqFwgOL1YGdoc3hXxEJzsbTYPop_...@mail.gmail.com>
Subject: Re: Managing objects spred among several tables/databases.
From: Tom Evans <tevans...@googlemail.com>
To: django-users@googlegroups.com
Content-Type: text/plain; charset=UTF-8

On Thu, Jul 14, 2011 at 5:11 PM, Hummingbird <vineet.deod...@gmail.com> wrote:
> What I want to accomplish from these tables is as given below.
>
> All the customer data can be maintained in a single table.
> i.e. customer(custid, custname, groupid, address, tel, mobile, city)
>
> In the course of normalising the database, we arrived at defining 2
> tables.
> "customer" table maintaining basic data like name, group, etc.
> "custdetl" table containing other details of customer.
>
> A row in custdetl will be created only if there is any data like
> address, tel, etc. for a customer.
> (of course, I need not dive into normalisation concept here).
>
> As I said earlier, there are much complex examples of "single form :
> many tables" in my actual project
>
> Thanks.
>

All of this easily doable in django.

Typically when handling forms for editing models, you would create a
ModelForm, which represents one specific model/table. However, you can
include as many ModelForms as you want within one <form>.

A good (and complex) example of this is django's admin system which
allows you to include other models 'inline' when editing a related
model. I think an earlier respondent alluded to this.

Did you have specific questions? Django is quite easy to use and quick
to prototype in, perhaps you should try implementing a prototype in
django to see if it does suit your needs, asking questions on here
when you get stuck.

Cheers

Tom