chapkovski / bigfive

example of using radiogrid in BigFive questionnaire in oTree
3 stars 0 forks source link

Use RadiogridField in one of survey pages? #1

Closed yukitakahashi1 closed 4 years ago

yukitakahashi1 commented 4 years ago

Hi Philipp, I want to use RadiogridField in one of my survey pages. However, when I copy and paste bigfive as an example in one page of my app and run "otree devserver", I've got the following error message:

An error occurred.
You may have added a non-nullable field without a default. This typically happens when importing model fields from django instead of otree.
(For technical details about this error, run "otree devserver --verbosity=1")

and when I run "otree devserver --verbosity=1", it returns SystemExit: 3. May I ask you what the problem is? My oTree version is 2.5.7. When I run the original bigfive app placed in the same project folder, it runs without any problem.

chapkovski commented 4 years ago

just add here null=True https://github.com/chapkovski/bigfive/blob/71141924b84c7cd7bc4d23a9cd526629a7cf7487/bigfive/models.py#L72

On Mon, Jun 8, 2020 at 2:25 PM Yuki Takahashi notifications@github.com wrote:

Hi Philipp, I want to use RadiogridField in one of my survey pages. However, when I copy and paste bigfive as an example in one page of my app and run "otree devserver", I've got the following error message:

An error occurred. You may have added a non-nullable field without a default. This typically happens when importing model fields from django instead of otree. (For technical details about this error, run "otree devserver --verbosity=1")

and when I run "otree devserver --verbosity=1", it returns SystemExit: 3. May I ask you what the problem is? My oTree version is 2.5.7. When I run the original bigfive app placed in the same project folder, it runs without any problem.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chapkovski/bigfive/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLA4YDS6VUP6IYDEPWP6PLRVUUKRANCNFSM4NYU7GZQ .

yukitakahashi1 commented 4 years ago

Worked perfect. Thank you!