One seems to work.. though I'd rather do it more complex way, like limit_choices_to and Queryset :-(
I've wrote a new function class Computer(models.Model): def getFreeExtIP(): some instructions for specifying a tuple here returning a tuple ext_ip = models.IPAddressField(choices = getFreeEXTIP(), ...) Thanks, Robert X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.53.63 with SMTP id b63mr135641cwa; Mon, 22 May 2006 13:51:37 -0700 (PDT) X-Google-Token: 02n0kQwAAAAtP9jERTIXFOCceFcAbmNz Received: from 81.190.91.213 by j73g2000cwa.googlegroups.com with HTTP; Mon, 22 May 2006 20:51:37 +0000 (UTC) From: "Robert" <[EMAIL PROTECTED]> To: "Django users" <django-users@googlegroups.com> Subject: Re: foreign_key limiting choices Date: Mon, 22 May 2006 13:51:37 -0700 Message-ID: <[EMAIL PROTECTED]> In-Reply-To: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3,gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain One seems to work.. though I'd rather do it more complex way, like limit_choices_to and Queryset :-( I've wrote a new function class Computer(models.Model): def getFreeExtIP(): some instructions for specifying a tuple here returning a tuple ext_ip = models.IPAddressField(choices = getFreeEXTIP(), ...) Thanks, Robert --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---