Melvyn,
Thanks for your response. My original question was how to get the string
names for the metadata and document out of the many to many table in the
__str__ model method. I was able to accomplish this by the following
class DocumentMetaData(models.Model):
document = models.ManyToManyFiel
On Sunday 25 June 2017 15:08:25 Mark Phillips wrote:
> I have this class
>
> class DocumentMetaData(models.Model):
> document = models.ManyToManyField(Document)
> metadata = models.ManyToManyField(MetaData)
> metadatavalue = models.ManyToManyField(MetaDataValue)
That design is wrong.
On Sun, Jun 25, 2017 at 4:20 PM, Vijay Khemlani wrote:
> A DocumentMetaData instance may be associated with multiple documents
> and multiple metadata according to your model, so your question is
> ambiguous.
>
Sorry about the confusion. When I create a DocumentMetaData, then there is
a single r
A DocumentMetaData instance may be associated with multiple documents
and multiple metadata according to your model, so your question is
ambiguous.
If you want a particular DocumentMetaData to only refer to a single
document and a single metadata then change the ManyToManyField for a
ForeignKey
I
4 matches
Mail list logo