﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17953	DB architecture in tutorial	hater.zlin@…	nobody	"Hi,

on page:

https://docs.djangoproject.com/en/1.3/intro/tutorial01/

you create DB architecture by this code:


{{{
from django.db import models

class Poll(models.Model):
    question = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')

class Choice(models.Model):
    poll = models.ForeignKey(Poll)
    choice = models.CharField(max_length=200)
    votes = models.IntegerField()
}}}

and I think in clean architecture it should be:

{{{
from django.db import models

class Poll(models.Model):
    question = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')

class Choice(models.Model):
    choice = models.CharField(max_length=200)
    votes = models.IntegerField()

class ChoiceToPollRelation(models.Model):
    poll = models.ForeignKey(Poll)
    choice = models.ForeignKey(Choice)
}}}

In this way, you are leading beginners to do errors from start."	Cleanup/optimization	closed	Documentation	1.3	Normal	invalid			Unreviewed	0	0	0	0	0	0
