Installation

Prerequisites

Make sure you have installed:

  • Python 2.6.x or 2.7.x
  • A RDBMS of your choice (PostgreSQL, MySQL, SQLite or Oracle)

Installation

The installation is straightforward and should last just a few minutes. Please execute following steps:

  1. Download the installer from http://pypi.python.org/pypi/django-lfs
  2. $ tar xzf django-lfs-installer-<version>.tar.gz
  3. $ cd lfs-installer
  4. $ python bootstrap.py
  5. $ bin/buildout -v
  6. Enter your database settings to lfs_project/settings.py
  7. $ bin/django migrate
  8. $ bin/django lfs_init
  9. $ bin/django collectstatic
  10. $ bin/django runserver
  11. Browse to http://localhost:8000

Note

If you encounter problems, please see trouble shooting.

Note

If you’re setting up a production environment then you should not use Django’s builtin development server (bin/django runserver). Instead, you’ll probably want to use uWsgi or Gunicorn servers. Check Django (and uWsgi/Gunicorn) documentation for details.

Note

For production environments you’re supposed to change robots.txt file (otherwise bots/crawlers like google bot will not be allowed to scan your site, which is not what you probably want). Default version of robots.txt is located at lfs_theme application: templates/lfs/shop/robots.txt. You should create your own ‘mytheme’ app with structure like: templates/lfs/shop/robots.txt and place it in settings.INSTALLED_APPS before(!) ‘lfs_theme’. Also note, that in production environment it is good to serve robots.txt directly from HTTP server like nginx or Apache.

Migration from version 0.9 to version 0.10

Migration starting from 0.10 is based on Django’s default migrations, see: https://docs.djangoproject.com/en/1.8/topics/migrations/

  1. Install the new LFS version
  2. Backup your existing database
  3. Enter your existing database to lfs_project/settings.py
  4. $ bin/django migrate

Migration from versions 0.5 - 0.8 to version 0.10

Migrations from 0.5 - 0.8 to version 0.10 needs an intermediate step through version 0.9.

Migration from versions 0.5 - 0.8 to version 0.9

Migration from versions 0.5 - 0.8 to version 0.9 can be done with a migration command (lfs_migrate) which migrates existing databases up to version 0.9.

  1. Install the 0.9
  2. Backup your existing database
  3. Enter your existing database to lfs_project/settings.py
  4. $ bin/django syncdb
  5. $ bin/django lfs_migrate

Migration from version 0.9 to version 0.10

  1. Install the 0.10 LFS version
  2. Backup your existing database
  3. Enter your existing database to lfs_project/settings.py
  4. $ bin/django migrate

What’s next?

Move on to Getting Started.