Picha is a Django and AngularJs application, that allows a user upload a photo and apply effects, rotate, filters and write text on the photo. A user can then share the image to his Facebook wall or save the new image with effects. View the live demo of the application.
###Installation
- ######Requirements Ensure that python is installed on your machine, if not follow the link Installing Python.
- Python 2.7+
- Django
- Django REST framework
- AngularJS
- Facebook Javascript SDK
- Pillow
- Among others as listed in
requirements.txt
- ######Installing virtualenvwrapper A Virtual Environment is a tool to keep the dependencies required by different projects in separate directories on a computer. To install virtualenvwrapper follow the link installing virtualenvwrapper.
- ######Cloning the Repository
To clone the repo type the following command in terminal:
$ git clone git@github.com:andela-engmkwalusimbi/Picha.git
To install all app requirements type these command in your terminal one after the other:
$ pip install -r requirements.txt
-
######Setting Enviroment Variables To setup enviroment variables follow the env-variable setup tutorial, as they will be used with the app. Ensure your create
DATABASE_URL
,SECRET
,FACEBOOK_SECRET
andFACEBOOK_KEY
in your env variables. -
######Managing Database Setup To get started install Postgres on your local computer if you don’t have it already installed. if you haven't follow this configuring PostgreSQL and choose your appropriate OS. Run the following commands on the terminal to set up tables and manage upgrades to tables if you change your models.
- To create migrations, run the
migrate
command:
$ python manage.py migrate
Your database is now ready to use with the app.
###Running the App
To run the App
type the following command in your terminal:
$ python manage.py runserver
And the response on the terminal will look like:
System check identified no issues (0 silenced).
January 21, 2016 - 11:55:00
Django version 1.9, using settings 'picha.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
The default url is http://127.0.0.1:8000/
. Use this in the browser of your choice.
###Running Tests
To run tests type the following command in terminal:
$ python manage.py test