Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
 * JavaScript Templating System:

 * Preparsed Django templates (useful for JavaScript Templates):

    1. Put these into your

        import os

        def absolute(relative_path):
            make a relative path absolute
            return os.path.join(os.path.dirname(__file__), relative_path)

        # where processed java script files will be output to. folder structure
        # will be mirrored.
        PREPARSE_OUTPUT = os.path.join(MEDIA_ROOT, 'js', 'pre')

        # these will be processed with django's templating system and moved
        # to the PREPARSE_OUTPUT folder, mirroring folder structure.
        PREPARSE_DIR = os.path.join('templates', 'preparsed')

        # the dictionary that will be available to your preparsed code.
            'name': 'John',
            'something': 'yarrr',

    2. python parse
        It sucks to have to remember this every time you modify a file that
        needs to be preparsed, so you can use 

        python monitor

        to make sure your preparsed files are continually updated.

 * Deploying

    1. Upload code to website 
    2. Create a blank file in same folder as named RELEASE
    3. make sure database is synchronized
    4. python parse

 * Developing

    1. Install the dependencies from the INSTALL file.
    2. Create a web server to serve media. I recommend lighttpd or apache.
       Configure the server to honor softlinks and softlink media/ to
       some place in your web server so that MEDIA_URL in
       resolves correctly.
    3. Go through and make sure the variables in there
       will work for you. If not, don't change but instead
       create and override the variables there.

       This step may involve setting up a sql database if you decide not
       to use sqlite3. sqlite3 is probably A-OK for just doing design work.
    4. ./ runserver should work and you can visit the url that
       it prints to the screen to test it out. If you don't see images or
       css then your media serving isn't configured correctly.