[web2py:/] Re: IS_NOT_IN_DB() and no automatic drop box

2009-07-09 Thread annet
Massimo, Thanks for putting so much effort in solving this problem. I tried the latest trunk and replaced my code with the code you provided, the error ticket I get reads like: Traceback (most recent call last): File "/Library/Python/2.5/site-packages/web2py/gluon/restricted.py", line 176, in

[web2py:26105] DAL remote control

2009-07-09 Thread rb
Thx for the speedy reply. Here's another question: 3) Because I'm doing a thick client, it creates db queries (SQL CRUD) which need to be communicated back to the controller which must query the db. The two ways to do this are: a) use a SQL statement within a executesql command, or b) create a

[web2py:26104] Re: drop-box that keeps previous value

2009-07-09 Thread annet
> The question to ask here is what would it take to have a drop box keep the > previous value as default. It was just a thought. While entering data into a timetable table I found it inconvenient that I had to select the day time and again from the drop box, which defaults to Monday. Same thing w

[web2py:26103] Re: Ruby 1.9 VS Python 3!!!

2009-07-09 Thread eric cs
Thanks guys, So those books about Python 3.0, it's useless if I am planning to learn Web2py Python's version. Because they say: " Python 3 is the best version of the language yet: It is more powerful, convenient, consistent, and expressive than ever before. Now, leading Python programmer Mark Summ

[web2py:26102] Re: Deployment of Python web apps on shared hosts.

2009-07-09 Thread eric cs
Thanks guys, I am just wondering why Php runs better with less memory than Python and Ruby. @Massimo Because in web2py apps are executed not imported (the only framework to do so) we do not have this issue and seem to run lean. Simply amazing I really don't understand how someone could use oth

[web2py:26101] Re: Deployment of Python web apps on shared hosts.

2009-07-09 Thread Yarko Tymciurak
you might want to look at webfaction as an option - the RAM and disk space for cost I found very competative; running web2py is no problem; their support and their performance seems good. On Thu, Jul 9, 2009 at 11:24 PM, mdipierro wrote: > > Python does not use much memory in my experience. Some

[web2py:26100] Re: Ruby 1.9 VS Python 3!!!

2009-07-09 Thread Yarko Tymciurak
Python 3 requires some code changes to applications. While these are not really great, the deal is (it seems always with major Python release changes) that it's easier to migrate an app than a framework - as (for example) web2py and django use mod_wsgi, all sorts of db backends, libraries, etc.

[web2py:26099] Re: Bravo Alfonso!

2009-07-09 Thread Yarko Tymciurak
Great! On Thu, Jul 9, 2009 at 6:50 PM, Álvaro Justen [Turicas] < alvarojus...@gmail.com> wrote: > > On Thu, Jul 9, 2009 at 19:09, mdipierro wrote: > > > > > http://translate.google.com/translate?hl=en&sl=es&u=http://somoslibres.org/modules.php%3Fname%3DNews%26file%3Dprint%26sid%3D2779&ei=JmpWSus7

[web2py:26098] Re: Deployment of Python web apps on shared hosts.

2009-07-09 Thread mdipierro
Python does not use much memory in my experience. Some python frameworks have a problem with memory leaks because things do not always get garbage collected when they go out of scope because of hidden references, Because in web2py apps are executed not imported (the only framework to do so) we do

[web2py:26097] Re: SQLite table constraints and which model files are run?

2009-07-09 Thread mdipierro
On Jul 9, 11:04 pm, rb wrote: > Hi all, > > I'm using Web2py to serve a wxPython thick client via XMLRPC. I'm > currently using SQLite (I like the zero db config ;-) and I have a few > questions: > > 1) I have missed how to specify table constraints across several > fields (in SQLite). For exampl

[web2py:26096] Re: new chapters for the book CRUD and AUTH

2009-07-09 Thread mdipierro
First of all thanks for your comments. > I don't think I can help with the chapters on views and forms but I am > very interested in everything about the DAL and in web services. I'd > like to help out reviewing your manual. I will post the chapter here when done. > Currently I'm using SQLite f

[web2py:26095] SQLite table constraints and which model files are run?

2009-07-09 Thread rb
Hi all, I'm using Web2py to serve a wxPython thick client via XMLRPC. I'm currently using SQLite (I like the zero db config ;-) and I have a few questions: 1) I have missed how to specify table constraints across several fields (in SQLite). For example, in a table the primary key consists of two

