Need your feedback
Site Search
-
Categories
- Actionscript (1)
- Django (28)
- iPhone (7)
- Javascript (12)
- Linux (13)
- Mac OS Basic (11)
- Misc (43)
- PHP (25)
- Python (2)
- Software Support (7)
- Uncategorized (1)
-
-
-
Category Archives: Django
Django custom template loader
class Loader(BaseLoader): is_usable = True
Posted in Django
Leave a comment
Apache2 Django WSGI Setup
Site Config file: <VirtualHost *:80> ServerName haonianhua0772.com ServerAlias *.haonianhua0772.com DocumentRoot /var/www/haonianhua/ WSGIDaemonProcess site_haonianhua user=haonianhua group=haonianhua threads=25 WSGIProcessGroup site_haonianhua Alias /media /var/www/haonianhua/media Alias /static /var/www/haonianhua/static Alias /admin-media /usr/lib/python2.5/site-packages/django/contrib/admin/media WSGIScriptAlias / /var/www/haonianhua/django.wsgi </VirtualHost>
Posted in Django
Leave a comment
python get html title
We want to get the html title from an url. With python library urllib2 and BeautifulSoup, we can easily done it. #!/usr/bin/env python import urllib2 import BeautifulSoup def Download( url ): d = urllib2.urlopen( url ) content = d.read() html … Continue reading