How to split the models on per-user.

21 views
Skip to first unread message

Sugita Shinsuke

unread,
Mar 14, 2015, 5:53:50 AM3/14/15
to django...@googlegroups.com
Hi there.

I use Django 1.6 version.


I have already developed the system which works for a single user.
For later plan, I would split the models on per-user.

This is the model below which I must split on per-user.


class Questions(models.Model):

    qid = models.IntegerField(
        primary_key=True, editable=True)
    question = models.TextField(
        null=False, editable=True)
    q_time = models.TimeField(editable=True, db_index=True)


class Response_Records(models.Model):
    questions = models.ForeignKey(Questions)
    response = models.BooleanField(default=False)
    timestamp = models.DateTimeField(editable=True)



Could you tell me what is the best practice what I'd like to do.
Reply all
Reply to author
Forward
0 new messages