Rikard Bartholf 617c2daa06 PW-622 Use column in materials table for getting prices
Squashed commit of the following:

commit 801333b25a635c5fce12d937d6808894ef2475d3
Author: Martin <me.carlsson@gmail.com>
Date:   Tue Jan 3 10:59:45 2017 +0100

    PW-622 divide by float

commit 9e2c696751c28c017bcb452ea4349509ca787fd9
Author: Martin <me.carlsson@gmail.com>
Date:   Mon Jan 2 13:46:57 2017 +0100

    PW-622 use new material_price column
2017-01-17 11:42:26 +01:00
2016-07-08 16:43:02 +02:00
2016-11-26 00:29:59 +01:00
2016-08-15 18:14:51 +02:00

Photowall API 2

Provides a REST API to Photowall database.

Installation

Make sure that your system has Python version 3.4 installed. If you dont have it here is how you install it on Ubuntu 12.04:

$ sudo add-apt-repository ppa:fkrull/deadsnakes
$ sudo apt-get update
$ sudo apt-get install python3.4 python3.4-dev build-essential libpq-dev

Next its recommended that you create a virtualenv of python 3.4 and install all packages in it. To do that execute the following commands in your project folder:

$ virtualenv -p /usr/bin/python3.4 venv
$ source venv/bin/activate
$ pip install -r requirements.txt

Documentation

Documentation is available here

Configuration

First copy config.sample.py to config.py. This file will be read by the application on startup.

List of available configuration options:

Name Description
SQLALCHEMY_DATABASE_URI Database connection string. e.g: postgresql://user:password@localhost/photowall
DEBUG Enable/disable debug mode
API_KEYS A list of api keys that are used to authenticate to the API. If this list is empty authentication will be disabled.
ESALES_URL URL to the eSales server. If its a cloud cluster it has the format username:password
ESALES_IMPORT_DIR XML-files that should be imported to eSales are temporarily stored in this directory. e.g: /tmp/esales

Getting started

Starting the application:

$ python manage.py runserver

Running the eSales import

$ python manage.py run_esales_import

S
Description
No description provided
Readme
755 KiB
Languages
Python 91.2%
Makefile 8%
Shell 0.7%
Dockerfile 0.1%