[web2py:26094] Re: new chapters for the book CRUD and AUTH

2009-07-09 Thread rb
Hi. I'm new to python and all things web2py (although I've been a programmer for yeeears) and I've started a project which uses web2py and a wxPython thick client, communicating via xmlrpc. I'm amazed by web2py and its genius - anything which achieves this much simplicity while still being powerfu

[web2py:26093] Re: Is it possible to store documents in S3 and rest in Google App Engine?

2009-07-09 Thread mdipierro
I think it is a good and it is definitively possible. The technical difficulty consists in avoid uploading to GAE (ram) and then sending to S3. There has to be a way to create a form on GAE that sends the upload direclty to S3 but you will have to deal with authorization and be able to reference t

[web2py:26092] Re: Deployment of Python web apps on shared hosts.

2009-07-09 Thread eric cs
What about Ram consuption, I know Ruby likes that a lot, how does Python compare to Php in this issue? Thanks. On Jul 9, 9:27 pm, eric cs wrote: > Thanks I really appreciate that I was just wondering if its hard and > what do I have to learn besides web2py,Python and Mysql. > Thanks. > > On Jul

[web2py:26091] One professional app to showcase Web2py

2009-07-09 Thread Lincoln_Consulting
Hello Web2py should have one commercial app, to showcase it, just like 37signals does with ror with its basecamp apps. My selfish interest is a help desk app. If we host it in GAE and S3 and price it right, thousands of small business will buy. The apps currently in the market mojohelpdesk, z

[web2py:26090] Re: Ruby 1.9 VS Python 3!!!

2009-07-09 Thread mdipierro
In general Python and Ruby in terms of syntax have more similarities then differences. If you know one you can learn the other in minutes. There are some difference, for example - Ruby does not use indentation to delimit blocks - Python has more libraries In my experience Python is more mature. La

[web2py:26089] Re: Is it possible to store documents in S3 and rest in Google App Engine?

2009-07-09 Thread Lincoln_Consulting
Hello I run a small tax preparation business. We store up to 15-20 GB of tax data in an encrypted S3 . We have been using gmail for domain (get email to a central email) and share it between 3-4 preparers. We have been evaluating help desk, whenever you talk storage they start charging $$$ I k

[web2py:26088] Re: Ruby 1.9 VS Python 3!!!

2009-07-09 Thread eric cs
Oh I was wondering why Web2py and Django are not using the last version of Python 3 as well. Thanks. On Jul 9, 9:11 pm, eric cs wrote: > Hey guys, > > I am a newbie and Python and amazed by Web2py so I was wondering > Can you compared them for me? As far as best features, closures,mixins > a

[web2py:26087] Re: Deployment of Python web apps on shared hosts.

2009-07-09 Thread eric cs
Thanks I really appreciate that I was just wondering if its hard and what do I have to learn besides web2py,Python and Mysql. Thanks. On Jul 9, 9:21 pm, mdipierro wrote: > It depends on the host each one is different. If they support any > other python framework than you can assume it is possibl

[web2py:26086] Re: web2py via shell account

2009-07-09 Thread Jonathan Lundell
On Jul 9, 2009, at 6:16 PM, Jonathan Lundell wrote: > On Jul 8, 2009, at 11:44 PM, Yarko Tymciurak wrote: > >> On Thu, Jul 9, 2009 at 1:20 AM, Jonathan Lundell >> wrote: >> On Jul 8, 2009, at 10:01 PM, Yarko Tymciurak wrote: >> >>> you should be running this thru apache+mod_wsgi; >>> >>> with m

[web2py:26085] Re: Deployment of Python web apps on shared hosts.

2009-07-09 Thread mdipierro
It depends on the host each one is different. If they support any other python framework than you can assume it is possible and we can help you set it up. On Jul 9, 8:03 pm, eric cs wrote: > Hey Everybody, > > I would like to ask you a question about deployment on shared hosts > like on goddady.

[web2py:26084] Re: Web2py vs the world

