[web2py] Re: Bootstrap is really killing web2py

2014-07-22 Thread Gael Princivalle
Hello Moustafa. I agree with you and hope that we'll have soon a fully Bootstrap 3 web2py version. Il giorno venerdì 18 luglio 2014 21:17:34 UTC+2, Moustafa Mahmoud ha scritto: > > I have been using web2py for 3 years know, and I was really impressed by > it, I defended it in every discussion,

Re: [web2py] Re: on_define example to improve the book: please help.

2014-07-22 Thread Tim Richardson
I believe that on_define is always done at table instantiation, so for non lazy tables it's done when the request is executed as part of setting up the table. so lazy_tables is not mandatory. On Wed, Jul 23, 2014 at 2:37 PM, 黄祥 wrote: > db = DAL(lazy_tables=True) >> >> > not sure, if lazy_tabl

[web2py] Re: on_define example to improve the book: please help.

2014-07-22 Thread 黄祥
> > db = DAL(lazy_tables=True) > > not sure, if lazy_tables = True is mandatory or not, another example for on_define : e.g. def on_define_bank(table): # default table.name.default = '' table.age.default = 30 # label table.name.label = T('Name') table.age.label = T('Age

Re: [web2py] Re: on_define example to improve the book: please help.

2014-07-22 Thread Tim Richardson
On Wed, Jul 23, 2014 at 1:20 PM, Anthony wrote: > I think you're right -- those attributes shouldn't trigger the lazy > definition. on_define would be more useful in case something expensive is > happening in defining one of the attributes. Also, if you define an > IS_IN_DB or IS_NOT_IN_DB that h

[web2py] Re: on_define example to improve the book: please help.

