-
Notifications
You must be signed in to change notification settings - Fork 0
Editing Tools & Installation Instructions
http://nodejs.org
For Mac:
Install homebrew :
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install node.js :
brew install node
For Mac:
sudo npm install -g bower
**Windows: **
npm install -g bower
For Mac:
sudo npm install -g yo
**Windows: **
npm install -g yo
##2.3 Grunt
For Mac:
sudo npm install -g grunt-cli
**Windows: **
npm install -g grunt-cli
###2.4 Angular Generators
For Mac:
sudo npm install -g generator-angular
**Windows: **
npm install -g generator-angular
##3.0 Django Django needs pip!
###3.1 Pip
https://pip.pypa.io/en/latest/installing.html#install-pip
python ./get-pip.py
###3.2 Django
NOTE
Currently Django REST 3.0 is not supported so do pip install djangorestframework==2.4
instead
For Mac:
pip install Django
pip install djangorestframework
pip install markdown
pip install django-filter
pip install django-cors-headers
pip install django-debug_toolbar
pip install python-social-auth
pip install git+https://github.com/cpbotha/django-undelete.git
sudo pip install simplejson
pip install django-taggit
pip install django-secretballot
pip install celery
pip install django-celery
pip install django-softdelete
pip install geopy
pip install pilkit
pip install Pillow
pip install elasticsearch
**Windows: **
python -m pip install Django
python -m pip install djangorestframework
python -m pip install markdown
python -m pip install django-filter
python -m pip install django-cors-headers
python -m pip install django-debug_toolbar
python -m pip install python-social-auth
python -m pip install simplejson
python -m pip install django-taggit
python -m pip install django-secretballot
python -m pip install celery
python -m pip install django-celery
python -m pip install django-softdelete
python -m pip install geopy
python -m pip install pilkit
python -m pip install Pillow
python -m pip install elasticsearch
##4.0 MySql
http://dev.mysql.com/downloads/mysql/
http://sourceforge.net/projects/mysql-python/
###4.1 MySql-Python
For Mac:
export PATH=$PATH:/usr/local/mysql/bin/
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
pip install mysql-python
**Windows: **
I had to rename a folder from mysqldb to MySQLdb for the server to work
##5.0 Haystack/elastic search
###5.1 Install Haystack
sudo pip install django-haystack
###5.2 Install Elastic Search
See install instructions here
Alternatively, to install from repositories (apt, yum), see here
###5.3 Run Elastic Search
sudo /etc/init.d/elasticsearch start
###5.4 Rebuilding Elastic Search Index
Everytime we add items, we must rebuild index (for now). Later we can employ other techniques.
cd src/server
python manage.py rebuild_index
##6.0 Running TIME!
###6.1 Run Server
cd src/server
python manage.py runserver
###6.2 Run Client
cd src/client
npm install
bower install
grunt serve
##7.0 Working Backendy
###7.1 Useful Links
DJANGO https://www.djangoproject.com
DJANGO REST http://www.django-rest-framework.org
###7.2 Updating Database
Whenever you change models.py you need to run
python manage.py syncdb
In case you are using django 1.7 or later:
python manage.py makemigrations be_local_server
python manage.py migrate be_local_server
##8.0 Working Frontend
###8.1 Useful Links
CSS/HTML http://getbootstrap.com/css/
ANGULAR https://docs.angularjs.org/
###8.2 Creating New Angular Views
Creating View “Client”
yo angular:view client
yo angluar:controller client
##9.0 In case of Issues
###9.1 If you lack JPEG decoder
A symptom of this is image scaling and cropping not working. Please try:
(On Mac)
pip uninstall Pillow
brew install libjpeg
pip install Pillow
(On Linux)
pip uninstall Pillow
apt-get install libjpeg-dev
pip install Pillow
###9.2 Problems with Allow_Add_Remove
pip uninstall djangorestframework
pip install djangorestframework==2.4