2009-07-09 Thread mdipierro
no. that will never be possible. I do not belave the DAL should execute any query client side. On Jul 9, 7:34 pm, Richard wrote: > On Jul 9, 2:25 am, mdipierro wrote: > > > Do not worry, we are not changing to an ORM. Right now you can do > > this: > > > db.define_table('person',Field('birthdat

[web2py:26083] Re: web2py based queue

2009-07-09 Thread mdipierro
You can use the databae as long the objects are serializable On Jul 9, 6:00 pm, kralin wrote: > thanks massimo, very elegant... > I have to check for the lock thing, otherwise a list is more tha > sufficient for the queue: > > queue=cache.ram('queue',lambda:[],10**10) > queue.append(o) > queue.p

[web2py:26082] Re: web2py via shell account

2009-07-09 Thread Jonathan Lundell
On Jul 8, 2009, at 11:44 PM, Yarko Tymciurak wrote: > On Thu, Jul 9, 2009 at 1:20 AM, Jonathan Lundell > wrote: > On Jul 8, 2009, at 10:01 PM, Yarko Tymciurak wrote: > >> you should be running this thru apache+mod_wsgi; >> >> with mod_wsgi you can just restart the mod_wsgi thread (and thereby

[web2py:26081] Ruby 1.9 VS Python 3!!!

2009-07-09 Thread eric cs
Hey guys, I am a newbie and Python and amazed by Web2py so I was wondering Can you compared them for me? As far as best features, closures,mixins and etc? Which one is easier to a newbie learn and why? I do know they look like each other but I saw some people saying Python is more mature than

[web2py:26080] Deployment of Python web apps on shared hosts.

2009-07-09 Thread eric cs
Hey Everybody, I would like to ask you a question about deployment on shared hosts like on goddady.com I saw some guys having problems trying to deploy some ruby on rails apps on godaddy shared account and they didn't offer a very good support for that. So I was wondering how difficult it is to d

[web2py:26079] Re: Web2py vs the world

2009-07-09 Thread Richard
On Jul 9, 2:25 am, mdipierro wrote: > Do not worry, we are not changing to an ORM. Right now you can do > this: > > db.define_table('person',Field('birthdate','date')) > db.person.age = lambda row: (request.now-request.birthdate).years > > for person in db().select(db.person.ALL): >     print per

[web2py:26078] Best way to store and retrieve geolocations on GAE using web2py

2009-07-09 Thread murray3
I looked at this a few months ago and Geohashing seemed the "recommended" way. I am trying to finish off an open source wiki which has a location based search facility, using google maps, the locations for the places are to be stored in Big table and retrieved and dispayed as markers using stand

[web2py:26077] Re: Bravo Alfonso!

2009-07-09 Thread Álvaro Justen [Turicas]
On Thu, Jul 9, 2009 at 19:09, mdipierro wrote: > > http://translate.google.com/translate?hl=en&sl=es&u=http://somoslibres.org/modules.php%3Fname%3DNews%26file%3Dprint%26sid%3D2779&ei=JmpWSus7kbSyA-z_kfQB&sa=X&oi=translate&resnum=7&ct=result&prev=/search%3Fq%3Dweb2py%26hl%3Den%26tbo%3D1%26tbs%3Dqdr

[web2py:26076] Re: web2py based queue

2009-07-09 Thread kralin
thanks massimo, very elegant... I have to check for the lock thing, otherwise a list is more tha sufficient for the queue: queue=cache.ram('queue',lambda:[],10**10) queue.append(o) queue.pop(0) it should be also very easy to use a priority schedule by appending [int(priority), task] to the queue

[web2py:26075] Re: Is it possible to store documents in S3 and rest in Google App Engine?

2009-07-09 Thread Robin B
> Assuming this can be done... are we sure that accessing S3 via REST > from GAE does not exceed the time limit? If I remember correctly, you can stream uploads directly to S3, which bypasses GAE and avoids any timeout. So from GAE, at request time, you ask S3 for a unique upload url, then POST

[web2py:26074] Bravo Alfonso!

2009-07-09 Thread mdipierro
http://translate.google.com/translate?hl=en&sl=es&u=http://somoslibres.org/modules.php%3Fname%3DNews%26file%3Dprint%26sid%3D2779&ei=JmpWSus7kbSyA-z_kfQB&sa=X&oi=translate&resnum=7&ct=result&prev=/search%3Fq%3Dweb2py%26hl%3Den%26tbo%3D1%26tbs%3Dqdr:d --~--~-~--~~~---~--~

[web2py:26073] Re: dynamic css

2009-07-09 Thread Jonathan Lundell
On Jul 9, 2009, at 2:26 PM, Speedbird wrote: > > I'd say Safari's caching, it is known that safari does not handle > changes in certain type of files very well (a feature or a nuisance, > who knows).. > > Anyway, read here for more info: > http://forums.macrumors.com/showthread.php?t=73360 It w

[web2py:26072] Re: auth registration nit

2009-07-09 Thread mdipierro
You are right. Uploading your fix to trunk. Thanks. Massimo On Jul 9, 4:09 pm, Jonathan Lundell wrote: > On Jul 9, 2009, at 1:48 PM, mdipierro wrote: > > > > > You should not ne already logged in after registration. That is not > > default behaviour > > That's how welcome is working. This is i

[web2py:26071] Re: web2py based queue

2009-07-09 Thread mdipierro
You can do something like class Queue: forever = 10**10 def __init__(self): import thread self.q=[] self.lock=thread.allocate_lock() def enque(self,o): self.lock.acquire() self.q.append(o) self.lock.release() def dequeue(self):

[web2py:26070] Re: dynamic css

2009-07-09 Thread Speedbird
I'd say Safari's caching, it is known that safari does not handle changes in certain type of files very well (a feature or a nuisance, who knows).. Anyway, read here for more info: http://forums.macrumors.com/showthread.php?t=73360 -- Julio On Jul 9, 2:16 pm, Jonathan Lundell wrote: > I'd lik

[web2py:26069] dynamic css

2009-07-09 Thread Jonathan Lundell
I'd like to generate my CSS dynamically, using web2py's views syntax (mainly for macro substitution, dynamic substitution of colors, stuff like that). So I created a controller named css, with a method called base, and a view named base.css. I then changed layout html to ask for /app/css/

[web2py:26067] web2py based queue

2009-07-09 Thread kralin
Hi All, I'm diving into web2py that at the moment gives me the power and the time do a lot of cool things. so thanks a lot to you guys. I was wondering if any of you ever had the need to set a queue for a heavy process. Let's suppose I've got one heavy process that takes 2 mins to run on a singol-

[web2py:26066] Re: auth registration nit

2009-07-09 Thread Fran
On Jul 9, 9:48 pm, mdipierro wrote: > You should not ne already logged in after registration. That is not > default behaviour Although I think it should be - unless you block the registration or require verification. Most websites work like this. I subclass auth in my app to do this, but it's a

[web2py:26064] Re: web2py cache

2009-07-09 Thread mdipierro
Hi Krista root = cache.ram(str(tree_id), make_root, t0) get a large t0, like 10**9 the function make_root will only be called the first time. Does it make sense? On Jul 9, 1:52 pm, Krista Larson wrote: > Hello, > > I have a large tree of data that I build in my application which is > manipula

[web2py:26065] Re: Is it possible to store documents in S3 and rest in Google App Engine?

2009-07-09 Thread mdipierro
I agree. This is not possible now but I guess it can be accommodated. There are three pieces here that need to work together. 1) the ability to override the upload function 2) disable the web2py behavior on GAE to created a blob field for every upload file 3) design custom uploader and downloaded

