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
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
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
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,
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
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
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
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
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
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
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
11 matches
Mail list logo