You are right that the approach is not the same in tutor. In order to accomplish the same, you will have to create a simple yaml plugin, install and enable it. You can see a few example plugins in tutor docs.
root@1e0a5feab6be:/openedx/edx-platform# ./manage.py lms makemigrations custom_reg_form
You are trying to add a non-nullable field ‘nationality’ to extrainfo without a default; we can’t do that (the database needs something to populate existing rows).
Please select a fix:
Provide a one-off default now (will be set on all existing rows with a null value for this column)
My checkout out repo was on the old “solo” branch, so I moved it to the master branch, re-applied my change (I just changed Phone Number to something else) and then ran “tutor images build openedx” and “tutor local quickstart” but still didn’t see the change.
The reason I thought I might need to do the manual migrations is because the quickstart output said the following towards the end:
No migrations to apply.
Your models have changes that are not yet reflected in a migration, and so won’t be applied.
Run ‘manage.py makemigrations’ to make new migrations, and then re-run ‘manage.py migrate’ to apply them.
All services initialised.
The Open edX platform is now running in detached mode
Since I can’t upload them, and they’re too long, here’s my logs: tutor logs - Pastebin.com
Nothing jumps out at me as super relevant though…
Hi @knoise ,
Yes, I didn’t see any specific error related your custom_registration plugin or app.
I suggest a brand new installation and remove all other “idle” containers if it’s your test server, not production.
OK, so in the end I got it working, including the drop-down menu (yay!). It turns out it’s been so long since I first used that plugin, I completely forgot there were other places to edit besides 0001_initial.py (namely, the actual probably-primary things of admin.py, forms.py, and models.py!)
So @qali thanks again for making that plugin in the first place, and for updating it to support a pulldown.
p.s., and for my future self: neither just doing a rebuild + quickstart, nor going into bash and applying migrations were independently sufficient to add new fields. I had to do both (with the rebuild happening before the bash migrations)
I’m glad it’s began to work. But I believe you using still the old one (solo brach) ? Because, just checkout to master repo is not enough. You may forgot to pull/fatch and install it ? I updated master repo just 3 days ego, and it’s has nationality field as a country dropdown menu , as you see at the screenshut above ?( not just CSV download in admin site) My be I am wrong
@knoise I was away and couldn’t follow this. Did you make gender selector work ? As I’d mentioned before, I’ve tried by changing gender to gender2 ( as ‘gender’ is already present in the extra fields ) and got it working. Do you need anymore help ?
I did end up getting it working. I used gender2 during my edits just incase, so that I didn’t have to re-run everything (since it took a long time to build the openedx container when using a non-standard build command.)