Booktype Project structure

What is a Project

In simple words, each Booktype project is a separate web site. Most of the users would like to customise their site, develop their own front page, design their own look or install custom plugins. Because of that each installation of Booktype is a new project which allows easy customisation and simple upgrade to the latest version of Booktype.

To achieve that goal we have something called Booktype project. Configuration files and scripts are autogenerated for each project specifically. User has to define minimal set of configuration options and everything else is ready to run out of the box.

File structure

This is structure on disk for project called bkdev:

bkdev/
    booktype.env
    manage.py

    conf/
        wsgi.apache
        gunicorn.nginx
        fastcgi.nginx

    lib/

    static/
    data/

    bkdev_site/
        locale/
        templates/
        static/
        wsgi.py

        settings/
            base.py
            dev.py
            prod.py

        urls/
            dev.py
            prod.py
  • booktype.env - It is used for

  • manage.py - This is our manage file

  • conf/ - Autogenerated configuration files for external services.

    • wsgi.apache - Apache site definition.
    • gunicorn.nginx - Gunicorn.
    • fastcgi.nginx - FastCGI.
  • lib/ - Location for non web related code or 3rd party libraries.

  • static/ - Location for auto collected static files.

  • data/ - Location for user uploaded content.

  • bkdev_site/ - Autogenerated Django application for out project.

    • wsgi.py - Autogenerated wsgi file for our project.

    • settings/ - Autogenerated base settings.

      • base.py - Autogenerated base settings.
      • dev.py - Autogenerated settings for development profile.
      • prod.py - Autogenerated settings for production profile.
    • urls - URL dispatcher for our project.

      • dev.py - For development profle.
      • prod.py - For production profile.