On Mon, Apr 6, 2009 at 10:03 PM, Andrew G. wrote:
>
> Specifying "through" instead of "db_table" did not raise any errors,
> but it caused the relevant field in the admin change form to
> disappear!
This is to be expected. m2m intermediate tables don't get the same
treatment in the admin as norm
Specifying "through" instead of "db_table" did not raise any errors,
but it caused the relevant field in the admin change form to
disappear!
On Apr 3, 4:52 pm, Karen Tracey wrote:
> On Fri, Apr 3, 2009 at 4:25 PM, Andrew G. wrote:
>
> > The following code in a fresh project/app will cause the d
Ahhh, that should solve my problem then. Thank you.
I do however see a similar problem--if the PartPosition model is not
defined, but both Part and Position specify to use the db_table
part_positions, the database build still tries to create the table
twice.
On Apr 3, 4:52 pm, Karen Tracey wro
On Fri, Apr 3, 2009 at 4:25 PM, Andrew G. wrote:
>
> The following code in a fresh project/app will cause the database
> creation to fail.
>
> class Position(models.Model):
>description = models.CharField(max_length=20, blank=True,
> null=True)
>parts = models.ManyToManyField('Part', db_t
The following code in a fresh project/app will cause the database
creation to fail.
class Position(models.Model):
description = models.CharField(max_length=20, blank=True,
null=True)
parts = models.ManyToManyField('Part', db_table='part_positions')
class PartPosition(models.Model):
r
On Thu, Apr 2, 2009 at 9:23 PM, Andrew G. wrote:
>
> I have a django app that is built against an existing database. In
> the database, there are a couple tables used as the many-to-many
> relation lookup table. However, I have mapped models to the many-to-
> many lookup table, since I have a n
Even if an abstract class was added as an intermediary, wouldn't the
derived class still try to create the table? There is no solution
along the lines of a meta option "donotcreatetable" or the like?
On Apr 2, 10:06 am, Adam N wrote:
> I'm pretty sure you'll need to make it an abstract model.
I'm pretty sure you'll need to make it an abstract model. You could
make the model that accords to the existing table abstract and then
subclass that model with no additional attributes (except a different
name) - that will give you access to the data directly if you need it
while leaving the exi
I have a django app that is built against an existing database. In
the database, there are a couple tables used as the many-to-many
relation lookup table. However, I have mapped models to the many-to-
many lookup table, since I have a need for accessing these entries
directly. Since the tables
9 matches
Mail list logo