Photomagick is a basic photo editing web application. It also allows users share their images on Facebook when they are satisfied with their creations. Read more on the PROJECTPLAN.md file located in the assets directory.
- Python version >= 2.7. Get it here.
- Postgres
- NodeJS and NPM
- Have a postgresSQL database called Photo_Magick.
Follow the steps below to install photomagick on your computer:
-
Clone this repository to the folder where you would like it installed on your machine.
-
In the project root, add a
.env.yml
file to hold all your environment variables. The variables below must be given a valueSECRET_KEY: 'very-complex-secret-key' DB_USER: 'john_doee' DB_PASSWORD: 'hidden' CLOUDINARY_CLOUD_NAME: 'your-cloudinary-cloud-name' CLOUDINARY_API_KEY: 'your-cloudinary-api-key' CLOUDINARY_API_SECRET: 'your-cloudinary-api-secret' FACEBOOK_KEY: 'your-facebook-key' FACEBOOK_SECRET: 'your-facebook-secret'
-
It is recommended that you create a virtual environment here before proceeding with installation:
$ mkvirtualenv name_of_virtual_environment
-
Install all project's dependencies both backend and frontend by running the following commands in order (from project root):
$ pip install -r requirements.txt $ npm install $ bower install
-
To setup static files and database migrations, run (also in the project root):
$ python photo_magick/manage.py collectstatic $ python photo_magick/manage.py makemigrations $ python photo_magick/manage.py migrate
Run $ python photo_magick/manage.py runserver
to start the server.
To run tests:
$ python photo_magick/manage.py test --settings=photo_magick.settings.test
For coverage report:
$ coverage run --source=photo_editor photo_magick/manage.py test photo_magick --noinput --settings=photo_magick.settings.test
$ coverage report -m
GNU GPL
Visit PhotoMagick to play with the live app on heroku.