Django

Pyhton dest-package

python -c "import sys; sys.path = sys.path[1:]; import django; print(django.__path__)"

If wanna to uninstall previous version of django, just remove the directory of the django.

Set up a database - Postgresql

https://docs.djangoproject.com/en/1.6/ref/databases/#postgresql-notes



django-admin.py startproject mysite



mysite/
    manage.py
    mysite/
        __init__.py
        settings.py
        urls.py
        wsgi.py
----------------------------------------------------------------------------------------------------------------------------------
#開啟除錯模式
DEBUG=True
#開啟除錯模式的樣版
TEMPLATE_DEBUG=DEBUG
TIME_ZONE='Asia/Taipei'
LANGUAGE_CODE='zh-tw'

Install Apache2, PHP5, MYSQL, phpmyadmin ON UBUNTU

Step 1 : Install Apache2
1.Use Synaptic Package Manager -> Apache2
2. sudo pico /etc/apache2/conf.d/fqdn
3. type :   ServerName    localhost(or IP)
------------------------------------------------------------
Step 2 : Install PHP5

1.Use Synaptic Package Manager -> PHP5
2. sudo a2enmod php5
3. sudo gedit /etc/php5/apache2/php.ini
4. Change the memory_limit to 256 or 512

------------------------------------------------------------
Step 3 : Install MYSQL
1. sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
------------------------------------------------------------
Step 4 : Install phpmyadmin
1.Use Synaptic Package Manager -> phpmyadmin
2. sudo gedit /etc/apache2/apache2.conf
3. type the following code at bottom page
Include /etc/phpmyadmin/apache.conf

Change the terminal font size

System ->
Preferences ->
Appearance ->
Fonts ->
Fixed width font  -> 14

su: Authentication failure

sudo passwd root

Cough

魚腥草
雞屎藤
羊咩草
(乾)



熱咳 / 冷咳