[web2py:26063] Re: auth registration nit

2009-07-09 Thread mdipierro
You should not ne already logged in after registration. That is not default behaviour On Jul 9, 3:11 pm, Jonathan Lundell wrote: > From the pov of a novice... > > The default auth.settings.register_next (user/login) is confusing in > that after registration you're already logged in, but user/l

[web2py:26062] Re: Upload with previously used but removed applicationname

2009-07-09 Thread mdipierro
odd. tehcnically uploaded files go in web2py/deposit/ before being unpacked On Jul 9, 2:39 pm, Hans wrote: > This has low priority for me because of possible workaround below - > don't spend much time on this. > > I use pack-all on a windows development pc and try to upload the > ips.w2p on the

[web2py:26061] Re: peek-at-view oddity

2009-07-09 Thread mdipierro
damn \r\n. Fixed and uploading to trunk. Thanks On Jul 9, 2:22 pm, Jonathan Lundell wrote: > When I peek at welcome/views/layout.html, I see this: > > pastedGraphic.tiff > 112KViewDownload > > > > That is, the file lines, but not the line numbers, are double-spaced. > We can see that from this

[web2py:26060] Re: Is it possible to store documents in S3 and rest in Google App Engine?

2009-07-09 Thread Fran
On Jul 9, 9:36 pm, Fran wrote: > Seems like it would be a nice option to be able to have the /uploads > folder be there. Django has very flexible uploads handling: http://docs.djangoproject.com/en/dev/topics/http/file-uploads/ F --~--~-~--~~~---~--~~ You received

