Custom Forms and data per user

108 views
Skip to first unread message

Dan

unread,
Dec 14, 2010, 2:26:33 PM12/14/10
to eav-django
I am trying to make an app where a user will be able to create a
mailing
list for which they should be-able to create custom fields for any
extra data they may want to hold and be able to save multiple rows of
that
data.

class Maillist(models.Model):
user = models.ForeignKey(User)
....

class Subscriber(models.Model):
email = models.EmailField()
list = models.ForeignKey(List)
extra_data....

class ExtraFields(models.Model):
maillist = models.ForeignKey(Maillist)
field_type = models.IntegerField(choices=FIELD_TYPE_CHOICES)
label = models.CharField(_('Label'), max_length=100)

So there would be multiple mallists and each would have different
scheme customised by a user and held in a table. They also my need to
be-able to add and remove fields also sometimes.

Would I be-able to use django-eav for this situation and how could i
get it to work with different scheme on the same model?

Or maybe is there a better alternative in this situation?

Thanks -Dan

Chris Burnor

unread,
Oct 6, 2012, 8:21:35 PM10/6/12
to eav-d...@googlegroups.com
It would seem that the solution would involve some customization of the Schema class with an extra foreignkey to the user that owns that schema.  Not sure how to actually put that filtering into the query yet.  I'll post when I figure it out.

Andres Hernandez

unread,
Apr 19, 2013, 1:03:34 PM4/19/13
to eav-d...@googlegroups.com
Hi, 

I built an app using django appengine and EAV model, for clinical trials... 


my app allows user to create new studies, for each study different stages.. in the url I query the table studies and stages to create a new url for each stage and study. 

In the models I create a dynamic form using a query in the table questions... hopefully this will give you some guide in how to start. 

for your problem the EAV model should work... 
Reply all
Reply to author
Forward
0 new messages