Intraman is a Django web application project aimed to provided the ERP solution for Intramanee.
Django Version: 1.6.11 (norel variant) Backed Database: MongoDB
- To install intraman, create a project in PyCharm,
- Pull source code from the repository.
- Create virtualenv for your working directory.
- Activate your virtualenv
source venv/bin/activate
orvenv\Scripts\activate.bat
in windows. - Install required django-norel module first
(venv) pip install git+https://github.com/django-nonrel/django@nonrel-1.5
(venv) pip install -r requirement.txt
- Sync necessary data
(venv) python manage.py syncdb
(venv) python manage.py loaddata lov
- Create your first superuser
(venv) python manage.py shell
>> from intramanee.common.models import IntraUser
>> IntraUser.objects.create_superuser('code', 'firstname', 'password')
- Login to system with just created user.
We are working on master
branch. deployed
is for certain deployed instance only. Only merged master to it when requested.
For deployment, setup application.wsgi
, then also collect all statics data to certain directories.
(venv) sudo apache2ctl restart
(venv) python manage.py collectstatic
Intramanee on AWS (EC2 - Ubuntu)
- URL: intra.intramanee.com
- IP ADDRESS: 54.179.186.189
- Branch:
deployed
To access as we do not have the domain name mapped just yet, edit your /etc/hosts
file. Add following content
54.179.186.189 intra.intramanee.com
- Database Migrating - During the implementation you would always come across data update. Or data index setup. To make that happen. You can simply call:
env/bin/python manage.py syncdb
However to make it work; you need to import your models within __init__.py
file of your based application file. If this works correctly, your database would then have the index setup properly.
- Database Preloaded data - to make this available, the system called this
fixtures
- Django will always look this up inapp/fixtures
directory. To make this data available simply; dump it from database by calling
env/bin/python manage.py dumpdata <app>.<module> > <dest_file>.json
(Table name)
Now to install preloaded data - make call to
env/bin/python manage.py loaddata <table name>
for example:
env/bin/python manage.py loaddata lov