[web2py:26059] Re: Is it possible to store documents in S3 and rest in Google App Engine?

2009-07-09 Thread Fran
On Jul 9, 8:12 pm, mdipierro wrote: > where would the main app, the one accessed by the users run? EC2 or > GAE? Looks like GAE to me. There's no helpers within Web2Py yet to help with storing files in S3. Seems like it would be a nice option to be able to have the /uploads folder be there. Po

[web2py:26058] cache

2009-07-09 Thread krista
Hello, I have a large tree of data that I build in my application which is manipulated by the user through a web interface. Instead of rebuilding this tree each time the user makes a change, it would be much simpler to just store it in the cache. There is no expiration time and I would not want

[web2py:26057] web2py cache

2009-07-09 Thread Krista Larson
Hello, I have a large tree of data that I build in my application which is manipulated by the user through a web interface. Instead of rebuilding this tree each time the user makes a change, it would be much simpler to just store it in the cache. There is no expiration time and I would no

[web2py:26056] auth registration nit

2009-07-09 Thread Jonathan Lundell
From the pov of a novice... The default auth.settings.register_next (user/login) is confusing in that after registration you're already logged in, but user/login is asking for a login again. f=index might be a better choice. Yes, I know it's easy to override, but the confusion starts with a

[web2py:26055] Upload with previously used but removed applicationname

2009-07-09 Thread Hans
This has low priority for me because of possible workaround below - don't spend much time on this. I use pack-all on a windows development pc and try to upload the ips.w2p on the ubuntu production server (after having used uninstall 'ips'). all in web2py admin/default/site web interface. when I u

[web2py:26053] Re: Is it possible to store documents in S3 and rest in Google App Engine?

2009-07-09 Thread mdipierro
where would the main app, the one accessed by the users run? EC2 or GAE? On Jul 9, 1:31 pm, Lincoln_Consulting wrote: > Hello > > We are thinking of creating a helpdesk app. > > Where the actual tickets are stored in Google App Engine, and the file > attachments > are stored in Amazon S3 as a

[web2py:26052] error with web2py + cherokee + fcgihandler

2009-07-09 Thread Jose
Hello I have running in a satisfactory way and for a time a server with web2py + cherokee on FreeBSD. Today I installed a similar environment in my notebook, but the following mistake takes is produced: WARNING:root:WEB2PY CRON: cron.master not found at /usr/local/www/ cherokee/applications/adm

[web2py:26051] Is it possible to store documents in S3 and rest in Google App Engine?

2009-07-09 Thread Lincoln_Consulting
Hello We are thinking of creating a helpdesk app. Where the actual tickets are stored in Google App Engine, and the file attachments are stored in Amazon S3 as a link accessed from Google App engine. Any thoughts if this can be done in web2py, gae and amazon s3? Example in GAE: Ticket 1: I n

[web2py:26050] Re: Using auth function (Approval)

2009-07-09 Thread Rob Scheibel
Perfect - Thanks a ton! -rob On Jul 9, 1:23 pm, mdipierro wrote: >     db.Field('last_logged_in', type='datetime', default='now'), > > should be > >     db.Field('last_logged_in', type='datetime', default=request.now), > > the default of a datatime cannot be  a string. > > On Jul 9, 12:11 pm, R

[web2py:26049] Re: new chapters for the book CRUD and AUTH

2009-07-09 Thread Yarko Tymciurak
great - that sounds fine for an internal name... On Thu, Jul 9, 2009 at 12:56 PM, mdipierro wrote: > > The field is called password. passfield is an internal local variable > and should not be exposed to the public. It appered there because of > cut and paste mistake. > > > On Jul 9, 12:43 pm, Y

[web2py:26048] Re: new chapters for the book CRUD and AUTH

2009-07-09 Thread mdipierro
The field is called password. passfield is an internal local variable and should not be exposed to the public. It appered there because of cut and paste mistake. On Jul 9, 12:43 pm, Yarko Tymciurak wrote: > On Thu, Jul 9, 2009 at 10:19 AM, Kuba Kucharski > wrote: > > > > > > > I did some readi

[web2py:26047] Re: regex_url: re.X is your friend [was: Minus in URI]

