|
I have been making modifications to the "Ask a Question" form source file (root/forum/forms/qanda.py), however if there is an update all those modifications will be lost. Is there a way to make a module that can modify the contents of the ask a question form. The main thing I want to do is change the tags field from a CharField to a ChoiceField (basically limit tag creation into set parameters). Is this possible and if so, what would be the best way to go about achieving this? |
|
In the AskForm the tags field is initialized in the init method, so you have to replace the entire method, and you can use our decoration set. Create the module folder and empty init.py file, and in the startup.py file:
This will safely replace the init method in the AskForm by your own method. Hope it helps. Silly question, but I'm successfully replacing the the AskForm method with the technique above, but where should I place my alternate AskForm method?
(07 Sep '10, 21:02)
Dos
@Dos, just create a folder with an alphanumerical name under forum_modules, create the files:
Put it in the startup file. The other one stays empty.
(08 Sep '10, 06:00)
Hernani Cerq... ♦♦
|