Thursday, February 27, 2014

Django migrations with South module

Django migrations with South

South is an “intelligent schema and data migrations for django projects”
In this post we will go through the steps required in order to set up south in your django project.

JavaScript based charts in Django made easy with Chartkick application

Installation

We start with the usuwall pypi installation:
pip install chartkick
W settingsach Django dodajemy:
INSTALLED_APPS = (
    'chartkick',
)

import chartkick
STATICFILES_DIRS = (
    chartkick.js(),
)
Now we have to add some JS files in our templates. We have to pick which chart backend we want to use - Google Charts or Highcharts (you can change that any time). For Google Charts add:
<script src="http://www.google.com/jsapi"></script>
<script src="static/chartkick.js"></script>
For Highcharts:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="static/chartkick.js"></script>

Friday, February 14, 2014

Linux / UNIX: Print Current Working Directory with pwd command

Q. How do I display the absolute path to the current working directory under Linux or UNIX operating system?
A. The pwd command displays the absolute pathname of the current working directory to the computer screen.

Wednesday, February 12, 2014

Hướng dẫn cài LAMP cho Ubuntu

LAMP là chữ viết tắt thường được dùng để chỉ sự sử dụng các phần mềm Linux, Apache, MySQL và ngôn ngữ văn lệnh PHP hay Perl hay Python để tạo nên một môi trường máy chủ Web có khả năng chứa và phân phối các trang Web động. Bài viết sau sẽ hướng dẫn các bạn cài đặt máy chủ web Apache2 trên Ubuntu 11.10 server với PHP5 hỗ trợ cho mod_php và MySQL.