felsen / django-survey

Automatically exported from code.google.com/p/django-survey
0 stars 0 forks source link

make Survey:Question M:M #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I need to make 6 surveys, and the first 12 questions of each are all the
same.  it would be nice if I could define the question once, and assign it
to multiple surveys.  

This let me add the data:

    survey = models.ManyToManyField(Survey, related_name='questions',

            new_question = question_form.save(commit=False)
            new_question.save()
            new_question.survey.add( survey )

above hack doesn't let me take the survey: 
http://dhcp11:8002/survey/visible/

I am guessing there is something checking for at least on question, and
that needs to be fixed.  

I think answers will have to be a child of the intersect table, no clue how
to do that in django.  maybe just add a FK to survey?

I didn't want to burn up too much time on this - maybe there is a better
implementation, like let one survey contain sub-surveys.  (kinda liking
this idea better.)

Original issue reported on code.google.com by cfkars...@gmail.com on 17 Jul 2008 at 1:08

GoogleCodeExporter commented 9 years ago
This enhancement has been discuss in this thread : 
 * http://groups.google.com/group/django-survey/browse_thread/thread/19bbf8d9e31e82c2#

Some progress toward its implementation has been done by "RHouse" in the branch
called :"Multi-survey"
The implementation is not yet complete but I think that if you are interested 
this is
the place to look.

Original comment by yann.ma...@gmail.com on 17 Jul 2008 at 9:31