foreign key issue

2011-02-03 Thread Bobby Roberts
I'm setting up a foreignkey field in my model as follows: InventoryFunction = models.ForeignKey('AppSettings.InventoryOption', verbose_name=_('InvFunction'), related_name='InvFunction',blank=False, null=False) result from syncdb: scanning.inventory: Accessor for field 'InventoryFunction

Foreign key issue

2018-08-21 Thread Akshay Jain
Hello, In my Django application, I want to use a foreign key from one db to another. Is it possible? as I'm able to see the listing in /add endpoint but when I try to save It says that the table doesn't exist. Thanks -- Regards, Akshay Jain -- You received this message because you are subscrib

Re: foreign key issue

2011-02-03 Thread Tom Evans
On Thu, Feb 3, 2011 at 1:32 PM, Bobby Roberts wrote: > I'm setting up a foreignkey field in my model as follows: > >        InventoryFunction = > models.ForeignKey('AppSettings.InventoryOption', > verbose_name=_('InvFunction'), related_name='InvFunction',blank=False, > null=False) > > result from

Re: foreign key issue

2011-02-03 Thread Bobby Roberts
here ya go: class InventoryOption (models.Model): id = models.AutoField (primary_key=True) name = models.CharField (max_length=50, blank=False, db_index=True) active = models.IntegerField(blank=False, choices=active_choices) order = models.IntegerField(blank=True,

Re: foreign key issue

2011-02-03 Thread Tom Evans
On Thu, Feb 3, 2011 at 2:05 PM, Bobby Roberts wrote: > here ya go: > > >... > models.ForeignKey('AppSettings.InventoryOption', > verbose_name=_('InvFunction'), > related_name='inv_function',blank=False, null=False) So you already changed it? I can't reproduce this, even when I change the related

Re: foreign key issue

2011-02-03 Thread Bobby Roberts
yeah i changed the related name to see if that would make any difference... the error baffles me. On Feb 3, 9:18 am, Tom Evans wrote: > On Thu, Feb 3, 2011 at 2:05 PM, Bobby Roberts wrote: > > here ya go: > > >... > > models.ForeignKey('AppSettings.InventoryOption', > > verbose_name=_('InvFuncti

Re: Foreign key issue

2018-08-21 Thread Jason
If you think about it, you might see why you could do this, but you'd lose everything related to referential integrity. Nothing stopping you from making a router that behind the scenes uses multiple dbs seamlessly, but how would you handle changes from the other db in your own if you can't get

Re: Foreign key issue

2018-08-23 Thread Akshay Jain
Thanks Jason, fair point. On Tue, Aug 21, 2018 at 5:37 PM Jason wrote: > If you think about it, you might see why you could do this, but you'd lose > everything related to referential integrity. Nothing stopping you from > making a router that behind the scenes uses multiple dbs seamlessly, but

Django Models Foreign Key Issue!

2012-05-28 Thread Eugene NGONTANG
I encountered a problem using Django foreign key unique_together for one of my models. I have three models (representing three tables in the database), host, user, and job. - user has a host foreign key - job has a user foreign key and a host foreign key : Because we can have the same user on two

Re: Django Models Foreign Key Issue!

2012-05-29 Thread Eugène Ngontang
Hi all! The issue was not from Django side, but really from my models implementation. I made mistake when propagating my associative tables through other tables. And there was another unity constraint blocking the one i wanted to set. I don't think it's necessary to explain you all here, because

Foreign Key Issue - to_field not enabling a non pk foreign key on v3.7

2020-08-03 Thread John Pearson
Hi, I have tried a number of ways to do this but I cannot get Foreign Keys to work with non-pk values. I keep getting a int type when trying to import a charfield, 'MotorMakeName' even though this is the type of field upon which the foreign key is connected. I've included the additional ids I us