2009-07-09 Thread Jonathan Lundell
On Jul 9, 2009, at 10:22 AM, mdipierro wrote: > > >> There's a lot to be said for using re.X when writing expressions like >> this. Here's a quick hack as the current one. > > what does it do? re.X? It's the same as the x switch in Perl: /regex/x It causes white space and # comments to be ignor

[web2py:26046] Re: regex_url: re.X is your friend [was: Minus in URI]

2009-07-09 Thread Yarko Tymciurak
On Thu, Jul 9, 2009 at 12:22 PM, mdipierro wrote: > > > > There's a lot to be said for using re.X when writing expressions like > > this. Here's a quick hack as the current one. > > what does it do? >From http://docs.python.org/library/re.html#contents-of-module-re re.X¶

[web2py:26045] Re: new chapters for the book CRUD and AUTH

2009-07-09 Thread Yarko Tymciurak
On Thu, Jul 9, 2009 at 10:19 AM, Kuba Kucharski wrote: > > I did some reading with testing > > 47th page should be: > > auth_table = db.define_table( > auth.settings.table_user_name, > Field('first_name', length=128, default=''), > Field('last_name', length=128, default=''), > Field('email', lengt

[web2py:26044] Re: Tip of the Day: Documentation

2009-07-09 Thread Yarko Tymciurak
On Thu, Jul 9, 2009 at 3:42 AM, Timmie wrote: > > On 8 Jul., 22:33, mdipierro wrote: > > thanks. By references I mean that when we split the docs into > > multiplempages > I can try to figure this out. > It's a bit of changing the autosummary Sphinx extension. > > >we may want some docstrings to

[web2py:26043] Re: Tip of the Day: Documentation

2009-07-09 Thread Yarko Tymciurak
Yes - my working copy has the logo from the 1st edition book; (that's what I'll include in my patch) On Wed, Jul 8, 2009 at 11:18 PM, mdipierro wrote: > > I think Tim did that. Am I right? Eventually we need to address the > logo/design issue at a more comprehensive level. > > Massimo > > On Jul

[web2py:26042] Re: Using auth function (Approval)

2009-07-09 Thread mdipierro
db.Field('last_logged_in', type='datetime', default='now'), should be db.Field('last_logged_in', type='datetime', default=request.now), the default of a datatime cannot be a string. On Jul 9, 12:11 pm, Rob Scheibel wrote: > Nevermind. I upgraded to the latest version 1.65.1 and it se

[web2py:26041] Re: regex_url: re.X is your friend [was: Minus in URI]

2009-07-09 Thread mdipierro
> There's a lot to be said for using re.X when writing expressions like > this. Here's a quick hack as the current one. what does it do? > One thing that jumps out at me (assuming I've done it right) is that > the handling of 'sub' and 'ext' doesn't match the documenting comment; > they're in r

[web2py:26040] Re: Using auth function (Approval)

2009-07-09 Thread Rob Scheibel
Nevermind. I upgraded to the latest version 1.65.1 and it seems to be working. The only issue is I get the following when I click the register link: AttributeError: 'str' object has no attribute 'strftime' I'm guessing my auth db table isn't quite right. Here's what I have: db.define_table('sit

[web2py:26039] regex_url: re.X is your friend [was: Minus in URI]

2009-07-09 Thread Jonathan Lundell
On Jul 9, 3:24 am, SergeyPo wrote: > If I put old (v 1.75) regex there (line 75), version 1.65.1 stops > working - says invalid on any request like 127.0.0.1:8000 , admin/ > default/index etc: > > OLD REGEX: > regex_url = \ > re.compile('(?:^$)|(?:^\w+/?$)|(?:^\w+/[\w\-]+/?$)|(?:^\w+/[\w\-]

[web2py:26038] Re: Using auth function (Approval)

2009-07-09 Thread Rob Scheibel
I think it has something to do with the "length=" declaration. If I remove it, it seems to get closer to working...if I leave it in (for 'string' types), it says that the relation does not exist and names the table name and the line number for the line of code that has the length= . Perhaps this i

[web2py:26037] Re: Using auth function (Approval)

2009-07-09 Thread Rob Scheibel
Odd. Here it is since it doesn't seem to want to email: # coding: utf8 # ## This scaffolding model makes your app work on Google App Engine too # if re

[web2py:26036] Re: ip of a logged-in-user

2009-07-09 Thread Kuba Kucharski
The former. Great, thx -- Kuba --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email t

[web2py:26035] Re: new chapters for the book CRUD and AUTH

2009-07-09 Thread Kuba Kucharski
I did some reading with testing 47th page should be: auth_table = db.define_table( auth.settings.table_user_name, Field('first_name', length=128, default=''), Field('last_name', length=128, default=''), Field('email', length=128, default=''), Field('password', 'password',readable=False, label='P

[web2py:26034] Re: ip of a logged-in-user

2009-07-09 Thread mdipierro
It depends on whether you only need the last (current) IP or the past IPs. In the former case I would customize auth_table and add a field Field('last_ip') and in model auth.settings.login_onaccept=lambda form: \ db(db.auth_user.id==auth.user.id).update(last_ip=request.client) On Jul 9,

[web2py:26033] Re: Minus in URI

2009-07-09 Thread SergeyPo
Works, Thanks, Fixed. On Jul 9, 5:40 pm, mdipierro wrote: > OK. possibly fixed. Uploading to trunk. Give it a try in a couple of > minutes. > > On Jul 9, 3:24 am, SergeyPo wrote: > > > > > If I put old (v 1.75) regex there (line 75), version 1.65.1 stops > > working - says invalid on any reques

[web2py:26032] ip of a logged-in-user

2009-07-09 Thread Kuba Kucharski
I would like to have additional information about current ip of a logged-in-user in my auth user table , I know custom auth_user_table stuff but the question is should I query few last rows of db.auth_event where db.auth_event.description == "User" + auth_user.id "Logged-in" and than update us

[web2py:26031] Re: IS_NOT_IN_DB() and no automatic drop box

2009-07-09 Thread mdipierro
I have been playing with this. Can you try the latest trunk and replace db.companyactivity.activity.requires=[IS_IN_DB(db,db.activity.id,'% (activity_name)s'),IS_NOT_IN_DB(db (db.companyactivity.company==request.vars.company),db.companyactivity.activity)] tmp=SQLField ('activity',db.activity,requ

[web2py:26030] Re: Minus in URI

2009-07-09 Thread mdipierro
OK. possibly fixed. Uploading to trunk. Give it a try in a couple of minutes. On Jul 9, 3:24 am, SergeyPo wrote: > If I put old (v 1.75) regex there (line 75), version 1.65.1 stops > working - says invalid on any request like 127.0.0.1:8000 , admin/ > default/index etc: > > OLD REGEX: > regex_ur

[web2py:26029] Re: IS_IN_DB for multiple tables

2009-07-09 Thread mdipierro
Something like this? class IS_THERE: def __init__(db,fields, error_message='not there'): self.db=db self.fields=fields self.error_message=error_message def __call__(self,value): for field in self.fields: if self.db(field==value).count(): return

[web2py:26028] Re: Tip of the Day: Documentation

2009-07-09 Thread Timmie
On 8 Jul., 22:33, mdipierro wrote: > thanks. By references I mean that when we split the docs into > multiplempages I can try to figure this out. It's a bit of changing the autosummary Sphinx extension. >we may want some docstrings to cite/refer to other > docstrings. I do not know how to do it.

[web2py:26027] Re: Tip of the Day: Documentation

2009-07-09 Thread Timmie
On 9 Jul., 06:18, mdipierro wrote: > I think Tim did that. Am I right? Eventually we need to address the > logo/design issue at a more comprehensive level. yes, a workaround to have something in place. --~--~-~--~~~---~--~~ You received this message because you a

[web2py:26026] Re: Minus in URI

2009-07-09 Thread SergeyPo
If I put old (v 1.75) regex there (line 75), version 1.65.1 stops working - says invalid on any request like 127.0.0.1:8000 , admin/ default/index etc: OLD REGEX: regex_url = \ re.compile('(?:^$)|(?:^\w+/?$)|(?:^\w+/[\w\-]+/?$)|(?:^\w+/[\w\-]+/ \w+/?$)|(?:^\w+/[\w\-]+/\w+(/[\w\-]+(\.[\w\-\=]+

[web2py:26025] Re: Minus in URI

2009-07-09 Thread Yarko Tymciurak
you can browse through all the changes in main.py near line 75 from here: http://bazaar.launchpad.net/~mdipierro/web2py/devel/changes?filter_file_id=main.py-20080629222958-hhdxylrn88oe0xku-39 On Thu, Jul 9, 2009 at 1:58 AM, Yarko Tymciurak wrote: > I suspect this is regex_url (gluon/main.py abou