How to create a new page which displays a new static string?

T
o create a new static string, just go to admin/static_strings and click Add String. You need to choose a key name which has not been used. If it is already used you will get such an error message.

Suppose you have created a new static string which is keyed under "mykey". You want to create a page "/test/mykey", which displays this string. All you have to do is to create a mykey.py under /test to contain those 9 lines of code! If this is too much work for you, here is a simpler way.

1. cd to the correct directory
2. execute the script ~gmurali/bin/MakeSSPage filename key tab title

This creates a file called filename in the current directory, the contents of this file is the 9 lines of code you want!

Before you commit it to the repository, you must do a cvs add filename, so that this file is added to the repository. If you are creating a new directory and putting this file there, then make sure there is an empty __init__.py (do a touch __init__.py after cd'ing to that directory), and you need to cvs add the directory, the __init__.py file as well as your file.

Now it can't get any better than this!