Is there an automatic way I can use to rename a pylons controller? If I have to rename the controller manually which all files and filenames do I have to change. Thank you much!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to rename the file containing the controller, as well as the name of the controller class itself within the file. As far as I know there is no automatic way to do this, although if you have many controllers to rename it might be worth the time to write a special script to do it for you.
As discussed on the pylons-discuss group, it would be nice if the class within the controller file was generic, so it did not also have to be changed:
controllers/__init__.py controllers/foo.py: class Controller... controllers/bar.py: class Controller...