Django app for previewing designs
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
main
templates
.gitignore
README.md
TODO
__init__.py
local_settings.py.template
manage.py
requirements.txt
settings.py
urls.py

README.md

Preview - a Django project for previewing designs

Requirements

You will need the following installed:

  • pip
  • virtualenv

Installation

Set up a folder and virtual env: cd /path/to/your/workspace mkdir preview cd preview mkvirtualenv --no-site-packages preview

Install all dependencies pip install -r requirements.txt Note that the MySQL-python package has a dependency on libmysqlclient-dev which needs to be installed using apt-get. You can view the installed packages in your virtual env using yolk -l

Create a local_settings.py file which contains your database credentials. This file is on the .gitignore list and so needs creating manually

Load the test data using: ./manage.py loaddata main/fixtures/test_data.json Note that there is a set of fixture images in assets/design-fixtures/ that go with the fixture data.

There is a single user with username "admin" and password "testing" in the fixture data.

Testing

Run the tests with: ./manage.py test main If you need to alter the test fixture data, then get your local db in the state you want and run ./manage.py dumpdata -e south > main/fixtures/test_data.json You don't want the south data in the fixture as that will prevent other users from applying the migrations when they set up their db.