Re: [web2py:37008] Re: Unable to install application ""

2009-12-10 Thread Jonathan Lundell
On Dec 10, 2009, at 6:36 PM, mdipierro wrote: > I think it removes the uploaded file execpt if tar because in case of > tar it is remoevd by unpack. you may want to check it. Alvaro wrote > this function. That's right. I'm not sure about the compressed files, though. I'd do some cleanup, but at

[web2py:37007] Re: sqlite legacy support

2009-12-10 Thread Brian M
t.staid could be the primary key as far as the database is concerned. The issue is that web2py expects the primary key field to be called ID. I'd give Massimo's suggestion of db.define_table(...Field ('staid','id'),...) a shot - he's the man, so he ought to know. Massimo - what exactly does Field

[web2py:37006] Re: Populate failed with 'time' field

2009-12-10 Thread Yarko Tymciurak
that's a gui-client thing - you'll have to get used to whatever gui client you have (tortoise?); at the command line (where the real SCM is), they are all surprisingly similar in the basic operations (as you would expect, since basic source control operations are fundamentally the same - check in,

[web2py:37005] Re: Off-Topic: Web2py awesomeness

2009-12-10 Thread Yarko Tymciurak
can you be more specific? What do you like more when you compare? On Dec 10, 10:20 pm, Thadeus Burgess wrote: > Everytime I look at a django app... it makes me so grateful for web2py :) > > -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" gr

[web2py:37004] Re: Populate failed with 'time' field

2009-12-10 Thread DenesL
After clicking on the little green down arrow ("Download and view incoming changesets") I can see the new fix. Not as intuitive as the SVN client but I guess I will get used to it, unless this can be set somewhere... Newbie at this hg thing. On Dec 10, 11:36 pm, mdipierro wrote: > Can you try ag

[web2py:37003] Re: Populate failed with 'time' field

2009-12-10 Thread mdipierro
Can you try again: http://code.google.com/p/web2py/source/detail?r=22ea4f41b932e7173d4acfc1b058360b9001a939 On Dec 10, 10:01 pm, DenesL wrote: > erm... my hg client does not see any change (latest is changeset 4 > from 2 days ago). > I am assuming trunk meanshttps://web2py.googlecode.com/hg/ > T

[web2py:37002] Re: sqlite legacy support

2009-12-10 Thread mdipierro
For a legacy db you can do db.define_table(...Field('staid','id'),...) so staid is the id. It assumes id is an autoincrement or integer field. On Dec 10, 6:50 pm, Tim Michelsen wrote: > > You can tell your model the path to the existing sqlite database file > > with something like > > [...] > >

[web2py:37001] Off-Topic: Web2py awesomeness

2009-12-10 Thread Thadeus Burgess
Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2

[web2py:37000] Re: Populate failed with 'time' field

2009-12-10 Thread DenesL
erm... my hg client does not see any change (latest is changeset 4 from 2 days ago). I am assuming trunk means https://web2py.googlecode.com/hg/ Thanks. On Dec 10, 9:41 pm, mdipierro wrote: > uploading fix in trunk. Thanks for checking. > > On Dec 10, 8:24 pm, villas wrote: > > > Populate.py se

[web2py:36999] Re: Fail login doesn't return an errorm msg

