Blog信息 |
blog名称: 日志总数:1304 评论数量:2242 留言数量:5 访问次数:7620671 建立时间:2006年5月29日 |

| |
[Django]Django教程 软件技术
lhwork 发表于 2007/2/1 11:54:54 |
一、Hello Django!
1、生成项目目录
django-admin.py startproject newtedst这样就在当前目录下创建了一个newtest 目录,里面有四个文件: __init__.py 表示这是一个 Python 的package manage.py 提供简单化的 django-admin.py 命令,特别是可以自动进行DJANGO_SETTINGS_MODULES和 PYTHONPATH 的处理 settings.py Django的配置文件 uls.py url映射处理文件,Django 的url映射是url对于某个模块方法的映射,目前不能自动 |
|
[Django]TextIndexingAbstractionLayer 软件技术
lhwork 发表于 2007/2/1 11:53:15 |
Introduction Why do we need an abstraction layer for full-text indexing? Developers often must implement search methods for their database, but unfortunately so far it has been easier to roll your own simple search than to deploy an existing project such as Lucene. Merquery provides an abstraction layer for popular text indexing engines and makes it easy for anyone to attach them to their database.
Using Merquery You can enable Lucene indexing of a database table like so (assumi |
|
[Django]Merquery Summer of Code Results 软件技术
lhwork 发表于 2007/2/1 11:52:44 |
http://blog.case.edu/bmb12/2006/08/merquery_summer_of_code_results
This morning I commited a working version of Merquery to the Django Subversion repository.
svn co http://code.djangoproject....
My code in particular lives in branches/search-api/django/contrib/search.
The Lucene adapter |
|
[Django]More on Merquery 软件技术
lhwork 发表于 2007/2/1 11:50:24 |
http://blog.case.edu/bmb12/2006/03/more_on_merquery
A bunch of traffic has been directed to this blog due to the post about Merquery. Seems like there has been discussion going on in that posts's comments and also over at Jacob Kaplan-Moss' post.
As predicted, a lot of people are only seeing the "reinvention" aspect of Merquery. And admittedly, there is a lot that would need to be reinvented based on th |
|
[Django]Custom SQL In Django 软件技术
lhwork 发表于 2007/2/1 11:49:14 |
For people wanting to write custom SQL queries for use in Django and are wondering how to make them "fit in" somehow with the rest of your code, a short tutorial follows. Requires a little bit of familiarity with Django to be useful, I suspect.
Also, if you are interested in learning more about some of the more advanced corners of Django, there are a few other people writing instructional pieces at the moment. In general, have a look at the Django aggregator for recent updates, but, in p |
|
[Django]测试django的search api 大 | 中 | 小 软件技术
lhwork 发表于 2007/2/1 11:27:53 |
先定义一个model:
#newtest/wiki/person.py from django.db import models
class Person(models.Model): first_name = models.CharField(maxlength=30) last_name = models.CharField(maxlength=30) biography = models.TextField()
class Meta: db_table = 'person' 测试search api:
#newtest/wiki/test_searchapi.py import os< |
|
[Python]安装PyLucene 软件技术
lhwork 发表于 2007/2/1 11:20:49 |
1、安装gcc-3.4.4和gcj-3.4.4
tar -zxvf gcc-3.4.4.tar.gz tar -zxvf gcc-java-3.4.4.tar.gz mkdir build cd build ../gcc-3.4.4/configure --enable-threads=posix --prefix=/usr/local/gcc-3.4.4 --enable-languages=c,c++,java make bootstrap sudo make install export LD_LIBRARY_PATH=/usr/local/gcc-3.4.4/lib export PATH=/usr/local/gcc-3.4.4/bin:${PATH} 2、安装PyLucene
tar |
|
[Python]Python 学习笔记 (1) 软件技术
lhwork 发表于 2007/2/1 9:08:55 |
1、获取网页的方法
mport urllib
# GET params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) f = urllib.urlopen("http://www.musi-cal.com/cgi-bin/query?%s" % params) print f.read()
# POST params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) f = urllib.urlopen("http://www.musi-cal.com/cgi-bin/query", params) print f.read()
2、Cookie
|
|
站点首页 | 联系我们 | 博客注册 | 博客登陆
Sponsored By W3CHINA W3CHINA Blog 0.8 Processed in 0.109 second(s), page refreshed 144794488 times. 《全国人大常委会关于维护互联网安全的决定》 《计算机信息网络国际联网安全保护管理办法》 苏ICP备05006046号
|