External Media & Templates

Here we will configure our templates, css/javascript & images directories.

Includes Twitter Bootstrap for the default CSS & JS.

When creating a custom domain folder, each subdirectory of that should be a directory named as the site stripped of all prefixes.

By default, it will search for a folder called domains/ inside the TEMPLATE_PATH directory, with a subdirectory named after the website domain (site123.com) and finally the requested template filename from the WebsitePage() data. If the directory is not found, it will search return a default template.

Example Directory Structure example:

home/
    user/
         htmls/

              domains/
                   sitename.com/
                         index.html
                         search.html
                         .....
                   domain-cool.com/
                         index.html
                         search.html
                         .....
                   hot-a55-orgy.com/
                         index.html
                         search.html
                         .....

Website Default and Sub Templates

By default, there is a set of templates located inside the mainweb app at *mainweb/templates/

These templates are used if there is no subdirectory domains inside of TEMPLATE_PATH

Default Template Filenames

  • index.html
  • show_product.html
  • show_article.html
  • search.html
  • products.html
  • articles.html

Linked Media Subdirectories

Static files are now supported. {% static '/bootstrap/css/bootstrap.css' %} or {% static 'priceswagger.com/css/style.css' %} to use the default bootstrap.css file on PROJECTROOT/static or your custom templates directory E.g: /your/templates/directory/static/domains/

Note

1.0 is now useing staticfiles which makes use of settings.STATICFILES_DIRS