[web2py] Re: sqlite <---> postgresql

2014-02-06 Thread Gour
On Thu, 06 Feb 2014 20:55:20 + Carlos Correia wrote: > Also with Postgresql (unless you're in Windows). I'm know...since the time when I was running Bacula (backup) and recently I moved from linux (Debian Sid) to Free/PC-BSD, one still has to take care when upgrading server versions as well

Re: [web2py] heads up if you localized your app and upgrade to version 2.8.2+

2014-02-06 Thread step
On Thursday, February 6, 2014 2:02:00 PM UTC+1, Anthony wrote: > > > I think most if not all messages generated in gluon code are customizable > via the API as well as translatable. If you are aware of messages that are > not, please point them out. > What do you mean by customizable via the A

[web2py] jQuery Noob question: usage of this

2014-02-06 Thread Dominique
Hello, That's a noob question... Thanks for helping Inside a function in a script, I'm trying to get the value of a button when clicked. I just can't figure out the usage of "this" in that case. There are a certain number of buttons in the page and several functions attached to them so I don't

[web2py] Search operators

2014-02-06 Thread horridohobbyist
In SQLFORM.grid, you have a Search operation in the form. The operators include =, !=, <, >, <=, >=, starts with, contains, in, not in. I can't figure out how to use 'in' and 'not in'. What are these operators?? Are they for strings? Are they for numeric ranges? If the latter, how do you design

[web2py] Re: Strange artifact

2014-02-06 Thread horridohobbyist
Really? Nobody knows? Nobody cares? On Wednesday, 5 February 2014 20:53:13 UTC-5, horridohobbyist wrote: > > Sorry, the artifact appears in SQLFORM.grid, regardless of pagination. > > Does *anyone* know what's going on?? > > > On Wednesday, 5 February 2014 10:57:30 UTC-5, horridohobbyist wrote: >

[web2py] Re: web2py mail

2014-02-06 Thread Dave S
Thanks for the followup! /dps On Wednesday, February 5, 2014 3:09:33 AM UTC-8, Jayadevan M wrote: > > Answer was 587. > iptables -A OUTPUT -p tcp -m tcp --dport 587 -j ACCEPT > > > On Wednesday, February 5, 2014 4:26:38 PM UTC+5:30, Jayadevan M wrote: >> >> Yes. I stopped iptables and the progra

[web2py] Dreamhost deployment

2014-02-06 Thread sasogeek
how do I install python 2.7 and web2py on dreamhost with a windows environment? I looked at the dreamhost wiki but their tutorial assumes installation from a linux environment... help? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (

[web2py] Re: Upload file to copy.com

2014-02-06 Thread Alan Etkin
> > Hi everyone, > > Is there a way for a web2py app, instead of uploading a file to the server > local file system, to upload a file to a www.copy.com account? > You can handle dropbox data from web2py apps instead http://www.web2py.com/books/default/chapter/29/14/other-recipes?search=dropbox#

[web2py] Re: linked_tables not show using smartgrid

2014-02-06 Thread 黄祥
finally found the culprit : lazy_tables = True on db = DAL('sqlite://test.sqlite', pool_size = 30, check_reserved = ['all'], migrate = True, fake_migrate_all = False, lazy_tables = True) my question is why lazy_tables = True is affected the linked tables on the smartgrid? i found the solution ju

[web2py] Import from MySQL

2014-02-06 Thread Garry Smith
HI I have just started using web2py, but have used MVC in other programming languages, the problem I have gaot is importing a db from MySQL. I use the script in the scripts folder for extracting from MySQL, which worked fine. When I added to web2py, most of the tables work fine, but one table

[web2py] Restricting certian access based on Active Directory groups

2014-02-06 Thread Doug Campbell
I am trying to block access on specific things using Active Directory groups and am a bit lost. I can login just fine using active directory and here is my connection string (with revealing info removed): from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods =

[web2py] Re: sqlite <---> postgresql

2014-02-06 Thread Alan Etkin
> This is even better. No rush here, but just curious if there is any ETA > for it? > ETA: uncertain. It is not a trivial change. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issue

Re: [web2py] Acces to row object with widget (widget=lambda field, value, row: ...)

2014-02-06 Thread Anthony
Don't have time to process all this, but are you saying you have a row object and just need to know how to pass it to a custom widget? On Thursday, February 6, 2014 4:14:26 PM UTC-5, Richard wrote: > > Hello, > > I may ask something not realistic, I didn't think that much to this... > > But I fou

[web2py] Re: How to handle (add?) hidden fields with a grid after submission / setting in onvalidation?

2014-02-06 Thread A36_Marty
Thanks Richard. Here's some simplified code to hopefully clarify what I'm trying to do: db.define_table('record, Field('hidden_field'), Field('non_hidden_fields')) def index(): grid = SQLFORM.grid(db.record, onvalidate=validate_form) def validate_form(form): Check to values in non-h

Re: [web2py] Installing web2py

2014-02-06 Thread Tim Richardson
Pythonanywhere is good. You get a shell so you can edit in the terminal, access github etc. If your budget stretches to USD $5 a month, you can get an entire virtual server from digitalocean.put Ubuntu on it and follow the web2py book. This is more setup work, but you learn more too. In both c

[web2py] Acces to row object with widget (widget=lambda field, value, row: ...)

2014-02-06 Thread Richard
Hello, I may ask something not realistic, I didn't think that much to this... But I found my self, I would really need to know the value of another fields the than the field on which the widget is apply in other to init my widget correctly. I found a workaround that would be as easy as passing

Re: [web2py] Re: sqlite <---> postgresql

2014-02-06 Thread Carlos Correia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Em 06-02-2014 18:27, Gour escreveu: > On Thu, 6 Feb 2014 06:27:36 -0800 (PST) > Cliff Kachinske wrote: > >> Maybe I'm missing something, but why would you develop on one back >> end if your production target is another? > > It's easy to work with sq

Re: [web2py] How to handle (add?) hidden fields with a grid after submission / setting in onvalidation?

2014-02-06 Thread Richard Vézina
I am not sure to understand exactly your issue, and your explanation are not as easy as a piece of code to understand... But maybe not "removing" you field from the form with readable and writable = False, but instead just hiding it with javascript could be of some help... The thing is that if you

[web2py] Re: json error when trying mongo slice

2014-02-06 Thread greaneym
thanks, this works well. I should have tried that. This is a nice application. On Thursday, February 6, 2014 5:47:27 AM UTC-6, Alan Etkin wrote: > > this kind of entry: >> { u'counter':3, u'now':'2014:05-02 13:00:00' ) >> >> the web2py manual shows this kind of entry: >> { 'counter':3, 'now':'201

[web2py] Re: sqlite <---> postgresql

2014-02-06 Thread Gour
On Thu, 6 Feb 2014 06:27:36 -0800 (PST) Cliff Kachinske wrote: > Maybe I'm missing something, but why would you develop on one back > end if your production target is another? It's easy to work with sqlite. > Postgres is not that hard to set up and use. MariaDB/MySQL is equally > easy. That's

Re: [web2py] Setting DAL less strict from a model

2014-02-06 Thread Rene Dohmen
Hi Mic, I will test it later on. But i'm not sure how this would solve the problem; I still need to remove the check_reserved from the DAL connection string. The goal is to NOT change anything in db.py; so the page module can be used as a normal w2p plugin. Or are you saying check_reserved will

[web2py] Re: strange behavior of ajax() function if there are request,args

2014-02-06 Thread Anthony
The ajax() function must take a proper URL as the first argument. Your URL is just 'echo', which the browser interprets as being relative to the current page (because it doesn't start with a '/'). Instead, should be: ajax('{{=URL('poptavka', 'echo')}}', [], 'target') which will produce: ajax('

[web2py] Re: emacs and web2py

2014-02-06 Thread rif
M-x package-list-packages right now. Thanks a lot! marți, 4 februarie 2014, 23:22:14 UTC+2, François-Xavier Bois a scris: > > Hi, > I would like to announce that web-mode.el, an emacs major mode for editing > web templates, is now compatible with web2py templates. > web-mode.el is available on h

[web2py] strange behavior of ajax() function if there are request,args

2014-02-06 Thread Mirek Zvolský
Hi, >> I will see all form controls twice, in the 2nd case inside of the target where I wait the ajax() value. <<< I work with Web2py 2.5.1 (I'm sorry). Can somebody make me sure, we have no longer following strange behavior in newer versions? So if somebody can copy t

[web2py] How to handle (add?) hidden fields with a grid after submission / setting in onvalidation?

2014-02-06 Thread A36_Marty
I've hit a roadblock and would appreciate a nudge in the right direction. I have a grid with a field I'd like to not show to the user. I've set the "onvalidation" to call a function to check values, and depending on what was entered in another field, add a separate value to the unseen/hidden

[web2py] Re: linked_tables not show using smartgrid

2014-02-06 Thread Tim Richardson
I'm guessing this is not a complete model since there is no supplier table defined (reference in purchase_header) For the point of making progress, perhaps you can temporarily remove that reference and make sure that you get the two-table smart grid working (there shouldn't be any need to specif

[web2py] Re: sqlite <---> postgresql

2014-02-06 Thread Cliff Kachinske
And maybe there's no need to switch. SQLite is not a toy. http://www.sqlite.org/whentouse.html On Wednesday, February 5, 2014 3:02:50 PM UTC-5, Gour wrote: > > Hello, > > Do you consider it's safe to work with web2py on localhost machine and > use sqlite3 database as storage (which greatly simp

[web2py] Re: sqlite <---> postgresql

2014-02-06 Thread Cliff Kachinske
Gour, Maybe I'm missing something, but why would you develop on one back end if your production target is another? If you switch back ends you will need to go through a complete regression test before you deploy. Postgres is not that hard to set up and use. MariaDB/MySQL is equally easy. On

[web2py] Re: How to reset authentication?

2014-02-06 Thread Austin Taylor
Or would it be possible for my authentication to be handled by another database?? I'm open for ideas/best practices. On Thursday, February 6, 2014 7:38:26 AM UTC-5, Austin Taylor wrote: > > I've tried creating another app and authentication works fine there with > the sqlite database, but when

[web2py] Re: [web2py:19089] Re: Input type button

2014-02-06 Thread Austin Taylor
Steve, I know this is an old post, but i'm trying to implement something like this (the classes). Where should I put the class index(): and how would I import it? Would it go in the default.py? On Sunday, April 5, 2009 6:03:26 AM UTC-4, Steve Shephed wrote: > > Where did you find the book in p

[web2py] Re: sqlite <---> postgresql

2014-02-06 Thread Gour
On Thu, 6 Feb 2014 04:06:55 -0800 (PST) Alan Etkin wrote: > I've posted a module for web2py shell which automates the migration > here: > https://groups.google.com/d/msg/web2py-developers/QxeJNByj6qc/cpBHsa1ymUkJ Thanks a lot. Just what I need. ;) > BTW: there is a work-in-progress modification

[web2py] Re: adding table column/field pro grammatically to existing table under controler

2014-02-06 Thread Anthony
The safest way is probably to redefine the whole table. *models/dp.py:* tA_args = dict(format='%(f1)s', ...) db.define_table('tA', Field('f1', 'string'), **tA_args) *controler/default.py:* db.define_table('tA', db.tA, Field('newfield'), redefine=True, **tA_args) Ant

[web2py] Re: linked_tables not show using smartgrid

2014-02-06 Thread 黄祥
trying another tables using smartgrid and have the same result. trying to add the auth signature but have the same result. trying to create the apps from scratch (copy the models, controllers and views folders) but have the same result. *code* *controllers/report.py* def report_product(): product

Re: [web2py] heads up if you localized your app and upgrade to version 2.8.2+

2014-02-06 Thread Anthony
On Thursday, February 6, 2014 5:12:38 AM UTC-5, step wrote: > > I agree, the book should say that. Let me add that users don't have > control over messages that originate in the gluon code, so they can't be > explicit about them. They will *always* risk messages changing in their > app. > I thi

[web2py] Re: linked_tables not show using smartgrid

2014-02-06 Thread 黄祥
release version 2.8.2 source best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to

Re: [web2py] Re: emacs and web2py

2014-02-06 Thread Johann Spies
+1 On 5 February 2014 23:16, Michele Comitini wrote: > +1 > from a long time emacs user > > > 2014-02-05 Massimo Di Pierro : > > This is really nice. Thank you for posting it. >> >> >> On Tuesday, 4 February 2014 15:22:14 UTC-6, François-Xavier Bois wrote: >>> >>> Hi, >>> I would like to announc

[web2py] How to reset authentication?

2014-02-06 Thread Austin Taylor
I've tried creating another app and authentication works fine there with the sqlite database, but when I try to use my mysql instance I run into error after error. Right now I have Login, Forgot Username and Lost Password when I hover over the login button. I don't know how to get it back to th

[web2py] adding table column/field pro grammatically to existing table under controler

2014-02-06 Thread Andrey K
I have a need to dynamically add Fields to my table. I wonder what is the best way to add column/field to existing table (already defined in db.py model) under controller (for example default.py) with main Field parameters (value, type, comment)? Example: *model/dp.py:* db.define_table('tA',

[web2py] Re: sqlite <---> postgresql

2014-02-06 Thread Alan Etkin
> > Hello, > > Do you consider it's safe to work with web2py on localhost machine and > use sqlite3 database as storage (which greatly simplifies setup) and > then deploy application on the production server by using e.g. > PostgreSQL database? > There are some difficulties when you need to

[web2py] Re: json error when trying mongo slice

2014-02-06 Thread Alan Etkin
> > this kind of entry: > { u'counter':3, u'now':'2014:05-02 13:00:00' ) > > the web2py manual shows this kind of entry: > { 'counter':3, 'now':'2014:05-02 13:00:00' ) > Currently the json validator accepts only legal json, meaning you have to enclose strings in double quotes (altough it automat

[web2py] Re: DAL Function in select

2014-02-06 Thread Tim Richardson
I think I replied to another post of yours, same topic. This won't work because select sends SQL to a database server, and this is where grouping happens, yet math.floor() is Python, not SQL. Use the book to read about executesql and use it send SQL to your server; you will still gets rows back.

[web2py] Re: linked_tables not show using smartgrid

2014-02-06 Thread Tim Richardson
is this trunk or a release? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "w

Re: [web2py] heads up if you localized your app and upgrade to version 2.8.2+

2014-02-06 Thread step
I agree, the book should say that. Let me add that users don't have control over messages that originate in the gluon code, so they can't be explicit about them. They will *always* risk messages changing in their app. I like the general design of web2py's translation code. The issue is more in t

Re: [web2py] Re: sessions2trash.py

2014-02-06 Thread Niphlod
On Thursday, February 6, 2014 5:28:17 AM UTC+1, Jayadevan M wrote: > > Thanks for the reply. Let me provide more info. May be I missed something > very basic. I am replying inline to your/Ricardo's comments. > > > "BTW..you're 10 steps ahead.but you're calling it wrongly :-P" > I gu