- Create a python virutal environement using conda or virtualenv
- Activate virtual environment using:
- source yourvirtualenvfolder/bin/activate (using virtualenv)
- source activate yourvirtualenvname (using anaconda)
pip install django==1.10.5 (the latest version (1.11.0 or later ) may cause some issues)
pip install django-debug-toolbar
(a handful debug tool for django)pip install django-registration-redux
(used for authentication, the reason why it requires login is because it is easier for the same user to upload multiple photoes, but it should be easy to change)pip install pillow (for image processing)
pip install pycryptodome (for image encryption)
pip install mysqlclient (for mysql db access)
python manager.py runserver
, If you have to create DB first, run the following:
python manage.py makemigrations
python manage.py migrate
- Create a MySql database in your localhost called maniahero
- Create a virtual host in /etc/apache2/sites-available/ (you can just drop in the mania.conf, this config file assumes you put your website under /var/www/Mania/, if you use a different location, you may need to change the config file accordingly)
- enable the site by running
a2ensite mania
- restart apache server by running
sudo service apache2 restart
This app use cropperjs which is a mobile friendly image crop tool https://github.com/fengyuanchen/cropperjs