2009-12-10 Thread Yannick
Hello thanks for the note... I did add "print request.function" and Yes there is a double redirection because the output print the function login twice : login login I wonder how to fix this double redirection here is one of the setting I have in my controller: auth.settings.login_next=URL(r=requ

[web2py:36998] Re: Populate failed with 'time' field

2009-12-10 Thread mdipierro
uploading fix in trunk. Thanks for checking. On Dec 10, 8:24 pm, villas wrote: > Populate.py seems to fail whenever a 'time' string is encountered.  I > was using Sqlite.  Here is the ticket: > >   File "c:\web2py\gluon\contrib\populate.py", line 83, in populate >     datetime.timedelta(seconds=

[web2py:36997] Re: Unable to install application ""

2009-12-10 Thread mdipierro
I think it removes the uploaded file execpt if tar because in case of tar it is remoevd by unpack. you may want to check it. Alvaro wrote this function. On Dec 10, 5:32 pm, Jonathan Lundell wrote: > On Dec 10, 2009, at 3:26 PM, mdipierro wrote: > > > According to the docs you can generate a tar.g

[web2py:36996] Re: new on web2pyslices.com: WebGrid

2009-12-10 Thread villas
Hi Mr Freeze, Re: 'datatables compliant' Could you describe what that means? Are there any differences in the usage? I had a quick look at the code and the webslice page but it wasn't obvious to me what had changed. -David On Dec 11, 12:04 am, "mr.freeze" wrote: > Thanks to Fran for several r

[web2py:36995] Populate failed with 'time' field

2009-12-10 Thread villas
Populate.py seems to fail whenever a 'time' string is encountered. I was using Sqlite. Here is the ticket: File "c:\web2py\gluon\contrib\populate.py", line 83, in populate datetime.timedelta(seconds=random.random()*24*3600) TypeError: unsupported operand type(s) for +: 'datetime.time' and

Re: [web2py:36994] Re: sqlite legacy support

2009-12-10 Thread Tim Michelsen
> You can tell your model the path to the existing sqlite database file > with something like [...] Thanks a lot for your verbose help! I really appreciate it. > As for telling it which existing field to use as the ID, as DenesL > pointed out if the field isn't already named ID I don't think you

[web2py:36993] Re: new on web2pyslices.com: WebGrid

2009-12-10 Thread mr.freeze
Thanks to Fran for several recent improvements. The WebGrid is now datatables compliant (you must disable the add_links). http://www.web2pyslices.com/main/slices/take_slice/39 On Dec 5, 10:11 am, "mr.freeze" wrote: > I added an example to the slice of how to customize the footer (just > before

Re: [web2py:36992] Re: Unable to install application ""

2009-12-10 Thread Jonathan Lundell
On Dec 10, 2009, at 3:26 PM, mdipierro wrote: > According to the docs you can generate a tar.gz using mode='w:g' but I > tried and it does not work on 2.5. So the process of making the w2p > involves a tmp step of creating a tar file that is then removed. > Somehow the unlink does not work on wind

[web2py:36991] Re: Unable to install application ""

2009-12-10 Thread mdipierro
According to the docs you can generate a tar.gz using mode='w:g' but I tried and it does not work on 2.5. So the process of making the w2p involves a tmp step of creating a tar file that is then removed. Somehow the unlink does not work on window. I do not know why. One solution may be to create th

Re: [web2py:36990] Re: Unable to install application ""

2009-12-10 Thread Jonathan Lundell
On Dec 10, 2009, at 2:46 PM, mdipierro wrote: > We may see .tar files because that is what we used before .w2p was > introduced. > > We should only gerenate .w2p but we want to > read .tar, .tar.gz, .tgz, .w2p > > This > > filename[-7:] == '.tar.gz' > > will not cause an exception for short f

[web2py:36989] Re: Switch from http to https within app

2009-12-10 Thread mdipierro
I would suggest creating a model 0_redefine_url.py that contains: _URL=URL def URL(*a,**b): if not 'secure' in b: return _URL(*a,**b) elif b['secure']: del b['secure'] return 'https://'+request.env.http_host + _URL(*a,**b) else: del b['secure'] return 'h

[web2py:36988] Re: Unable to install application ""

2009-12-10 Thread mdipierro
We may see .tar files because that is what we used before .w2p was introduced. We should only gerenate .w2p but we want to read .tar, .tar.gz, .tgz, .w2p This filename[-7:] == '.tar.gz' will not cause an exception for short filenames but endswith is a better solution. On Dec 10, 4:37 pm, Jon

[web2py:36987] Re: bad image and word Validator

2009-12-10 Thread Marzolo
here's a nice webservice for filtering bad words... the list is community driven so it should manage the changing words, their usage and the severity.. the basic service is free: http://www.thefilthylist.com On Nov 26, 5:21 am, mdipierro wrote: > It would be a nice app. > > On Nov 26, 5:24 am, D

Re: [web2py:36986] Re: Unable to install application ""

2009-12-10 Thread Jonathan Lundell
On Dec 10, 2009, at 2:27 PM, Yarko Tymciurak wrote: > On Dec 10, 2:12 pm, Thadeus Burgess wrote: >> I see, Massmo, I checked my emails and I had sent you the wrong patch, >> it only included the fix for content-type of the admin application, >> instead of the logic that allows you to install an a

[web2py:36985] Re: Unable to install application ""

2009-12-10 Thread Yarko Tymciurak
On Dec 10, 2:12 pm, Thadeus Burgess wrote: > I see, Massmo, I checked my emails and I had sent you the wrong patch, > it only included the fix for content-type of the admin application, > instead of the logic that allows you to install an app with a .gz > extension as well just in case. > > When I

[web2py:36984] Re: Unable to install application ""

2009-12-10 Thread mdipierro
The .gz was added by the browser upon download and that was fixed by the content time. I agree that the code in admin.py could use some cleaup. I'd be happy to take a patch to do it. On Dec 10, 2:56 pm, Jonathan Lundell wrote: > On Dec 10, 2009, at 11:51 AM, mdipierro wrote: > > > Yes this has be

Re: [web2py:36983] Re: Unable to install application ""

2009-12-10 Thread Jonathan Lundell
On Dec 10, 2009, at 11:51 AM, mdipierro wrote: > Yes this has been fixed in trunk. If what I'm looking at is the trunk (I'm still a little fuzzy on hg updates), there's a problem between app_install() and w2p_update(). The former can deliver a filename: name.tar.gz. The latter converts this to

Re: [web2py:36982] Re: Unable to install application ""

2009-12-10 Thread Thadeus Burgess
I see, Massmo, I checked my emails and I had sent you the wrong patch, it only included the fix for content-type of the admin application, instead of the logic that allows you to install an app with a .gz extension as well just in case. When I get home, I will send you this second part of the patc

Re: [web2py:36981] Switch from http to https within app

2009-12-10 Thread Wes James
Actually, I don't think it would matter if there were a proxy or not?? On Thu, Dec 10, 2009 at 1:06 PM, Wes James wrote: > As long as you don't have a proxy between your users and the server > something with request.env could be used > > def login(): >    if request.env.port != 443: >       redi

[web2py:36980] Re: request.args and error handling

2009-12-10 Thread vince
oh thanks a lot. On Nov 30, 12:34 am, mdipierro wrote: > request.args(index) > > On Nov 29, 10:05 am, vince wrote: > > > i've been doing lots of error handling with request.args. is that > > possible to have request.args[index] to return None instead of "index > > out of range" exception? > > >

Re: [web2py:36979] Switch from http to https within app

2009-12-10 Thread Wes James
As long as you don't have a proxy between your users and the server something with request.env could be used def login(): if request.env.port != 443: redirect('https://'+request.env.http_host +'/app/default/logon') -wes On Thu, Dec 10, 2009 at 11:42 AM, Jay wrote: >  I am new to web2

[web2py:36978] Re: Unable to install application ""

2009-12-10 Thread mdipierro
Yes this has been fixed in trunk. On Dec 10, 1:05 pm, Thadeus Burgess wrote: > The extension should have been fixed? I remember a making a patch for this. > > Also web2py should be allowing a .gz extension, as that was part of the patch. > > -Thadeus > > On Thu, Dec 10, 2009 at 1:01 PM, jonfroehl

[web2py:36977] Switch from http to https within app

2009-12-10 Thread Jay
I am new to web2py and Apache w/mod_ssl and I have been searching for a solution related to this topic but I must be missing a basic understanding of the necessary pieces in order to accomplish this. Our web2py apache setup seems to be fine. I can access our app's pages using both http and h

Re: [web2py:36976] Re: Unable to install application ""

2009-12-10 Thread Thadeus Burgess
The extension should have been fixed? I remember a making a patch for this. Also web2py should be allowing a .gz extension, as that was part of the patch. -Thadeus On Thu, Dec 10, 2009 at 1:01 PM, jonfroehlich wrote: > ks to all for your responses. It looks like we should mark the > code th

[web2py:36975] Re: Unable to install application ""

2009-12-10 Thread jonfroehlich
"web2py.app.hydroserver.w2p.gz" (without the quotes) is the exact name that web2py created for me when I selected the option "pack all" in the admin interface. Once I dropped the ".gz"--in other words, renamed "web2py.app.hydroserver.w2p.gz" to "web2py.app.hydroserver.w2p", the application install

[web2py:36974] Re: Unable to install application ""

2009-12-10 Thread jonfroehlich
Hi Massimo, I am not actually using "" -- I am using the name "hydroserver" (without the quotes). Sorry for the confusion. The web2py version I am running is: web2py Version 1.72.3 (2009-11-10 09:17:13) My web server box is running Windows Server 2008. When attempting to install the hydroserver

[web2py:36973] Re: download file name - other than "file" [ Solved ]

2009-12-10 Thread Wes James
# save filename on save to file name field try: if len(request.vars.resume_bin.filename): request.vars.resume_bin_filename = request.vars.resume_bin.filename except: pass form=crud.update(.) # change the 'file' text in the form

Re: [web2py:36972] Re: Unable to install application ""

2009-12-10 Thread Jonathan Lundell
On Dec 10, 2009, at 10:33 AM, Thadeus Burgess wrote: > I am able to install .w2p.gz apps using the latest devel version. > > Also, when he says the brackets mean insert a real > app name. He just decided to not include his app name to be more > understandable for us. > > The problem could be an

Re: [web2py:36971] Re: Unable to install application ""

2009-12-10 Thread Thadeus Burgess
I am able to install .w2p.gz apps using the latest devel version. Also, when he says the brackets mean insert a real app name. He just decided to not include his app name to be more understandable for us. The problem could be anything (see thats why using catchall exceptions don't benefit!). For

[web2py:36970] Re: Unable to install application ""

2009-12-10 Thread Yarko Tymciurak
On Dec 10, 12:07 pm, jonfroehlich wrote: > Hi, > > I am a new web2py user. During early development, I have been running > web2py on my laptop. Now, it's time to transfer this code over to an > actual server. Unfortunately, when I try to install the web2py tarball > using the admin interface on my

[web2py:36969] Re: Unable to install application ""

2009-12-10 Thread mdipierro
Are you actually using ""? Special characters (<>) and spaces are not allowed in application names. If this is not the issue could you tell us more about the web2py version/date? Massimo On Dec 10, 12:07 pm, jonfroehlich wrote: > Hi, > > I am a new web2py user. During early development, I have

Re: [web2py:36968] Unable to install application ""

2009-12-10 Thread Thadeus Burgess
It sounds like it is a permission error. Make sure the user that is running the web server (www-data perhaps?) has write access to the web2py folders. -Thadeus On Thu, Dec 10, 2009 at 12:07 PM, jonfroehlich wrote: > ughts on why this would be? Is there a log file somewhere that > I could lo

[web2py:36967] Re: validator less than

2009-12-10 Thread mdipierro
sorry the original problem was lost in the thread. Why isn't the problem solved by the validator that I posted? If you want to compare from_time with to_time then to_time should bot be None unless you tell us how should the validation be performed in this case. On Dec 10, 11:42 am, annet wrote:

[web2py:36966] Unable to install application ""

2009-12-10 Thread jonfroehlich
Hi, I am a new web2py user. During early development, I have been running web2py on my laptop. Now, it's time to transfer this code over to an actual server. Unfortunately, when I try to install the web2py tarball using the admin interface on my server, I get the error: "Unable to install applicat

[web2py:36965] Re: Possible Bug (I think) in count()

2009-12-10 Thread mdipierro
On a second thought. If you are summing it perhaps it is not a 'boolean' or a 'string' but an 'integer' that you wish to use as a boolean with 1,0 instead of True/False. Massimo On Dec 10, 11:44 am, mdipierro wrote: > web2py for portability reasons defines: > >         'boolean': 'CHAR(1)', > >

[web2py:36964] Re: web2py on windows mobile?

2009-12-10 Thread Iceberg
Thanks. Define a dummy prevent_socket_inheritance() can bypass that problem. But, another error trace: ... File "\My Documents\web2pygluon\wsgis... self.requests.start() File "\My Documents\web2pygluon\wsgis... worker.start() File "C:\development\opensource\PythonCE... error: can'

[web2py:36963] Re: validator on update

2009-12-10 Thread mdipierro
You can change the behavior in appadmin if you like. Just change ignore_rw=True to False in appadmin.py. Massimo On Dec 10, 11:32 am, annet wrote: > Massimo, > > > Is the problem when you use appadmin? update would not work in this > > case because appadmin (by design) ignores writable=False. >

[web2py:36962] Re: Possible Bug (I think) in count()

2009-12-10 Thread mdipierro
web2py for portability reasons defines: 'boolean': 'CHAR(1)', If you are using a legacy database and you are not using a CHAR(1) for boolean, you need to use "string" instead of "boolean" when you define the field in web2py. Massimo On Dec 10, 11:28 am, Benigno wrote: > Hmmm, it transl

[web2py:36961] Re: validator less than

2009-12-10 Thread annet
Massimo and Denes, So, I guess my problem won't be solved. I don't understand why request.vars.to_time is None. I am using form=crud.create(table) and form=crud.update(table,...) so request.vars.to_time cannot be None can it? Annet. -- You received this message because you are subscribed to

[web2py:36960] Re: validator on update

2009-12-10 Thread annet
Massimo, > Is the problem when you use appadmin? update would not work in this > case because appadmin (by design) ignores writable=False. Yes, it's an appadmin problem, when I update records using my cms application the modified_on fields are update correctly. Thanks. Annet. -- You received

[web2py:36959] Re: Possible Bug (I think) in count()

2009-12-10 Thread Benigno
Hmmm, it translates on its own 1 to True like this: "SELECT count(*) FROM direccionesgrupo WHERE direccionesgrupo.activo='T';" Which results in 58 rows Whereas if it does "SELECT count(*) FROM direccionesgrupo WHERE direccionesgrupo.activo=1;" Then result is 112 MySQL seems to take anything it d

[web2py:36958] Re: Validation when using crud.create

2009-12-10 Thread annet
Massimo, > I think you mean > > db.companyactivity.company.requires=[IS_IN_DB(db,db.company.id,'% > (companyname)s'),IS_NOT_IN_DB(db > (db.companyactivity.activity==request.vars.activity),db.companyactivity.company,error_message='already > in database')] Yes, I am sorry a typo introduced on trans

[web2py:36957] Re: Possible Bug (I think) in count()

2009-12-10 Thread mdipierro
print db(db.direccionesgrupo.activo==1)._select('count(*)') do you see anything wrong in the generated sql? On Dec 10, 9:48 am, Benigno wrote: > In the table this is taken from, activo is either 1 or 0. In the table > which is legacy MySQL it is defined as INT(1) > > These are the results I am

[web2py:36956] Re: Creating a CSV file from data

2009-12-10 Thread Brian M
What datatype are you using for the data currently? The python CSV module can get its data from any sequence, so if you already have all the info in a list use csv.writer if it's a in a list of dictionary objects, then use csv.DictWriter. Refer to http://docs.python.org/library/csv.html With more

[web2py:36955] Possible Bug (I think) in count()

2009-12-10 Thread Benigno
In the table this is taken from, activo is either 1 or 0. In the table which is legacy MySQL it is defined as INT(1) These are the results I am getting: In [46]: db(db.direccionesgrupo.activo == 1).count() Out[46]: 58L In [48]: a =db().select(db.direccionesgrupo.activo.sum()) In [49]: print a -

[web2py:36954] Re: Recaptcha not working in Login

2009-12-10 Thread hamdy.a.farag
well, it worked for me and I was able to login as well may be some other guy can test it as well -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send

[web2py:36953] form.vars.image_filename set to blank on file delete

2009-12-10 Thread Wes James
on page 198 of the book, when a file is deleted, how does image_filename get set to blank? -wes -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send e

[web2py:36952] Re: Recaptcha not working in Login

2009-12-10 Thread mdipierro
If you do it this way it will display but I am not sure it works properly. On Dec 10, 4:50 am, "hamdy.a.farag" wrote: > what I can't understand actually is that : > > using latest svn version and removing lines : > > ''' >            if self.settings.login_captcha != None: >                 form[

[web2py:36951] Re: validator less than

2009-12-10 Thread mdipierro
If there is a new calendar.js with both date and datetime I would take a pacth to replace the existing one. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this gr

[web2py:36950] Re: changing ondelete from ='CASCADE' to ='SET NULL' on mysql causes error

2009-12-10 Thread mdipierro
No but try this: First do a migration in which you remove the field completely. Then do a migration in which you add the field again with the new attributes. Massimo On Dec 10, 7:13 am, Maciek Sykulski wrote: > Hi, > > In web2py 1.72.3, > when I change db.py from: > > db.define_table('report_seg

[web2py:36949] Re: e-Store Appliance in GAE

2009-12-10 Thread mdipierro
fantastic! On Dec 10, 5:37 am, Richard wrote: > I got the web2py estore app working on Google App Engine > here:http://web2py-estore.appspot.com/ > > And my modded version of the code is > here:http://code.google.com/p/web2py-estore/ > > There is still a lot more I want to do with it (check the

[web2py:36948] Re: validator less than

2009-12-10 Thread DenesL
^bump^ -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http:

[web2py:36947] Re: modified plugin_tagging

2009-12-10 Thread selecta
fixed a bug that did not allow the deletion of tags http://www.delarue-berlin.de/tmp/web2py.plugin.tagging.1.w2p On Nov 28, 8:24 pm, selecta wrote: > Hey there I just modified thetaggingplugin so multiple users can tag > one record, a tag cloud can be displayed for each record, for each > table,

[web2py:36946] changing ondelete from ='CASCADE' to ='SET NULL' on mysql causes error

2009-12-10 Thread Maciek Sykulski
Hi, In web2py 1.72.3, when I change db.py from: db.define_table('report_segment' , Field ('acgh_sg_id',db.acgh_segment,ondelete='CASCADE'), Field ('acgh_report_id',db.acgh_report,ondelete='CASCADE') ) to: db.define_table('report_segment' ,

[web2py:36945] Re: set web2py application into SVN

2009-12-10 Thread Neveen Adel
How can i commit my code everyday into SVN to and How also can i make synchronize my code with the SVN using web2py. I want to make something like eclipse subversion plugin. Thanks On Dec 9, 7:02 pm, mdipierro wrote: > cd applications/myapp > svnadmin create /path/to/repositorysvnaddsvncommit -

[web2py:36944] Re: Creating a CSV file from data

2009-12-10 Thread GhostRider
There is probably nothing wrong with fetch data via SQL, but I have no idea how to write that complicated SQL query where getting data from 7 or 8 tables and as I made the calculations function already for viewing I was looking for a way to just send it to a CSV. I´ll look into the "You can use th

[web2py:36943] Re: e-Store Appliance in GAE

2009-12-10 Thread Richard
I got the web2py estore app working on Google App Engine here: http://web2py-estore.appspot.com/ And my modded version of the code is here: http://code.google.com/p/web2py-estore/ There is still a lot more I want to do with it (check the wishlist: http://code.google.com/p/web2py-estore/wiki/WishL

[web2py:36942] Re: Recaptcha not working in Login

2009-12-10 Thread hamdy.a.farag
what I can't understand actually is that : using latest svn version and removing lines : ''' if self.settings.login_captcha != None: form[0].insert(-1, TR('', self.settings.login_captcha, ''))''' "" from tools.py I managed to have ed's code running : so something li

[web2py:36941] Re: Recaptcha not working in Login

2009-12-10 Thread hamdy.a.farag
Hi ed I assume you upgraded your web2py to the latest svn version Now you can do : def login(): auth.settings.login_catpcha = Recaptcha (request,public_key,private_key) form = auth.login() see the auth.settings.login_captcha - not auth.settings.captcha- ? may be here's your problem I t