ERP

ERP Development Design

29 Jul , 2015  

Here are the list we need consider when develop ERP. More in technical view.

1. Never trust Front-end validation
We must separate between front-end validation and backend validation.
Always check validation on backend to make sure the data is valid and correct.
To avoid any data updates in the middle of process.

2. Audit-trail
Audit-trail is important, therefore we need to have user session in every inserted data.
More…

postgres

Upload PostgreSQL not working, change the encoding may help

20 Jul , 2015  

When we upload and restore the backup into new postgresql server, sometimes we facing problem because encoding.
To solve this, we can use UTF-8 :

1
update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'your-database';

,

Ubuntu

Uwsgi on ubuntu 14.04 not working solution

12 Jul , 2015  

In Ubuntu 14.04, uwsgi that installed via apt-get will not working. To make it working, please use this steps:

1
2
sudo apt-get remove --purge uwsgi uwsgi-plugin-python
sudo apt-get install uwsgi uwsgi-plugin-python

Then follow this steps:

1
2
3
4
sudo pip install uwsgi
cd /usr/bin
sudo mv uwsgi uwsgi-old
sudo ln -s /usr/local/bin/uwsgi uwsgi

If still failed, follow this :

http://yodi.polatic.me/setup-latest-uwsgi-django-in-production-ubuntu-14-04/

Django

Setup Ubuntu Server in Softlayer for Django

10 Jul , 2015  

Here are a quick step to setup Ubuntu server in Softlayer for Django

1. Install depedencies

1
2
3
4
apt-get install python-software-properties software-properties-common
add-apt-repository ppa:webupd8team/java
apt-get update
sudo apt-get install oracle-java7-installer

2. Install UWSGI, Python, PostgreSQL and other modules

1
sudo apt-get install libpq-dev python-dev python-software-properties postgresql postgresql-contrib nginx git zip unzip build-essential python nmap libxslt1-dev python-pip imagemagick uwsgi uwsgi-plugin-python nmap

3. Another modules

1
sudo apt-get install git-core curl openssl libssl-dev pkg-config python-dev libxml2 libxml2-dev libxslt1-dev libbz2-dev libssl-dev p7zip-full unzip unace unp bzip2 gzip patch subversion git libmysqlclient-dev libmysqlclient-dev libmysqlclient18 php5 php5-mysql mysql-server

4. Setup UWSGI and NGINX