FlaskBB
A lightweight forum software in Flask
Member
avatar
Joined:
Posts: 16

I'm receiving an error trying to create a new 'SelectField' called 'testfield' in templates/user/change_user_details.html

  1. /user/models.py

I add the following line:
enter image description here

  1. /user/forms.py

I add the following:
enter image description here

  1. /management/forms.py

I add the following:
enter image description here

  1. /templates/user/change_user_details.html

I add the following:
enter image description here

  1. By my understanding, to migrate changes I use this command:
    enter image description here

  2. I then run the server:
    enter image description here

  3. I receive this error message:
    enter image description here

  4. Also when I check SQLite, 'testfield' has not been created:
    enter image description here

What am I doing wrong?


enter image description here

Member
avatar
Joined:
Posts: 16

So... does anyone here understand how to migrate changes in .py files for FlaskBB? Because I sure don't.


enter image description here

Administrator
avatar
Joined:
Posts: 139

Sorry for my late reply - for some reason I completely missed that you have created a new topic.

To create a new migration, you have to run:

flaskbb db revision "<YOUR_MESSAGE>"

This should create new file in flaskbb/migrations/<random_strings>_<YOUR_MESSAGE>.py

After this you can run

flaskbb db upgrade

and your new column should be created.


Cheers! 🍻

Member
avatar
Joined:
Posts: 16

Thanks @sh4nks! That worked!

Are error logs stored somewhere? Whatever changes I made caused an error:

enter image description here

But the terminal doesn't show any error messages:
enter image description here

Thank you for all your help and responses, I really love this platform you've created and, once I've got past these newbie steps, I can't wait to get using it! I run a website, that's had about 3million views, that I really want to host myself improve 😀


enter image description here

Administrator
avatar
Joined:
Posts: 139

It depends on your configuration but by default it should store the logs in the flaskbb/logs directory.

Glad you like it!

PS: Not sure if you have noticed the lack of activity around FlaskBB - it's just temporary as I am trying to finish my studies which I hope I am done with soon!


Cheers! 🍻

Member
avatar
Joined:
Posts: 16

omg I'm so excited, it's working! Thank you @sh4nks!

PS: Not sure if you have noticed the lack of activity around FlaskBB - it's just temporary as I am trying to finish my studies which I hope I am done with soon!

all good mate

enter image description here


enter image description here

Administrator
avatar
Joined:
Posts: 139

Glad I could help @shing! :)


Cheers! 🍻