2009-08-09:
Here are several other things I am researching how to do:
1. Google WAVE: How it connects to GAE, and how it compares to T3?
2. How to extract a sitemap from the T3 WIKI in a format suitable for input to the Google Spider Crawler so that Google will return substantial results on a search of the T3 Wiki site.
Two recommended steps to assist the Crawler are:
i) Submit general sitemap specified by sitemap.org, a joint effort by Google, Yahoo, Microsoft.
ii) Declare sitemap URL in robots.txt
Here are several other things I recently figured out how to do:
1. Treeview using Asynchronous Ajax - I finally got this to work in web2py T3
2. Programming 'In the Cloud' in T3. - I got the first step working - see note on calling Procedures in T3 below.
3. DALnr for web2py
I got this to work using PolyModel
------------------------------------------------------------------------------------------------------------------
GAE Datastore Full Text Searching
I found some links that explain how to do a simple Full Text Search on the datastore
http://groups.google.com/group/google-appengine/browse_thread/thread/113020d7cbd69d8d
http://appengineguy.com/2008/06/how-to-full-text-search-in-google-app.html or
http://appengineguy.com/search?q=full+text+search
DALnr for web2py?
There is a consideration to directly support the new generation of non relational datastores such as in GAE by creating a special version of the web2py DAL, perhaps to be referred to as the DALnr. As of 2009-05-30, there has been more recent discussion of a strong commitment to a DALnr and to the GAE. The step is to refactor the web2py DAL, and that is in progress over the next few weeks.
Overriding CRUD to use a custom View form
There has been a lot of discussion lately about how to point CRUD to a custom .html. None of the proposed solutions appears to work for me.
Here is my own proposal #1 :
It is based on this clue Just In:
HTML helper and widget Component list manipulation example is here:
http://groups.google.com/group/web2py/browse_thread/thread/19ba7b69cde0a93d
I found I could use
form.components[0].append(myfield)
The above clue will allow me to apply my "Scrounge for Scraps" software pattern to design the ulimate solution to this problem.
I would like to coin the new term 'Scavenger Software Design Pattern' to describe the approach used in this solution: To find the core object instances of an autogenerated context, and then house them in a new customized view.
In the Database Definition
-------------------------------------
db.define_table('testtable',SQLField('testfield1','string'),SQLField('testfield2','string'))
db.testtable.testfield1.requires=IS_NOT_EMPTY()
In the Controller
-----------------------
form=crud.update(db.testtable,id)
mycomponents = form.components[0]
myField1INPUT = mycomponents[0]
mydict= dict(form=form, myField1INPUT = myField1INPUT )
return mydict
In the View Markup:
----------------------------
<form action="index" enctype="multipart/form-data" method="post">
<table>
<tr>
<td>
<label for="testtable_testfield1" id="testtable_testfield1__label">My Custom Testfield1: </label>
</td>
<td>
{ {=myField1INPUT} }
</td>
</tr>
</table>
</form>
{ {=form.hidden_fields() } }
Notable Tricks in the above snippet:
1. Do NOT include the { { =form } } at the top of the View .html
=form is not desired in this case because it would generate the crud markup which we
are trying to override.
2. Do put the special expression for form.hidden_fields() at the end
It is used to enable the error messages per field such as 'cannot be empty'
We also need to create a new method named "FindControl()" similar to what is in ASP.NET.
There is an new way to do it now (as of Aug 2009):
Example:
{ {=form.custom.begin} }
{ {=form.custom.widget.email} }
{ {=form.custom.widget.password} }
{ {=form.custom.submit} }
{ {=form.custom.end} }
Using Microsoft SQL Server from web2py
The MSSQL Driver is pymssql from http://pymssql.sourceforge.net/ which had a major bug fix release on 2009-04-28.
I downloaded it and modified the web2py DAL code in sql.py to use pymssql drivers.
It works well. I was able to have 2 database connections active at the same time - the usual 'db' connection to SQL Lite, and the new mssql connection which I named 'dbmssql'. Internally the sql.py code uses a database cursor created by pymssql and then does a fetchall() to return the complete list of query results. It would also be possible to iterate on the cursor to visit the result rows individually, but in practice this should not be necessary as it is not a good idea to query for more rows than can reasonably fit into memory.
Calling a method you have typed into the T3 Procedures Page
For some bizarre reason, when you use @expose in T3 Manage .. Procedures,
you have to add 2 extra arguments with exactly these names: rndval and callback:
Example:
@expose
def mock_markets(parentId, leafId, rndval, callback):
NHY2Un <a href="http://gwebeqsldixj.com/">gwebeqsldixj</a>, [url=http://aimqpsziygzo.com/]aimqpsziygzo[/url], [link=http://ctahmvxcbyhm.com/]ctahmvxcbyhm[/link], http://fjizicjfkgjc.com/
zqxbtctb http://bcmvodqe.com cpmshijh jirmulcn <a href="http://gsbenzwz.com">aweamqop</a> [URL=http://gpjojejs.com]mafkwmox[/URL]