** In progress ** # Installation Klokka, Numra, and Dato all require that their fsts can be found. System will give an (intentionally) vague 404 error if not. Settings for path to FSTs are in settings.py: the lookup tool must be specified with a path, and there must be a path to GTHOME. For now, I've installed all of the sma tools in the smaoahpa directory: /home/smaoahpa/smaoahpa/gtsvn/gt/sma/. We should ideally use this path for all generation, but this may not be switched in the install script yet. Another source for 404 errors is whether or not the lookup tool can be found. It is best to check the path, and also ensure that there are no double slashes or calculated paths (using the here method). Sometimes, it seems that Python does not handle these as expected, and it may be that calculated paths do not work sometimes because the calculation is not performed and instead a function object is passed and repr()'d before it should be. ## Numra/Dato - creation Here's a short explanation of how to create a new game type with Numra/Klokka as the base model. Throughout the process of creating this I needed to make several other changes to make the objects more easily subclassable. If this documentation isn't as usable as a result, it will at least highlight what things need to be considered in order to make these kinds of changes, and where you would do them. ### Forms.py Two objects are required: a settings form and a question form. We'll subclass these two: class DatoSettings(NumSettings): pass class DatoQuestion(NumQuestion): pass Since these inherit all of their methods and form fields, it may be necessary to disable a few. ### game.py Requires a new class. Since Dato is very similar to Clock, we'll subclass this: class Dato(Klokka): pass Dato needs a custom get_db_info method which calculates the question that is then passed off to the generator in create_form. It also needs to have the fstfile specified (the path to this file is listed in settings.py). ### views.py Requires views to set up all the question classes def dato(request): .... return render_to_response(...) ### urls.py Direct URL to view. url(r'^numra_dato/$', 'dato',), ### dato.html template Create template, update menu in other templates (sicne these do not have their own template snippet).