I need to create an application to manage a small (fewer than 1,000 members) association database. The usual name address phone etc fields, plus transaction data on payments made etc.
I plan to use web2py, and fortunately know a Python friend who is willing to help me get started. He has never used web2py and has not tried GAE Is GAE the right choice, or would I be better advised to use a commercial web hosting site such as http://bluehost.com? If someone has already created a membership management database app and is willing to share, that would be most awesome. be well --- Ron K. Jeffries [email protected] On Fri, Feb 25, 2011 at 12:53, <[email protected]> wrote: > Today's Topic Summary > > Group: http://groups.google.com/group/web2py/topics > > Creating Tables That Allow NULL with MSSQL [1 Update] > Table Alias [6 Updates] > More general question: "matchmaking" based on survey/quiz results [1 Update] > IS_DATE_IN_RANGE & IS_NOT_IN_DB [4 Updates] > newb - a postgres database view [1 Update] > Crud onvalidation [1 Update] > web2py database administration [4 Updates] > web2py getting some recognition [1 Update] > The two halves of cache management - what's the recommended method of > flushing? [1 Update] > need help on ajax() post [1 Update] > background operations? [1 Update] > Redirect & response.flash [1 Update] > > Topic: Creating Tables That Allow NULL with MSSQL > > Ross Peoples <[email protected]> Feb 25 12:41PM -0800 ^ > > I am running into a problem where web2py creates all the tables in my MSSQL > database with fields that do not allow NULL values. This is regardless of > the notnull=False setting on the fields. > > I am using mssql:// as the adapter and having web2py create table > structures. A test table definition: > > db.define_table('test_table', > Field('field_allows_null', notnull=False), > Field('field_rejects_null', notnull=True) > ) > > In MSSQL, both fields will get created to reject NULL values. > > > > Topic: Table Alias > > DenesL <[email protected]> Feb 25 08:27AM -0800 ^ > > Instead of using db.GlobalSettings you can assign it to a variable > > global_settings = db.GlobalSettings > > and use the var in place for all practical purposes e.g. > > db().select(db.GlobalSettings.ALL) > > becomes > > db().select(global_settings.ALL) > > > > > > Ross Peoples <[email protected]> Feb 25 11:32AM -0500 ^ > > True, but I'd still have the issue of: > > db().select(global_settings.SettingName) > > when using any field names. > > On Feb 25, 2011, at 11:27 AM, DenesL wrote: > > > > > Vasile Ermicioi <[email protected]> Feb 25 06:42PM +0200 ^ > > http://weblogs.sqlteam.com/mladenp/archive/2006/12/07/44176.aspx > > if you use a case insensitive collation you can use lower case, but without > underscore > > db.define_table('globalsettings', Field('settingname')) > > rows = db(db.globalsettings).select() > > > > Ross Peoples <[email protected]> Feb 25 11:59AM -0500 ^ > > I believe we are using case insensitive collation, but I we weren't we'd be > screwed...as would any PostgreSQL user with forced capitals in the table > names. What is the web2py convention for naming tables and fields anyways? > > On Feb 25, 2011, at 11:42 AM, Vasile Ermicioi wrote: > > > > > DenesL <[email protected]> Feb 25 12:03PM -0800 ^ > > What issue?. > > > > > > Ross Peoples <[email protected]> Feb 25 03:33PM -0500 ^ > > I guess this was more of a feature request, since I will soon have to tackle > an application using PostgreSQL that forces case-sensitive naming. > > On Feb 25, 2011, at 3:03 PM, DenesL wrote: > > > > > Topic: More general question: "matchmaking" based on survey/quiz results > > Lorin Rivers <[email protected]> Feb 25 02:07PM -0600 ^ > > I want to connect users on a site based on their responses to a series of > questions (some sample questions): > Smoker? [y/n] (possibly with a flip-side question: Tolerate smokers? [y/n]) > Carnivore or Vegetarian? > > and so on, with a goal of finding other "compatible" people who've taken the > survey. > > Can you think of a light-weight solution? > > Thanks! > > -- > Lorin Rivers > Mosasaur: Killer Technical Marketing <http://www.mosasaur.com> > <mailto:[email protected]> > 512/203.3198 (m) > > > > Topic: IS_DATE_IN_RANGE & IS_NOT_IN_DB > > greenpoise <[email protected]> Feb 25 11:01AM -0800 ^ > > How could I combine these two? I have a table that accepts two dates. > I would not like duplicates between in those entry dates. > > Basically a From Date and a To Date > > > Thanks > > Dan > > > > Jonathan Lundell <[email protected]> Feb 25 11:14AM -0800 ^ > > On Feb 25, 2011, at 11:01 AM, greenpoise wrote: > >> How could I combine these two? I have a table that accepts two dates. >> I would not like duplicates between in those entry dates. > >> Basically a From Date and a To Date > > So the restriction is essentially: no overlapping date ranges in the > database? > > > > > greenpoise <[email protected]> Feb 25 11:23AM -0800 ^ > > exactly, no overlapping date ranges > > > > > > > > > Jonathan Lundell <[email protected]> Feb 25 12:00PM -0800 ^ > > On Feb 25, 2011, at 11:23 AM, greenpoise wrote: > >> exactly, no overlapping date ranges > > If I were doing it, I think I'd start with a (renamed) copy of > gluon.validators.IS_NOT_IN_DB in my model file, and change it to do a range > check on two fields, instead of an equality check on one. > > I'm sort of fuzzy on how you do date comparisons, but presumably there's a > way. > > > > > Topic: newb - a postgres database view > > pbreit <[email protected]> Feb 25 11:55AM -0800 ^ > > A simple "thank you" would suffice. > > > > Topic: Crud onvalidation > > greenpoise <[email protected]> Feb 25 11:53AM -0800 ^ > > I have a simple validation according to the books page 296. Is > actually simpler and it is not even being evaluated, no errors > either... Here it is: > > def f(form): > if form.vars.suns>form.vars.sunv: form.errors.sunv="cant be > more than 9" > > > return dict(employee=employee,form=form,onvalidation=f) > > > > Topic: web2py database administration > > stargate <[email protected]> Feb 25 08:50AM -0800 ^ > > But how do you make it so that it will generate a Registration ID > automatically. When i create a new application with the db wizard and > connect to the sqllite database I don't have any of these problems. I > can create a new user with out giving a registration id > > > > > Anthony <[email protected]> Feb 25 10:30AM -0800 ^ > > On Friday, February 25, 2011 11:50:40 AM UTC-5, stargate wrote: > >> automatically. When i create a new application with the db wizard and >> connect to the sqllite database I don't have any of these problems. I >> can create a new user with out giving a registration id > > web2py doesn't generate the registration_id -- it is something received from > Janrain when a user logs in via Janrain. If the login isn't happening via > Janrain, then there won't be any registration_id. If you want to avoid that > error, I think you have three options: > > 1. Enter your own unique registration_id for each user in appadmin (I > think any unique string should work, including just repeating the username > or email); > 2. Add new users via the regular application registration form (i.e., > /[your_app]/default/user/register) instead of via appadmin. The standard > registration form doesn't show the registration_id field (because readable = > writable = False), so I don't think it ends up getting validated, and > therefore there is no validation error; or > 3. Remove the following line: > > db.auth_user.registration_id.requires = IS_NOT_IN_DB(db, > db.auth_user.registration_id) > > > As far as I can tell, the registration_id error you're getting in appadmin > should happen any time you use the wizard to create an app with auth, even > using SQLite (I get the same error when I try it). Anyway, it should be easy > enough to avoid via the above options. > > Anthony > > > > > > > stargate <[email protected]> Feb 25 11:19AM -0800 ^ > > Thanks for all the help it triggered a idea I will try > > > > > Anthony <[email protected]> Feb 25 11:27AM -0800 ^ > > On Friday, February 25, 2011 2:19:17 PM UTC-5, stargate wrote: > >> Thanks for all the help it triggered a idea I will try > > > No problem. Let us know what you do and how it works. > > Anthony > > > > Topic: web2py getting some recognition > > ron_m <[email protected]> Feb 25 09:26AM -0800 ^ > > https://groups.google.com/d/msg/comp.lang.python/iEV5oyLApHI/laV-P_Q6sG0J > > > > Topic: The two halves of cache management - what's the recommended method > of flushing? > > Carl <[email protected]> Feb 25 09:18AM -0800 ^ > > Web2py has an elegant interface to using cache (ram/disk/memcache) but > is there a hole when it is applied to database actions? > > When using database .select() statements one can specify the use of > caching using... > e.g., ... .select(cache=(cache.ram, 60 * 60 * 24)) # cache result for > a day > > To flush a cache I can't find a clean/targeted solution. > > I've read postings (mdipierro, 9mar2010): > ... after insert/update/delete you do > db(...).select(cache=(cache.disk,0)) > > or: > cache.ram.clear(db._uri + '/SELECT') > > The former flushes all the contents of the cache and the latter, using > the private variable _uri, restricts the flush to all database > selects. > > Is there a better way extend Web2py's cache system to supporting > databases? > > Can we get one more step of specificity? Namely, can we limit the > flush to a specific table or tables? > > > > Topic: need help on ajax() post > > DenesL <[email protected]> Feb 25 08:51AM -0800 ^ > > Please tell us which web2py version, which browser, which OS, etc. > > > > > > Topic: background operations? > > mika <[email protected]> Feb 25 08:22AM -0800 ^ > > Hello, My application needs to download ON DEMAND some data from external > xml. I would like user to can start the process, and just see that the job > was started, and then to use application normally. The downloading and > parsing xml happens in the background, after this user is notified (flash > popup?). How to achieve this? I checked about cron, I checked about services > and background process but I am not sure is it proper way to do that. BR, > Mika > > > > Topic: Redirect & response.flash > > Jonathan Lundell <[email protected]> Feb 25 08:11AM -0800 ^ > > On Feb 25, 2011, at 2:02 AM, SergeyPo wrote: >> redirect(URL(r=request, f='headers', args=(request.args[1]))) > >> response.flash does not keep its value when you redirect. Is it >> possible to fix or workaround? > > As others have already said, you want to use session.flash here. It's useful > to understand why. > > Redirect is itself a response, sending a redirection code and the new URL to > the requesting browser. When that happens, everything in response, including > response.flash, is discarded--the redirection becomes the entire response. > > On every request from the browser, web2py initializes a new response > dictionary (along with request and some other stuff). It sets response.flash > = session.flash, and then sets session.flash = None. So anything you store > in session.flash is used as response.flash for the *next* request/response, > which is exactly what you want when you're calling redirect. > >

