An API implementation for Saarang Shaastra like fests, including ERP and Mainsite and Mobile interface
Setup :
# python -c "import django; print(django.get_version())"
If it gives 1.6.5
Then continue. Else, uninstall and reinstall django
python-virtualenv libmysqlclient-dev python-dev mysql-server mysql-client
pip install -r configs/requirements.txt (read 8.c if pip is not installed.
pip install -r configs/requirements.txt --upgrade
Changes required - which are in gitignore
# mysql -u root -p
mysql> CREATE DATABASE fest_api_db;
Change the DATABASE lines in settings.py to :
'ENGINE':'django.db.backends.mysql',
'NAME': 'fest_api_db',
'USER': 'root',
'PASSWORD': '<YOUR_PASSWORD>',
'HOST': '',
'PORT': '',
Setup Database :
Management command populate_db
can be used to get dummy data (IMPORTANT)
Management command add_colleges
is used to populate some data - Colleges from Shaastra 2014 (optional) (In other words type 'python manage.py add_colleges')
Management command update_email_templates
is used to update email templates and store onto the database for Django Post office (optional)
Management command jsonify_data
is used by atwho for data. Autogenerates some json objects which are easy to use
Management command fix_permissions
is used to fix all permissions for the users in the beginning
Setup Social Accounts : (NOT REQUIRED)
Go to {{SITE_URL}}/docs/refresh_token
to create a new refresh token.
This will ask access to a Google account - use the account on which to store Docs and accept.
Now this will store the refresh_token in a configs file and ask you to restrat server.
Restart Server to refetch all settings.
Now you can access Google Drive and Google Picker API
Also, add google credentials into settings
Search using Solr (NOT REQUIRED)
curl -O https://archive.apache.org/dist/lucene/solr/3.5.0/apache-solr-3.5.0.tgz
tar xvzf apache-solr-3.5.0.tgz
cd apache-solr-3.5.0
cd example
java -jar start.jar
python manage.py build_solr_schema
apache-solr-3.5.0/example/solr/conf/schema.xml
Common Installation Problems
a. Static files are not loading Or the css files are not showing - set STATIC_URL to '/static/' in settings.py
b. If you get the error meta.html not found - set STATIC_URL to '/static/' in settings.py
c. Static(css/js) files are loading but not getting the shaastra/saarang logo on the login page
files/static/img/shaastra_pics
to files/static/img/fest_pics
or files/static/img/saarang_pics
to files/static/img/fest_pics
d. Some Module like apiclient, south or any app mentioned in the Third-Party-Apps in globalsetings.py is not installed.
- Google 'install apiclient library' or whatever the module name is and type the command that you find in any of the results in terminal