[web2py] Re: does Field attribiute unique=True work on GAE?

2013-03-26 Thread Christian Foster Howes
i do make use of the IS_NOT_IN_DB() validator. Note that you can still have duplicates if 2 requests are received by GAE at nearly the same time. assuming your requests are more than say 1 second apart, if IS_NOT_IN_DB() is failing i would consider it a bug. NOTE that GAE dev_appserver.py rele

[web2py] format and represent on table

2013-03-26 Thread 黄祥
hi, i've already define format in table but it seems return the id instead of the format i've define, when i define represent on the field of the other field it can work. is it normal? *e.g. work* db.define_table('booking', Field('scheduled_start', 'datetime'), Field('due_date', 'dateti

Re: [web2py] SQLForm.factory

2013-03-26 Thread Anthony
db.images includes an upload field. When using SQLFORM.factory, if you include an upload field, you have to specify its uploadfolder argument (this is not necessary with a standard SQLFORM because the uploadfolder is determined automatically). Anthony On Tuesday, March 26, 2013 5:48:58 PM UTC-

[web2py] Re: Cannot submit SQLFORM :/

2013-03-26 Thread Anthony
On Tuesday, March 26, 2013 8:38:59 PM UTC-4, smoggy wrote: > To close this thread. > The workaround: > So i had this SQLFORM with default view that did not work. > I couldn't fix it, so i created a new controller, pasted the function > there, created a dedicated view and it worked. > Not sure wh

[web2py] Re: Cannot submit SQLFORM :/

2013-03-26 Thread Anthony
> > About the upload, i'm sending in request.vars the location of the file to > upload, so the user does not have to input it manually. This is being > called from a backoffice program that will upload : an icon, a zip and a > screenshot, so this upload form filling is very convenient. Are yo

[web2py] SQLFORM.grid/smartgrid: passing different fields to editargs for parent and child

2013-03-26 Thread Shawn Wheatley
I'm trying to edit a different subset of fields when editing records for a parent table and a child table. Looking at the source for SQLFORM, it looks like the dictionary passed to "editargs" is merged on-demand with the "formargs" dictionary. This is causing errors for me when editing the child

[web2py] Re: How to get selective update rows from SQLFROM.grid

2013-03-26 Thread Cliff Kachinske
These kinds of problems are usually traceable to holes in the chain of access control tables. How did you create your entries in the auth_group, auth_membership and auth_permission tables? Does the code work correctly if you change the auth.has_permission call to auth.has_membership? Look aga

[web2py] Re: bootswatch : bootstrap.css replace what file

2013-03-26 Thread 黄祥
yeah, it's there.thank you very much for your hints, ales. best regards, stifan -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googleg

[web2py] Re: Cannot submit SQLFORM :/

2013-03-26 Thread smoggy
To close this thread. The workaround: So i had this SQLFORM with default view that did not work. I couldn't fix it, so i created a new controller, pasted the function there, created a dedicated view and it worked. -- --- You received this message because you are subscribed to the Google Group

[web2py] Re: bootswatch : bootstrap.css replace what file

2013-03-26 Thread LightDot
If you download a customized version of Bootstrap, all css are contained in a single file. In this case just use bootstrap.min.css and remove references to bootstrap-responsive.min.css from your code. However, if you download the stock zip from the first page of http://twitter.github.com/bootst

[web2py] Re: bootswatch : bootstrap.css replace what file

2013-03-26 Thread 黄祥
thank you so much for your detail explaination, ales. so that's the reason why my layout is chaos when i replace web2py_bootstrap.css. another question according to upgrade to 2.3.1, i've download the bootstrap 2.3.1 from http://twitter.github.com/bootstrap/customize.html#components the file bo

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread paolo.vall...@gmail.com
I will try to update sqlite as you suggested asap. I tried your scheduler but I cannot see any error. In the meanwhile I have seen that when the following logs are missing "INFO - TICKER: workers are 1" "INFO - TICKER: tasks are 0" even the log: "DEBUG - Assigning tasks..." is missing. could this m

[web2py] Re: Image in web2py/MongoDB based blog

2013-03-26 Thread Alan Etkin
> but I want to know how can I put an image/video in the text making them appear in the view of the user. > I tried using with HTML code but it didn't work. Where will the images come from? Will you store image files in you app folder? Here is a guide to handle images from the book: http://www

Re: [web2py] SQLForm.factory

2013-03-26 Thread BlueShadow
Ok I guess I missed that but I get an error at the line if form.process().accepted: I changed my controler to this: def newImage(): dbtable = db.Images #uploads table name print "newImage" if len(request.args): records = db(dbtable.id==request.args[0]).select() i

[web2py] Re: DAL how to show only some of the lines in a db

2013-03-26 Thread Hugo Costa
Thanks! ;) Terça-feira, 26 de Março de 2013 18:10:47 UTC, Cliff Kachinske escreveu: > > > http://web2py.com/books/default/chapter/29/06#orderby,-groupby,-limitby,-distinct,-having > > On Tuesday, March 26, 2013 2:00:36 PM UTC-4, Hugo Costa wrote: >> >> Hi, >> >> In my website I want to put only 5

[web2py] Image in web2py/MongoDB based blog

2013-03-26 Thread Hugo Costa
Hi! So, I'm setting up a website where there will be a blog system where I can create my news using a simple form and store that in a mongo database, but I want to know how can I put an image/video in the text making them appear in the view of the user. I tried using with HTML code but it didn

[web2py] Re: registration key?

2013-03-26 Thread Alan Etkin
> > What are the registration key and registration identifier fields in auth > user sign up table? > I'm new to web2py, so I apologize if the question looks silly. > Both registration_key and registration_id are explained in the book: http://www.web2py.com/books/default/chapter/29/09 -- ---

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread paolo.vall...@gmail.com
I can make few tests but only tomorrow, I will be out for the rest of the week. If you send me a patch with the new log statement, I will come back with the result asap. Paolo 2013/3/26 Niphlod > whoa. seems that something wrong is happening trying to assing new > tasks > normally, every

[web2py] registration key?

2013-03-26 Thread maneesh2611
What are the registration key and registration identifier fields in auth user sign up table? I'm new to web2py, so I apologize if the question looks silly. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and

[web2py] Re: DAL how to show only some of the lines in a db

2013-03-26 Thread Cliff Kachinske
http://web2py.com/books/default/chapter/29/06#orderby,-groupby,-limitby,-distinct,-having On Tuesday, March 26, 2013 2:00:36 PM UTC-4, Hugo Costa wrote: > > Hi, > > In my website I want to put only 5 news in the page main page that are > stored in a mongodb. > > Can anyone tell me how to do it? >

[web2py] Re: Cannot submit SQLFORM :/

2013-03-26 Thread smoggy
Snif. Maybe when i get the time i play with QtWebkit to switch those fields automatically then :/ . As for the SQLForm problem, you got any clues ? why in badmin it works but every other sqlform does not. Terça-feira, 26 de Março de 2013 17:40:33 UTC, Derek escreveu: > > You can't auto-fill a l

[web2py] DAL how to show only some of the lines in a db

2013-03-26 Thread Hugo Costa
Hi, In my website I want to put only 5 news in the page main page that are stored in a mongodb. Can anyone tell me how to do it? Thanks -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving e

[web2py] Re: Cannot submit SQLFORM :/

2013-03-26 Thread Derek
You can't auto-fill a location of a file to upload. Imagine the security holes that would open up on the web. No, users have to select the file on their system. On Tuesday, March 26, 2013 10:36:15 AM UTC-7, smoggy wrote: > > There is no view, it's rendered from the controller. > > About the up

[web2py] Re: Populating jqGrid Tree with JSON

2013-03-26 Thread Derek
Where would one get this jqGrid Tree, and can you post a sample JSON dataset that this is supposed to work with? On Monday, March 25, 2013 3:51:10 PM UTC-7, Nate wrote: > > Nothing in the console. Firebug reports > > No Javascript on this pageIf tags have a "type" attribute, it > should equal "

[web2py] Re: Cannot submit SQLFORM :/

2013-03-26 Thread smoggy
There is no view, it's rendered from the controller. About the upload, i'm sending in request.vars the location of the file to upload, so the user does not have to input it manually. This is being called from a backoffice program that will upload : an icon, a zip and a screenshot, so this uploa

[web2py] Re: strange mobile behaviour when changing bootstrap theme

2013-03-26 Thread LightDot
Did you use Bootswatch compatible with the Bootstrap 2.2.2 version? web2py is still at Bootstrap 2.2.2 ATM. Older Bootswatch versions are available for download from their site. Or you could update the rest of the Bootstrap included with web2py to 2.3.1 and see if this also solves the issue. An

[web2py] strange mobile behaviour when changing bootstrap theme

2013-03-26 Thread Mika Sjöman
Hi I am trying to change the theme to the Cerulean theme at bootswatch.com. But changing from the default to bootstrap.min.css makes the web2py main menu go away when on mobile phone. Should I add / change anything else to make it work on mobile? Cheers -- --- You received this message bec

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread Niphlod
whoa. seems that something wrong is happening trying to assing new tasks normally, every web2py.scheduler.mapserver#7791 - INFO - TICKER: I'm a ticker should be followed closely by the lines web2py.scheduler.mapserver#7791 - INFO - TICKER: workers are 1 web2py.scheduler.mapserver#7791 - INFO -

[web2py] Re: how about setting a standard fadeout to response.flash?

2013-03-26 Thread LightDot
I prefer to keep web2py.js stock, to ease updates, so I add a similar fadeout js to layout.html when I need it. I'm not sure I'd alter the default though. App user can miss a message that fades out quickly, so I prefer to leave such decisions to the UI designer. We have apps that have flash mes

[web2py] Re: [Newbie]How to query and display table records defined in db.py in pages of auth.wiki()

2013-03-26 Thread Spring
Thanks for explaining. 在 2013年3月26日星期二UTC+8下午10时33分05秒,Spring写道: > > Hi there, > > I've going through the web2py group trying various keywords but didn't > find a clear answer: in the pages of auth.wiki, how can I query and display > tables defined in db.py? Or, more importantly is this possibl

[web2py] facebook connect

2013-03-26 Thread ctrlSoft
hi, i want to implement 2 kind of login on my app. 1) basic auth 2) facebook connect i extended auth_user auth.settings.extra_fields['auth_user']= [ Field('ballance', type='double', default=0, writable=False, readable=False), Field('image', type='string'), Field('phone', type='integer'),

[web2py] Re: how about setting a standard fadeout to response.flash?

2013-03-26 Thread Niphlod
we should add some features to the standard flash message there are some messages that are good to behave as "sticky" (click ensures the message is read by the user) and some that are "niceties" that can fade out . We should only agree on which features use and what variables use as a stan

[web2py] Re: [Newbie]How to query and display table records defined in db.py in pages of auth.wiki()

2013-03-26 Thread Niphlod
though the current "recommended" way is to code such "views" on a different controller and embed those "views" as components http://web2py.com/books/default/chapter/29/03?search=wiki#Components On Tuesday, March 26, 2013 4:40:17 PM UTC+1, Alan Etkin wrote: > > I've going through the web2py group

[web2py] Re: web2py, mod_proxy and redirection

2013-03-26 Thread Niphlod
well, the underlying problem with this architecture is that on / apache rewrites internally from /whatever/whatever2 to /whatever/whatever2 on the default instance. From this standpoint, the default behaviour of web2py is tuned "accordingly" to what apache is doing. On /dev/ apache rewrites int

[web2py] Settings and messages when on_login and log_out

2013-03-26 Thread Annet
In my application I have the following setting in db.py: auth.settings.logout_onlogout = lambda user: on_logout(auth,session) auth.settings.logout_next=URL('cms','index') on_logout(auth,session) is a function in a module which amongst others contains the following line of code: auth.messages.lo

[web2py] web2py, mod_proxy and redirection

2013-03-26 Thread Sean Murphy
Hi, I'm having problems with apache config of web2py. I'm trying to run a test server (which others can work against) and a dev server off the same apache server. Perhaps this is a little crazy, but that's how we're set up now. >From the external pov, I'm trying to configure my server such that

[web2py] Re: [Newbie]How to query and display table records defined in db.py in pages of auth.wiki()

2013-03-26 Thread Alan Etkin
> > I've going through the web2py group trying various keywords but didn't > find a clear answer: in the pages of auth.wiki, how can I query and display > tables defined in db.py? Or, more importantly is this possible. Accordingly > to the introduction of auth.wiki it sounds like a Swiss knife

[web2py] how about setting a standard fadeout to response.flash?

2013-03-26 Thread Mika Sjöman
Hi Had a user pointing out how irritating it was that the response.flash never goes away automatically. Found this fix thou in the group, how about making a standard 4 second fadeout on it? in web2py.js: var flashBox = jQuery(".flash"), flashTimer; flashBox.click(function(){ if (flashT

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread paolo.vall...@gmail.com
If can be useful, I attached part of the log file in which demo1 is executed. First execution: 2013-03-26 15:52:31 second execution: 2013-03-26 15:58:55 (+384s) Paolo 2013/3/26 Paolo valleri > >>> import sqlite3 > >>> print sqlite3.version > 2.6.0 > >>> print sqlite3.sqlite_version > 3.7.9 >

Re: [web2py] Re: Web2Py support on roadmap for pycharm 3

2013-03-26 Thread Vasile Ermicioi
http://confluence.jetbrains.com/display/PYH/PyCharm+3.0+Roadmap Planned release date: Autumn 2013 -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+u

[web2py] Edit only specific fields from a Table

2013-03-26 Thread Kostas M
I have extended the auth_user table with an extra field: auth.settings.extra_fields['auth_user']=[ Field('isactive','boolean', default =True, readable=False, writable= False),

[web2py] Re: How can I receive oauth/access tokens with the Oauth library in Web2py?

2013-03-26 Thread Kenny
I was able to manage this issue. Tweepy was the one I used and used redirect to get tokens from callback. I guess it's better to leave login_form function as is. :) Have a nice day! On Tuesday, March 26, 2013 8:51:09 AM UTC-5, Kenny wrote: > > Yesterday, I wanted to get the tokens from Facebook

[web2py] Re: bootswatch : bootstrap.css replace what file

2013-03-26 Thread LightDot
Replace existing yourapp/static/css/bootstrap.min.css with the bootstrap.min.css file from bootswatch.com. Keep web2py_bootstrap.css as it is, as this file is web2py specific and does not come from either Bootstrap or Bootswatch. Note that web2py is still at Bootstrap 2.2.2 at the moment, altho

[web2py] Re: non-wiki-editor sees "[wiki]" dropdown menu

2013-03-26 Thread Alan Etkin
> > How to hide "*[wiki]*" from non-wiki-editor users in my case? > I guess by now you can test auth methods to know if the logged in user has the required permission and conditionally return another menu. # controller # I'd use auth.has_membership(role="") if auth.: return auth.wiki() els

[web2py] bootswatch : bootstrap.css replace what file

2013-03-26 Thread 黄祥
hi, i'm trying to change the web2py default layout with bootstrap.min.css download from http://bootswatch.com. is web2py use bootswatch file too? and how about bootstrap.css file, because when i download and replace it with web2py_bootstrap.css my layout is chaos? any hints or suggestions about

[web2py] [Newbie]How to query and display table records defined in db.py in pages of auth.wiki()

2013-03-26 Thread Spring
Hi there, I've going through the web2py group trying various keywords but didn't find a clear answer: in the pages of auth.wiki, how can I query and display tables defined in db.py? Or, more importantly is this possible. Accordingly to the introduction of auth.wiki it sounds like a Swiss knife

[web2py] Re: style input class="upload" the Boostrap way

2013-03-26 Thread Anthony
If you just needed to alter that one widget, then use a custom widget, as Niphlod suggests. Customizing the widget affects only the input element, not the label, comment, etc. Anthony On Sunday, March 24, 2013 4:17:04 AM UTC-4, Annet wrote: > > I am looking for a way to style this: > > > > mor

[web2py] Re: Cannot submit SQLFORM :/

2013-03-26 Thread Anthony
Can we see the view? Regarding pre-populating an upload field, what do you mean? Do you want to provide a default file, or do you somehow want to identify a file on the user's machine? Anthony On Tuesday, March 26, 2013 9:07:43 AM UTC-4, smoggy wrote: > > Hi Folks, > > So I cannot submit SQLFO

Re: [web2py] Re: Web2Py support on roadmap for pycharm 3

2013-03-26 Thread Alex
awesome :) desperately waiting for a good IDE with web2py support. what are currently the best options for debugging web2py applications? I'm using Komodo Edit which is quite nice - is it possible to easily debug a web2py application with Komodo IDE? Wing IDE seems to support debugging but the

[web2py] How can I receive oauth/access tokens with the Oauth library in Web2py?

2013-03-26 Thread Kenny Chung
Yesterday, I wanted to get the tokens from Facebook and Twitter for users and using the Web2py normal login system at same time. I only wanted to use their APIs not for implementing oauth login into my website. I was able to get tokens from Facebook API by using Facebook JavaScript SDK. I chose thi

[web2py] Re: Sitemap Plugin or Sitemap Generator

2013-03-26 Thread BlueShadow
Thanks james I did it exactly the other way around I made a list of funktions which are allowed to show ^^. It works pretty great except that all static(without an id) funktions show up twice. do you have the same problem? I'm sure its easy to fix I will do it once I finished the more pressing m

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread Paolo valleri
>>> import sqlite3 >>> print sqlite3.version 2.6.0 >>> print sqlite3.sqlite_version 3.7.9 But, if the db lock is not the problem, the test application is very easy, where is it supposed to be the problem? On Tuesday, March 26, 2013 2:32:50 PM UTC+1, Niphlod wrote: > > I find hard to believe that

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread Niphlod
I find hard to believe that with a single worker, with that function that basically just prints something and an execution every 300 seconds the problem lies into a lock, unless the SQLite library available on your system is reallly old. On Tuesday, March 26, 2013 2:21:21 PM UTC+1, Paolo valler

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread Paolo valleri
When yesterday I saw demo1 in timeout with ps auxf I have seen that a new process was created. For this reason I started to debug scheduler and I asked how to log etc. Moreover, I restarted the scheduler manually so I am not able to understand if the other different names are for an internal pr

[web2py] Cannot submit SQLFORM :/

2013-03-26 Thread smogzer
Hi Folks, So I cannot submit SQLFORM, even the simpler ones like the following. I always get the "else:" that says "please fill the form" I checked and it seems the code is alright and i can submit forms and add content using the badmin plugin, so i'm kind of lost here. And another question, how

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread Niphlod
with the default logging.conf the timestamp is present as in all other web2py-related logging PS: are you sure that the worker is not killed/restarted by any chance (see the worker_name in the scheduler_run table) On Tuesday, March 26, 2013 11:33:53 AM UTC+1, Paolo valleri wrote: > > I exe

[web2py] Re: SQLFORM.grid 'headers' doesn't change column header

2013-03-26 Thread Niphlod
SQLFORM.grid "takes" the labels from the underlying model, so as long as you specify the label before calling the grid, you're fine. db.table1.field1.label = 'whatever' grid = SQLFORM.grid(db.table1) should work. On Tuesday, March 26, 2013 12:07:29 PM UTC+1, Andrii Pitukh wrote: > > Can you wri

[web2py] Re: SQLFORM.grid 'headers' doesn't change column header

2013-03-26 Thread Andrii Pitukh
Can you write a code example? SQLFORM constructor has 'labels' parameter, but SQLFORM.grid doesn't have it. On Tuesday, March 26, 2013 12:20:10 PM UTC+2, Niphlod wrote: > > the form has normally the label of that field . headers are for the > table representation only > > On Tuesday, March

[web2py] Re: flash after callback

2013-03-26 Thread Serbitar
Solved it myself. The target should be ':eval' like this: in the view: {{=A('func', callback('func'), target=':eval')}} in the controller: def func(): return 'jQuery(".flash").html("test").slideDown().delay(1000).slideUp();' On Tuesday, March 26, 2013 10:55:23 AM UTC+1, Serbitar wrote: > >

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread paolo.vall...@gmail.com
I executed again demo1, I run it several times, I got even in this case elapsed time between two consecutive executions around 360 and even more instead of 300. What can I do to understand what is not working correctly? Moreover, I would suggest to add the timestamp to the scheduler debug log. P

[web2py] Re: SQLFORM.grid 'headers' doesn't change column header

2013-03-26 Thread Niphlod
the form has normally the label of that field . headers are for the table representation only On Tuesday, March 26, 2013 11:01:03 AM UTC+1, Andrii Pitukh wrote: > > I created the following form: > > SQLFORM.grid(dbm.groups_subjects, headers={'table1.field1':T('Myname1')) > > The names of colu

[web2py] SQLFORM.grid 'headers' doesn't change column header

2013-03-26 Thread Andrii Pitukh
I created the following form: SQLFORM.grid(dbm.groups_subjects, headers={'table1.field1':T('Myname1')) The names of columns that are set in headers are shown correctly (I see * Myname1* as header). But when I press view or create, I see '*field1*' as column header instead of *'Myname1'* -- --

[web2py] flash after callback

2013-03-26 Thread Serbitar
Hi folks, I am trying to do a session.flash after a function is called via A('func', callback('func')). A simple session.flash in the callback function like: def func(): session.flash('test') return dict() is not working. I found an old thread that suggests: def func(): return 'jQue

[web2py] non-wiki-editor sees "[wiki]" dropdown menu

2013-03-26 Thread Spring
Hello everybody, I'm using auth.wiki() in my simple app. Now I have 2 user records, the first user is in groups of "user_1" and "wiki-editor", the other user is in group of "CommonUser". What I understand is according to autho.wiki() settings, the "*[wiki]*" menu will only be exposed to "user_1

[web2py] IMG in A tag of SQLFORM `submit_button`?

2013-03-26 Thread Alec Taylor
{{=SQLFORM.factory(submit_button=XML(SPAN('hello', IMG(_src=URL('static', 'img/bg.png')}} How do I get this to work? Thanks for all suggestions, Alec Taylor -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this gr