2014-07-22 Thread Anthony
I think you're right -- those attributes shouldn't trigger the lazy definition. on_define would be more useful in case something expensive is happening in defining one of the attributes. Also, if you define an IS_IN_DB or IS_NOT_IN_DB that has a Set object as the first argument (as the query wi

[web2py] Re: Web2py Rocket server is too slow

2014-07-22 Thread Tim Richardson
Look in the book, in the deployment recipes chapter, for further guidance about the scripts Massimo mentions. On Monday, July 21, 2014 9:29:24 PM UTC+10, jaipraka...@gmail.com wrote: > > web2py rocket server is too slow for my application. > Can somebody share step by step instruction to install

[web2py] on_define example to improve the book: please help.

2014-07-22 Thread Tim Richardson
I'm trying to improve ch 6 in the book, DAL. The on_define parameter to define_table is not documented. This is my current text, but the example concerns me because it seems redundant to me. That is, until I found the example, I thought that adding such simple requires settings via Field defin

[web2py] Re: rname and reserved names

2014-07-22 Thread Simon Ashley
The missing piece was check_reserved=None. -- 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 Go

[web2py] Re: SQLFORM doesn't have SELECT element values

2014-07-22 Thread Cliff Kachinske
The Chrome developer tools should show the dragged-to select being populated as you drag things across. If things aren't moving look in the "console" tab for errors. Also you can insert alert statements into the javascript to see if the events are firing. On Tuesday, July 22, 2014 5:01:55 PM

[web2py] Re: web2py.com up and down all day

2014-07-22 Thread Jim S
FWIW - here is the pythonanywhere message that is returned: Something went wrong :-( This website is hosted by PythonAnywhere, an online hosting environment. Something went wrong while trying to load it; please try again later. If this is your PythonAnywhere-hosted site, and you just reloade

[web2py] web2py.com up and down all day

2014-07-22 Thread Jim S
Just posting this to make sure the powers are aware... I double-checked on the downforeveryoneorjustme.com site and it confirmed that it is down. I've used it throughout the day (for access to the book) but it keeps coming and going since this morning. -- Resources: - http://web2py.com - http

[web2py] Re: SQLFORM doesn't have SELECT element values

2014-07-22 Thread Frank Buibish
I just checked what was being sent via POST, and it's not submitting an empty variable corresponding with the select name. Now could this be because the select tag isn't an input tag? I'm not an html pro yet, so small details like this are something i will learn with time. Any suggestions on

Re: [web2py] Re: Opening PDF files in web browser

2014-07-22 Thread Michele Comitini
If you want to avoid the Acrobat plugin entirely and show pdf inline: https://github.com/mozilla/pdf.js It's already included in Firefox, but the other browsers can use it too 2014-07-22 21:11 GMT+02:00 Leonel Câmara : > You need to change your download for PDFs controller, this would work if >

[web2py] nice menu template

2014-07-22 Thread Dmitry Ermolaev
with flyed submenu http://www.bringbackroi.com/collections/shipped -- 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 a

[web2py] Re: Opening PDF files in web browser

2014-07-22 Thread Leonel Câmara
You need to change your download for PDFs controller, this would work if you don't use uploadseparate (which I usually do) : def download_pdf(): filename=request.args[0] path=os.path.join(request.folder,'uploads', filename) response.headers['ContentType'] ="application/pdf"

[web2py] Opening PDF files in web browser

2014-07-22 Thread José Eloy
Hello! I've developed an application that allows users to upload document files (doc, pdf, xls) and then download them. The problem is when the user wants download the files the web browser always opens a window to ask where to download them (or the file is downloaded in the download folder). I

[web2py] Re: Can not import copy_reg

2014-07-22 Thread Richard
Yes, I can import copy_reg from the Python prompt on the remote server. On Tuesday, July 22, 2014 1:21:36 PM UTC+2, Massimo Di Pierro wrote: > > Copy reg is a python module. Can you import it from the normal python > shell? > > On Tuesday, 22 July 2014 06:05:06 UTC-5, Richard wrote: >> >> Hi, >>

[web2py] Re: Display registration error for auth.register_bare()

2014-07-22 Thread Mark Li
Hey Massimo! Just for clarification, are you referring to opening a ticket for: 1. auth.register() only showing a flash msg on registration error, without a page reload OR 2. auth.register_bare() returning error msg on registration fail, instead of just False In my case I would like functio

[web2py] Re: urllib2 and web2py not showing page

2014-07-22 Thread Anthony
{{=XML(idx_page)}} See http://web2py.com/books/default/chapter/29/05/the-views#XML. Anthony On Monday, July 21, 2014 9:58:32 AM UTC-4, David Jobes wrote: > > I am trying to call a web page from within a function it works fine, > except for the fact that it only shows the raw html page and not a

Re: [web2py] Re: SQLFORM grid process not working

2014-07-22 Thread Anthony
Sorry, forgot that you have to extract the form from the grid object. You can also get the create and update forms via: form = grid.element('.web2py_form') Note, that will be None if there is no form (e.g., when loading just the grid), so first test that it exists. Anthony On Tuesday, July 22

[web2py] Re: Can not import copy_reg

2014-07-22 Thread Massimo Di Pierro
Copy reg is a python module. Can you import it from the normal python shell? On Tuesday, 22 July 2014 06:05:06 UTC-5, Richard wrote: > > Hi, > > I have an issue with adjusting the auth tables resulting in a custom > import and an error that copy_reg can not be imported. > > The error trace is: >

[web2py] Can not import copy_reg

2014-07-22 Thread Richard
Hi, I have an issue with adjusting the auth tables resulting in a custom import and an error that copy_reg can not be imported. The error trace is: Traceback (most recent call last): File "/home4/mamplcom/public_html/cgi-bin/gluon/restricted.py", line 220, in restricted exec ccode in env

Re: [web2py] Getting more rows from a table without jQuery, PHP, etc

2014-07-22 Thread Michele Comitini
Remove PHP from the landscape and put web2py there. You can use any AJAX enabled grid that does what you need. Write a controller that gets called by the grid and sends JSON encoded rows back to the grid, when the scroll to the end event is generated on the grid. For instance you can bind a call t

[web2py] Re: Tables defined in module not showing up

2014-07-22 Thread Ruud Schroen
Nevermind, it was because I initialized my module in a controller and not a model. On Tuesday, July 22, 2014 11:21:39 AM UTC+2, Ruud Schroen wrote: > > Hi guys, > > I'm building a Blog module, which I will post here as soon as it's done. > But there's something wrong, I've defined a couple of tab

[web2py] Tables defined in module not showing up

2014-07-22 Thread Ruud Schroen
Hi guys, I'm building a Blog module, which I will post here as soon as it's done. But there's something wrong, I've defined a couple of tables in the module. def define_tables(self): category_tablename = self.settings.category_tablename post_tablename = self.settings.post_tablenam

Re: [web2py] Re: Are there any Lotus Notes developers using web2py?

2014-07-22 Thread António Ramos
done https://code.google.com/p/web2py/issues/detail?id=1953 2014-07-22 7:31 GMT+01:00 Massimo Di Pierro : > Please open a ticket about this. > > > On Monday, 21 July 2014 11:15:36 UTC-5, Ramos wrote: >> >> Hello @Massimo, any news about this? >> >> Em quarta-feira, 21 de setembro de 2011 18h23mi

Re: [web2py] Re: rname and reserved names

2014-07-22 Thread Michele Comitini
You can also use explicit quoting of entities at DAL level. It works transparently so you can use the same names in python and in the DB schema. db = DAL('postgres://...', ...,ignore_field_case=False, entity_quoting=True) db.define_table('table1', Field('column'), Field('COLUMN')) print db(db.

[web2py] Re: rname and reserved names

2014-07-22 Thread Niphlod
if it's what I think, then db = DAL(, check_reserved=None) db.define_table('easy', Field('position', rname='"difficult_name_for_the_field"'), rname='"difficult_name_for_table"') should work (albeit, if it does, it shows "the bug" because if you're using rname, then you don't need to