i'm trying to use django + djongo to have some DB..
And i'm not sure if i'm doing it correctly at all.
I have Pic and mAlbum
Can i have something like this?
albums = models.ArrayReferenceField(null=True,)
class mAlbum(models.Model):
name = models.TextField(default="row-", max_length=255, unique=True)
about = models.TextField(default="about The Album", max_length=1000)
c_date = models.DateTimeField(auto_now=True)
class Pic(models.Model):
name = models.TextField(default="def_name", null=True, help_text="photo name (optional)")
techdata = models.EmbeddedField(
model_container=ImTechdata,
model_form_class=ImTechdata_Form
)
albums = models.ArrayReferenceField(
null=True,
related_name='mAlbum_mItem_set',
to=mAlbum,
on_delete=models.CASCADE,
)
headline = models.CharField(max_length=255)
objects = models.DjongoManager()