[web2py:17589] Re: Does web2py support memcached as a session store ?

2009-03-05 Thread Markus Gritsch
2009/3/5 mdipierro : > > I am not opposing, just asking... isnt this file already too fat? I agree it is already quite big. But until the auth stuff is documented in the regular documentation I was not opposed to your decision to add all those comments. > Why include memcaching on GAE and not r

[web2py:17588] Re: Trouble creating Bazaar branch

2009-03-05 Thread Yarko Tymciurak
Ok - I new this was rattling around in my memory somewhere... I just JUST experienced this "expected a boundary, got '' " error, and I logged out of my corporate VPN (that is, I got out from behind the proxy into "free" internet) and the problem went away. AHA! I remember seeing something

[web2py:17587] Re: Sessions are destroyed by ajax calls?

2009-03-05 Thread SergeyPo
I found other posts here with same problem, all unanswered. Please reply do you have positive examples of jQuery sending cookies with ajax? I tried to pass session-id with hidden form field but get other strange error. Controller function (called by ajax): from gluon.storage import Storage def

[web2py:17586] Re: db insert override default id

2009-03-05 Thread mdipierro
Why would anybody do such a thing? This can break the integrity of the database. Massimo On Mar 5, 11:08 pm, ceej wrote: > I know that MySQL and sqlite allow you to do this and I would think > the other databases do also. > > On Mar 4, 9:32 pm, mdipierro wrote: > > > The problem is not web2py'

[web2py:17585] Re: db insert override default id

2009-03-05 Thread ceej
I know that MySQL and sqlite allow you to do this and I would think the other databases do also. On Mar 4, 9:32 pm, mdipierro wrote: > The problem is not web2py's. The problem is, to all supported backends > allow this? > > On Mar 4, 2:20 pm, ceej wrote: > > > > > I know, leave that as default

[web2py:17584] Re: Error with MySQL BUT fine with SQLITE - Tools.py

2009-03-05 Thread mdipierro
Thanks for reporting this. this is the nastiest bug in long time. http://groups.google.com/group/web2py/t/f1dab11ffb1ec337 On Mar 5, 10:04 pm, Yannick wrote: > Hello Mate, > Using latest trunk Version 1.57 > Here is the model: > . > db =SQLDB('mysql://userName:p...@localhost:3306/dbname')

[web2py:17583] Re: Error connecting to Mysql DB !

2009-03-05 Thread mdipierro
I think I found the source of the problem in case 3 below and I fixed it in trunk. Other users should not have your problem any longer. When you do a migration for your own table, make sure the field has a default='value' else MySQL does not know what to put in the column when it re-creates it, be

[web2py:17582] MySQL Users: Major bug problem

2009-03-05 Thread mdipierro
Our user Yannick discovered a problem. In web2py reference fields for MySQL are defined as "INT NOT NULL". The "NOT NULL" appears only for MySQL and thus causes it to behave differently than any other database. This should be considered a bug but changing it would break backward compatibility.

[web2py:17581] Re: Error connecting to Mysql DB !

