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:
- Download the installer from http://pypi.python.org/pypi/django-lfs
- $ tar xzf django-lfs-installer-<version>.tar.gz
- $ cd lfs-installer
- $ python bootstrap.py
- $ bin/buildout -v
- Enter your database settings to lfs_project/settings.py
- $ bin/django migrate
- $ bin/django lfs_init
- $ bin/django collectstatic
- $ bin/django runserver
- 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/
- Install the new LFS version
- Backup your existing database
- Enter your existing database to lfs_project/settings.py
- $ 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.
- Install the 0.9
- Backup your existing database
- Enter your existing database to lfs_project/settings.py
- $ bin/django syncdb
- $ bin/django lfs_migrate
Migration from version 0.9 to version 0.10¶
- Install the 0.10 LFS version
- Backup your existing database
- Enter your existing database to lfs_project/settings.py
- $ bin/django migrate
What’s next?¶
Move on to Getting Started.