2007-08-28

RPM Command

Install : rpm -i software-2.3.4.rpm
Update :
rpm -U software-2.3.4.rpm
Install with dependencies problem :
rpm -i software-2.3.4.rpm --nodeps
Unistall :
rpm -e software-2.3.4
List :
rpm -qa | less, rpm -qa | grep name

2007-08-27

Untar command

1. .tar.bz2 use this : tar -jxvf filename.tar.bz2
2. .tar.gz use this : tar -zxvf filename.tar.gz

2007-08-26

Install Apache2 and mod_python on Ubuntu

Use this command sudo apt-get install apache2 libapache2-mod-python
This command for restart apache2 : sudo /etc/init.d/apache2 -k restart

Problem with Flex HTTPService ObjectProxy

Flash player can't convert ObjectProxy to ArrayCollection if you have only 1 item in ObjectProxy.

2007-08-23

How to send email with Django

1. In setting.py define and set values for EMAIL_HOST, EMAIL_HOST_USER and EMAIL_HOST_PASSWORD.
2. In your views import django.core.mail.EmailMessage and SMTPConnection.
3. Create instance of EmailMessage e.g
email = EmailMessage('subject', 'message', 'from_email', list of recipient)
4. Send email by use send method e.g email.send()
5. SMTPConnection use for set connection when you want to send multiple messages in one connection if not create SMTPConnection it will create connection every call send() method e.g
connection = SMTPConnection()
email = EmailMessage('subject', 'message', 'from email', [list of recipient email], connection=connection)