2009-03-05 Thread mdipierro
there are three types of migrations: 1) adding a column 2) dropping a column 3) modifying a column web2py in case 3 trying to move your data from the old table to the new table. This seems to fail in MySQL. I do not why in this particular case. Some times this fails for logical reasons (the field

[web2py:17580] Error with MySQL BUT fine with SQLITE - Tools.py

2009-03-05 Thread Yannick
Hello Mate, Using latest trunk Version 1.57 Here is the model: . db =SQLDB('mysql://userName:p...@localhost:3306/dbname') class MyAuth(Auth): def __init__(self, environment, T, db= None): . . auth = MyAuth(globals(), T,db) auth.define_tables() Here is the controller:

[web2py:17579] Re: How to know contents in request, response, etc

2009-03-05 Thread weheh
Sorry, it was a total newbie question as I was struggling to find it in the paper doc and I forgot to look at the cheat sheet. Thx all. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To

[web2py:17578] Re: Error connecting to Mysql DB !

2009-03-05 Thread Yannick
Thanks Massimo for your suggestion... NoThe data is not crytical now since I still in the development-testing phase. I follow your advise and it work fine now. however I wonder how to deal with this kind of situation when I'll go live with critical data... Do you please have any suggestion how to

[web2py:17577] Re: Error connecting to Mysql DB !

2009-03-05 Thread mdipierro
I do not know why mysql refuses to complete this particular migration that increases the default length of fields (required to avoid further problems later). If your data is not crytical, I suggest recreate the database (from outside web2py) and erase the .table files in your app/databases folder

[web2py:17576] Re: The missing update_record() in DAL document

2009-03-05 Thread mdipierro
It is still there. I will check and amend the docs On Mar 5, 7:57 pm, Iceberg wrote: > Hi Massimo, > > In old web2py versions, developers can update a single record by: > > # Suppose you have already inserted a record and then search it into a > variable "me".>>> me.update_record(name="Max") > >

[web2py:17575] Re: Error connecting to Mysql DB !

2009-03-05 Thread Yannick
Hello Massimo, I installed the latest trunk Version 1.57 from here (http:// code.google.com/p/web2py/source/checkout ) and I'm having the same problem as before same error message on the same application when trying to access the login page... Here is the error: Error traceback Traceback (most r

[web2py:17574] The missing update_record() in DAL document

2009-03-05 Thread Iceberg
Hi Massimo, In old web2py versions, developers can update a single record by: # Suppose you have already inserted a record and then search it into a variable "me". >>> me.update_record(name="Max") >>> me.name 'Max' The feature still exists in latest web2py 1.57 but missing descriptions in DAL d

[web2py:17573] Re: How to know contents in request, response, etc

2009-03-05 Thread Iceberg
One more tips for new comers. You can find an example named "status" in here: http://mdp.cti.depaul.edu/examples/default/examples or just here: http://mdp.cti.depaul.edu/examples/simple_examples/status to know every available resources in request or response. Btw, by default recent versions o

[web2py:17572] Re: web2py on dreamhost shell account?

2009-03-05 Thread Mike Axelrod
I have successfully set up web2py on my dreamhost account thanks to this thread and the instructions on http://wiki.dreamhost.com/Web2py Thank you all. I do have a comment/question: To get it to work I ended up putting the entire contents of the web2py package in my webroot. This seems a bit m

[web2py:17571] Re: defining tree structure model problem

2009-03-05 Thread mdipierro
Your suggestions works but it will not be enforced at the database level: I suggest instead db.define_table("TreeStructure", SQLField("name", "string",notnull=True, default=None), SQLField("parentID", "reference TreeStructure")) Massimo On Mar 5, 4:40 pm, DenesL wrote: > db.defi

[web2py:17570] Re: defining tree structure model problem

2009-03-05 Thread DenesL
db.define_table("TreeStructure", SQLField("name", "string",notnull=True, default=None), SQLField("parentID", "integer")) db.TreeStructure.parentID.type="reference TreeStructure" --~--~-~--~~~---~--~~ You received this message because you are subscribed

[web2py:17569] Re: Preselect in Drop Down

2009-03-05 Thread DenesL
v=db(db.project.name=="Test).select(db.project.id)[0].id SELECT(_size="1",_name="project",_type="select", value=v, *[OPTION(x.name,_value=x.id) for x in db().select(db.project.ALL)]) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

[web2py:17568] defining tree structure model problem

2009-03-05 Thread Jurgis Pralgauskis
Hello, if I define like this: db.define_table("TreeStructure", SQLField("name", "string",notnull=True, default=None), SQLField("parentID", db.TreeStructure)) I get KeyError: 'TreeStructure' :/ how can I workaround? I guess -- first create table, then alter it but I am too busy to e

[web2py:17567] Re: Does web2py support memcached as a session store ?

2009-03-05 Thread mdipierro
I am not opposing, just asking... isnt this file already too fat? Why include memcaching on GAE and not ram caching on non-GAE? Massimo On Mar 5, 2:48 pm, Markus Gritsch wrote: > On Wed, Mar 4, 2009 at 4:35 PM, Markus Gritsch wrote: > > On Wed, Mar 4, 2009 at 3:51 PM, Robin B wrote: > > >> I

[web2py:17566] Re: Does web2py support memcached as a session store ?

2009-03-05 Thread Markus Gritsch
On Wed, Mar 4, 2009 at 4:35 PM, Markus Gritsch wrote: > On Wed, Mar 4, 2009 at 3:51 PM, Robin B wrote: >> >> I have been using MEMDB to store sessions in memcache since August >> 2008: >> http://groups.google.com/group/web2py/browse_thread/thread/cd89f11de4d23b53/f67faac66a695ca2?hl=en&lnk=gst&q=

[web2py:17565] Re: 1.57: Can't define db in admin interface

2009-03-05 Thread Guido Kollerie
On 5-mrt-2009, at 19:56, mdipierro wrote: > This is in trunk and I think it is fixed. Can you give it a try? Seems to work just fine. Thanks! -- Guido --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web

[web2py:17564] Preselect in Drop Down

2009-03-05 Thread DJ
Hello, Any ideas on how to preselect a condition in the following case? SELECT(_size="1",_name="project",_type="select", *[OPTION (x.name,_value=x.id) for x in db().select(db.project.ALL)]) basically want to do selected="selected" if x.name == "Test" Thanks a lot for helping! cheers, Sebastia

[web2py:17563] Re: 1.57: Can't define db in admin interface

2009-03-05 Thread Markus Gritsch
On Thu, Mar 5, 2009 at 7:56 PM, mdipierro wrote: > > This is in trunk and I think it is fixed. Can you give it a try? Seems to work fine. Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framewor

[web2py:17562] Re: Source repository confusion

2009-03-05 Thread Markus Gritsch
Hi, the repos are now quite in sync except for the few remaining differences shown in the attached file. Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, se

[web2py:17561] Re: How to get application name

2009-03-05 Thread mdipierro
request.application On Mar 5, 1:32 pm, weheh wrote: > I want to say: > > response.flash = 'Welcome to %s' % > > Fill in the with a web2py system variable that has the name of my > application. --~--~-~--~~~---~--~~ You received this message because you a

[web2py:17560] How to get application name

2009-03-05 Thread weheh
I want to say: response.flash = 'Welcome to %s' % Fill in the with a web2py system variable that has the name of my application. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group

[web2py:17559] Re: Using IS_IN_DB with existing data

2009-03-05 Thread Jim
I think it's probably because of this: db.define_table('us_states', SQLField( 'state', 'string',length=2), SQLField( 'name', 'string',length=20)) db.define_table('us_data', SQLField( 'area_code', 'string', length=3), SQLField( 'city', 'text', length=25), SQLField( 'state', 't

[web2py:17558] Re: Using IS_IN_DB with existing data

2009-03-05 Thread mdipierro
we need more details. On Mar 5, 11:18 am, Jim wrote: > I want to bulk upload some data. > > What I've noticed in testing is that I had something like this: > > info=whatever,state=NJ,moreinfo=something > > I decided I better make sure the state is in standard format so I > added > > db.data.stat

[web2py:17557] Re: Using IS_IN_DB with existing data

2009-03-05 Thread DenesL
In my 1.56.4 admin the state dropdown option is correctly set to the value from the record. BTW, aren't you missing AL from the list? It comes before AK. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Fra

[web2py:17556] Re: 1.57: Can't define db in admin interface

2009-03-05 Thread mdipierro
This is in trunk and I think it is fixed. Can you give it a try? On Mar 5, 11:06 am, mdipierro wrote: > I think the bug is in applications/admin/static/ajax_editor.js > > function prepareMultiPartPOST(data) > > Can you replace the function with > > function prepareMultiPartPOST(data) { >     var

[web2py:17555] Re: Critical point in web2py

2009-03-05 Thread Francisco Gama
Many open source projects use MoinMoin wiki engine.It's good enough for them, so it could be us. I personally have a very bad experience with MoinMoin. It's visual UI is very weak and MoinMoin is getting updated all the time and their solution to update things is to release a script that (hopefull

[web2py:17554] Re: Critical point in web2py

2009-03-05 Thread Paul Eden
+1 Web2py is a web application development platform/framework. The wiki is immature, but it is a good starting point and we will have more control over it than we would an off-the-shelf product. Paul On Thu, Mar 5, 2009 at 11:30 AM, Skylar Saveland wrote: > > > I think some of the problems with

[web2py:17553] Re: Critical point in web2py

2009-03-05 Thread Skylar Saveland
I think some of the problems with massimo's first stab at a wiki are overblown... the navigation bar is too prominent, etc... this is css .. css can develop and mature. As long as wrong choices are not made that block the development of the web2py wiki into everything that we want it to do, the

[web2py:17552] Re: Critical point in web2py

2009-03-05 Thread Paul Eden
That's true, Moin uses flat files, no DB. Paul On Thu, Mar 5, 2009 at 9:23 AM, Yarko Tymciurak wrote: > > Does anyone know how to do this w/ moin-moin? (I think it's just > file-based, but we would need access to the file / login to moin-moin server > then) > > --~--~-~--~~---

[web2py:17551] Using IS_IN_DB with existing data

2009-03-05 Thread Jim
I want to bulk upload some data. What I've noticed in testing is that I had something like this: info=whatever,state=NJ,moreinfo=something I decided I better make sure the state is in standard format so I added db.data.state.requires=IS_IN_DB(db,db.us_states.state) If I edit that record via t

[web2py:17550] Re: 1.57: Can't define db in admin interface

2009-03-05 Thread mdipierro
I think the bug is in applications/admin/static/ajax_editor.js function prepareMultiPartPOST(data) Can you replace the function with function prepareMultiPartPOST(data) { var boundary = 'sPlItME' + Math.floor(Math.random()*1); var reqdata = '--' + boundary; //console.log (data.l

[web2py:17549] Re: 1.57: Can't define db in admin interface

2009-03-05 Thread Guido Kollerie
On 4-mrt-2009, at 14:49, mdipierro wrote: > I cannot reproduce this. Can you add some print statmenets to > applications/admin/controllers/default.py and try determine if is a > browser issue (as I think), a JS issue or a server side issue? I installed the Firefox plugin HttpFox to see what is

[web2py:17548] Re: Critical point in web2py

2009-03-05 Thread Yarko Tymciurak
one advantage to a web2py wiki: we can dump (csv) contents in prep for sphinx integration / work. Does anyone know how to do this w/ moin-moin? (I think it's just file-based, but we would need access to the file / login to moin-moin server then) Thanks, Yarko On Thu, Mar 5, 2009 at 10:20 AM, Ya

[web2py:17547] Re: Critical point in web2py

2009-03-05 Thread Yarko Tymciurak
can we build this on a python.org personal moin-moin wiki? Not sure if that is possible or ok, but it's a thought On Thu, Mar 5, 2009 at 2:59 AM, Jonathan B wrote: > > Hi Massimo and all, > > > I'd like to lend a hand with the documentation project. > > > Based on reading all of the comments

[web2py:17546] Re: Redirect after login in the new Auth module (tools.py)

2009-03-05 Thread Nico de Groot
ok,thanks On Mar 3, 4:34 pm, mdipierro wrote: > sorry, that is a left over variable. You should use > > auth.settings.login_next > > instead > > On Mar 2, 4:20 am, Nico de Groot wrote: > > > Hello, > > > I tried to use the settings to redirect after a succesfull login by > > changing > > >    s

[web2py:17545] Re: Trouble creating Bazaar branch

2009-03-05 Thread Yarko Tymciurak
so - get latest bzr; do NOT use the "nice gui" interface (just adds more source for potential error, and makes unclear who is going to _fix_ the problem);send tickets and tracebacks to launchpad - that is, file bug reports! (I have numerous times on this). On Thu, Mar 5, 2009 at 10:15 AM, Yarko

[web2py:17544] Re: Trouble creating Bazaar branch

2009-03-05 Thread Yarko Tymciurak
I have seen this so often I ignore it; The newest bazaar version may help; It seems to 'go away' in a few hours, so I suspect some server issue on launchpad (this is actually the main reason I started mirroring to bitbucket, which - sorry - I haven't been keeping current lately). On Thu, Mar 5, 2

[web2py:17543] Re: Cheetah

2009-03-05 Thread Timothy Farrell
Edgar, I'm sure templating with Cheetah is possible. However, you'll have to write your own adapter for it since one currently doesn't exist. A while back I wrote an adapter to web2py that uses Genshi for rendering. You can see it here: https://mdp.cti.depaul.edu/web2py_wiki/default/wiki/g

[web2py:17542] CRUD form customization

2009-03-05 Thread DJ
Hi there, I am looking to customize the form returned by the CRUD function calls. I have done this with SQLFORM previously by specifying form variables - TR, TD, etc.. Whats the best way to do this with the new CRUD? Thanks very much! - Sebastian --~--~-~--~~~---~--~-

[web2py:17541] Re: DAL mssql DSN connection

2009-03-05 Thread DenesL
This works too: "select IDENTITY_VAL_LOCAL() from %s"%self._tablename and is more generic, but I only have db2/400 to test. Speaking of db2/400, the automatic journaling problem is still sadly alive, which means that after the tables are created you have to manually start journaling on them bef

[web2py:17540] Re: Source repository confusion

2009-03-05 Thread Yarko Tymciurak
On Wed, Mar 4, 2009 at 8:07 AM, BigBaaadBob wrote: > > One bummer with collapsing to BZR: I don't think there is a git-bzr is > there? > > I agree with the below suggestions. There really needs to be ONE repo > that is authoritative. > > I especially agree that it is better practice to NOT check

[web2py:17539] Re: auth_user question -- how to link to current logged in user?

2009-03-05 Thread Kuba Kucharski
I thought there is a way I can use db.table.field.requires= in models (with auth.user.id) so I could implement in my app new tools and some features of t2 at the same time. Maybe I even can but I forgot about @auth.. statement above the function, using table, which fields I want to require someth

[web2py:17538] Cheetah

2009-03-05 Thread edgarsmolow
Two questions: I already have Cheetah installed and like it a lot. 1. Can Cheetah be used with web2py? If so, how did you configure it? 2. What is your experience with support and performance regarding web2py? Better than another framework you'd tried? Thanks. Edgar --~--~-~--~~

[web2py:17537] Re: Sessions are destroyed by ajax calls?

2009-03-05 Thread SergeyPo
Safari and FireFox on Mac, Fox and IE on Windows, ajax sends only http-cookies, env cookies are empty This is the printout from BEAUTIFY(request) - however I don't know how to paste it retaining table structure: application : advantage args : body : ', mode 'w+b' at 0x65a4530> client : 127.0.0.

[web2py:17536] Re: auth_user question -- how to link to current logged in user?

2009-03-05 Thread mdipierro
I am not sure I see the problem, you just do this if auth.is_logged_in(): # you can use auth.user else: # auth.user is None or @auth.requires_login() def myaction(): # can use auth.user On Mar 5, 4:01 am, Kuba Kucharski wrote: > > auth.user.id  -- this is the global variable 'auth'

[web2py:17535] Re: Sessions are destroyed by ajax calls?

2009-03-05 Thread mdipierro
Which browser? Can you print request.cookies and see if the ajax request is sending the session cookies? Massimo On Mar 5, 3:36 am, SergeyPo wrote: > A bit more details: > > this controller function is called by ajax: > > def add_filter(): >     #append new custom object to list in session.filt

[web2py:17534] How to get values für multiple field (many2many)

2009-03-05 Thread kellda
I have the following tables db.define_table('tag', SQLField('name',requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB (db,'tag.name')] )) db.define_table('bookmark', SQLField('title', requires=IS_NOT_EMPTY() ), SQLField('tag','text'), ... db.bookmark.tag.requires=IS_IN_DB (db,'tag.id','tag.nam

[web2py:17533] Re: Distribution with PIL

2009-03-05 Thread Maurice Ling
Sorry for the very late reply... I've also needed a number of 3rd party modules for my application and what I did is to run web2py through a shell script... for example, in Windows... set python_directory=c:\Python25 python ez_setup.py if errorlevel 1 goto setpath if errorlevel 0 goto check_py

[web2py:17532] Re: Distribution with PIL

2009-03-05 Thread Maurice Ling
Sorry for the very late reply... I've also needed a number of 3rd party modules for my application and what I did is to run web2py through a shell script... for example, in Windows... set python_directory=c:\Python25 python ez_setup.py if errorlevel 1 goto setpath if errorlevel 0 goto check_py

[web2py:17531] Re: auth_user question -- how to link to current logged in user?

2009-03-05 Thread Kuba Kucharski
> auth.user.id -- this is the global variable 'auth' which has a > variable named 'user' which in turn has a named variable called > 'id'. This variable is valid only after a user is logged on and it > refers to the id of the current user. If no one is logged in, > auth.user does not exist and

[web2py:17530] Re: Sessions are destroyed by ajax calls?

2009-03-05 Thread SergeyPo
A bit more details: this controller function is called by ajax: def add_filter(): #append new custom object to list in session.filter #Filter object contains only strings and dicts session.filter.append(Filter()) #update session.filter list with some computations, it works up

[web2py:17529] Re: "commands out of sync" on simple migration with MySQL & 1.55 or 1.57

2009-03-05 Thread cjparsons
> First, drop the row. > Second, add the row again with the new size Yes, this resulted in a migrated table with the new field having the correct size and no errors. (obviously I lost the data in the field). I can't see how the migrate commands written in sql.log are different from when I hand-

[web2py:17528] Re: Critical point in web2py

2009-03-05 Thread Jonathan B
Hi Massimo and all, I'd like to lend a hand with the documentation project. Based on reading all of the comments, I'm with Yarko and Paul Eden on the direction we should take. Which is: (1) A reST/Sphinx code repository, under source control, for a community-based manual (2) A wiki for organ