[web2py] Re: Auth form custom errors

2012-05-06 Thread Rhys
Hey Massimo, You've steered me in the right direction. Basically I've had to put in a pure opening html form element in, and then use the custom form widgets afterwards. Works now. Resulting in: {{=form.custom.widget.email}} {{=form.custom.widget.password}} {{=form.custom.end}} The f

[web2py] localhost external machine.

2012-05-06 Thread Mchurch
Good morning to everybody. I've a web2py application on a windows machine, the public windows ip machine is 192.168.100.191. >From my mobile cell (nor tablet..) i can't get localhost. I tried many times with 0.0.0.0, 127.0.0.1, and even if with the public ip 192.168.100.191 but i always get "SITE

Re: [web2py] localhost external machine.

2012-05-06 Thread Bruno Rocha
python web2py.py -a -i 0.0.0.0 -p 8000 if you are using windows version, just set the interface as 0.0.0.0 in the web2py widget. Or are you using some other webserver? On Sun, May 6, 2012 at 5:49 AM, Mchurch wrote: > Good morning to everybody. > I've a web2py application on a windows machine,

[web2py] store formated text in a text field of a table

2012-05-06 Thread BlueShadow
Hi, I got a table for Articles I want to write someday on my page which contains a text field for the content. My Problem is that it does not allow me to store any format no newlines paragraphs bold stuff links or anything along this line. It just turns out to be plain text. I tried html tags es

Re: [web2py] store formated text in a text field of a table

2012-05-06 Thread Khalil KHAMLICHI
if content of field is in html try : {{=XML(row.field)}} On Sun, May 6, 2012 at 9:48 AM, BlueShadow wrote: > Hi, > I got a table for Articles I want to write someday on my page which > contains a text field for the content. > My Problem is that it does not allow me to store any format no newline

Re: [web2py] localhost external machine.

2012-05-06 Thread Ricardo Pedroso
On Sun, May 6, 2012 at 9:49 AM, Mchurch wrote: > Good morning to everybody. > I've a web2py application on a windows machine, the public windows ip > machine is 192.168.100.191. > From my mobile cell (nor tablet..) i can't get localhost. > I tried many times with 0.0.0.0, 127.0.0.1, and even if wi

Re: [web2py] store formated text in a text field of a table

2012-05-06 Thread BlueShadow
OK that works but it is still a little inconvienient to write an html tag for every new line you want. for links and stuff thats OK but a newline should work without a tag. On Sunday, May 6, 2012 11:55:39 AM UTC+2, Khalil KHAMLICHI wrote: > > if content of field is in html try : {{=XML(row.field)

[web2py] Bootstrap.min.js

2012-05-06 Thread Aurelijus Useckas
Hi, The Bootstrap.min.js in the Trunk layout.html is included in the beginning section. This didn't allow me to make use of the most, if not all of Bootstrap functions which required .js. Moving the inclusion to the end of the file solved the problem.

[web2py] Re: default/user.html and custom form

2012-05-06 Thread Cédric Mayer
The fact is that you know more about web2py and details than me :-) I learned about form.custom after I had done my function and used it in my views. But even then I didn't know about the split form.custom.end[1] to get hidden fields. By the way I do not think it is in the book, you may add it.

[web2py] Re: LOAD with timing arguments being loaded once

2012-05-06 Thread Alan Etkin
Well, here's the thing: The timing options *are* in the web2py.js file in hg trunk, inside applications/welcome, it's just that they are not updated in my local welcome.w2p file. So, if admin uses this .w2p file when creating a new app, I will have an outdated version of the scaffolding applicat

[web2py] Re: Unable to restart Web2py on Mac

2012-05-06 Thread Yarin
This is still broken: I'm running web2py with the built-in Rocket server locally on my Mac. When I click the "stop server" button on the server window, and then click "start server" to restart, I get the following: ERROR:Rocket.Errors.Port8000:Socket 127.0.0.1:8000 in use by other process and

[web2py] Re: TypeError: 'instancemethod' object is unsubscriptable

2012-05-06 Thread Massimo Di Pierro
{{=form.element('table')}} or {{=form[0]}} On Sunday, 6 May 2012 01:20:51 UTC-5, Annet wrote: > > Using this code to customize a form: > > > > {{=response.functionname}} > > > {{=form.custom.begin}} > {{=form.element['table']}} > > > {{=DIV(form.custom.end[1])

[web2py] Re: Auth form custom errors

2012-05-06 Thread Massimo Di Pierro
Interesting. When you say it did not work. What html did it generate? On Sunday, 6 May 2012 03:25:41 UTC-5, Rhys wrote: > > Hey Massimo, > > You've steered me in the right direction. > > Basically I've had to put in a pure opening html form element in, and then > use the custom form widgets after

[web2py] Re: Bootstrap.min.js

2012-05-06 Thread Massimo Di Pierro
Is that how it is intended to be used? Can you point me to an example in the docs? On Sunday, 6 May 2012 06:05:58 UTC-5, Aurelijus Useckas wrote: > > Hi, > > The Bootstrap.min.js in the Trunk layout.html is included in the beginning > section. This didn't allow me to make use of the most, if n

[web2py] Re: LOAD with timing arguments being loaded once

2012-05-06 Thread Massimo Di Pierro
When you install web2py from the zip, there is a file called web2py/NEWINSTALL. When this file is found (even if empty), web2py rebuilds welcome.w2p. On Sunday, 6 May 2012 09:02:36 UTC-5, Alan Etkin wrote: > > Well, here's the thing: > The timing options *are* in the web2py.js file in hg trunk,

[web2py] Another misinformed article about web2py

2012-05-06 Thread Massimo Di Pierro
http://me.veekun.com/blog/2012/05/05/python-faq-webdev/

[web2py] response not displaying correctly in iframe

2012-05-06 Thread simon
Please can someone explain this. When I enter test using the code below then I can see a page with "TEST" and "CONTENTS" which is what I wanted. However when I open test/4 it shows three nested iframes each with "TEST" def test(): response.view="default/test.html" return dict() def

[web2py] Re: store formated text in a text field of a table

2012-05-06 Thread simon
http://www.web2pyslices.com/slice/show/1345/using-ckeditor-for-text-fields On Sunday, 6 May 2012 10:48:12 UTC+1, BlueShadow wrote: > > Hi, > I got a table for Articles I want to write someday on my page which > contains a text field for the content. > My Problem is that it does not allow me to s

[web2py] Re: Another misinformed article about web2py

2012-05-06 Thread Gour
On Sun, 6 May 2012 08:11:07 -0700 (PDT) Massimo Di Pierro wrote: > http://me.veekun.com/blog/2012/05/05/python-faq-webdev/ The post which says "Allegedly...so don’t use it if you care..." spekas for itself. I just wonder why writing about things one does not have a clue. Sincerely, Gour --

[web2py] Re: Bootstrap.min.js

2012-05-06 Thread Aurelijus Useckas
I'm not sure if it is intended that way, haven't read about it in the docs. It's just the only solution that has worked for me. On Sunday, May 6, 2012 5:53:57 PM UTC+3, Massimo Di Pierro wrote: > > Is that how it is intended to be used? Can you point me to an example in > the docs? > > On Sunda

[web2py] Re: Admin interface slow when static dir has a lot of files

2012-05-06 Thread Larry Weinberg
Is this being addressed? I am finding the same problem. Other than that, and a couple of other suggestions for having more links to speed up the admin interface workflow I am loving web2py!

[web2py] Candidate Employment Tracking Portal

2012-05-06 Thread Yogesh Kamat
Just checked out some videos of pycon2012 by Massimo and in 30 mins flat, i was really impressed. With really efforts that has been possible.. since i have read the hardships faced for entering pycon2011. I have been searching resources for developing a few applications which have been greatly

[web2py] query referenced table in grid/smartgrid

2012-05-06 Thread Mathias
Is there an easy way to query a referenced table in a grid/smartgrid ? Is the only way, to achieve this goal, writing a search_widget ? Does anyone already has written some code to achieve this goal ? Thanks Mathias

Re: [web2py] Re: localhost external machine.

2012-05-06 Thread Yogesh
Hello Marco, 192.168.x.x is a private network IP. Not able to check out.. Regards, Yogesh On Sun, May 6, 2012 at 9:39 PM, Mchurch wrote: > ThankYou guys. > The file was enabled, but doing some more trying i was able to get > localhost using public ip 192.168.100.191 (I'm catching all connection

[web2py] Re: LOAD with timing arguments being loaded once

2012-05-06 Thread Alan Etkin
Thanks very much Massimo. I've placed the empty file missing in my local copy of the hg repository. That solved it On Sunday, May 6, 2012 11:55:44 AM UTC-3, Massimo Di Pierro wrote: > > When you install web2py from the zip, there is a file called > web2py/NEWINSTALL. When this file is found (eve

Re: [web2py] Re: Another misinformed article about web2py

2012-05-06 Thread Yogesh
*Friends, * I have put my comments out there. Years back i had read comments against silverstripe, but therein the person had mentioned what's wrong in the coding and approach taken by silverstripe. and the guys replied positively to the comment and fixed where required. Check out for your referen

[web2py] Re: Admin interface slow when static dir has a lot of files

2012-05-06 Thread Massimo Di Pierro
You should not let rocket serve static files. I would use a production quality server luke apache or ngnix. Anyway, it is not a good idea to have too many files in the same folder. Just accessing the file system becomes a bottle neck. One way to increase efficiency is to move the static files to

[web2py] Re: response not displaying correctly in iframe

2012-05-06 Thread Massimo Di Pierro
That;s how html understand paths. Do it the safe web2py way: On Sunday, 6 May 2012 10:33:58 UTC-5, simon wrote: > > Please can someone explain this. > > When I enter test using the code below then I can see a page with "TEST" > and "CONTENTS" which is what I wanted. > However when I open t

[web2py] Re: Bootstrap.min.js

2012-05-06 Thread Massimo Di Pierro
Can you please post example of what you did an more explanations about why? On Sunday, 6 May 2012 11:20:39 UTC-5, Aurelijus Useckas wrote: > > I'm not sure if it is intended that way, haven't read about it in the > docs. It's just the only solution that has worked for me. > > On Sunday, May 6, 2

[web2py] Re: response not displaying correctly in iframe

2012-05-06 Thread simon
Thanks. That seems to work. Though I am still curious as to why test.html works and test.html/4 does not. On Sunday, 6 May 2012 18:23:20 UTC+1, Massimo Di Pierro wrote: > > That;s how html understand paths. Do it the safe web2py way: > > width="100%"> > > On Sunday, 6 May 2012 10:33:58 UTC-5, si

[web2py] Unit Testing

2012-05-06 Thread Rod Watkins
Hi everyone, I am fairly new to web2py and python programming, but have had some rather wonderful success in the month or so I've been learning it. I am now preparing to start a real project and want to have unit tests as I go. I've read a bit (will be doing more) about python unit testing (d

[web2py] Re: response not displaying correctly in iframe

2012-05-06 Thread pbreit
This is *really* weird code. Can you show us resulting the HTML source? As Massimo notes, best to use URL() function for URLs. You generally don't need this: response.view="default/test.html". Shouldn't matter but you could just do: return 'CONTENTS' Going to http://myserver.com/myapp/test/4

[web2py] Re: Bootstrap.min.js

2012-05-06 Thread pbreit
Well, here's the base Bootstrap skeleton: Bootstrap, from Twitter http://twitter.github.com/bootstrap/assets/css/bootstrap.css>" rel="stylesheet"> body { padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */ } http://twitter.github.com/bootstr

[web2py] Re: Bootstrap.min.js

2012-05-06 Thread Massimo Di Pierro
the web2py bootstrap.min.js should include of the other boostrap-*.js On Sunday, 6 May 2012 12:56:50 UTC-5, pbreit wrote: > > Well, here's the base Bootstrap skeleton: > > > > Bootstrap, > from Twitter > href="../assets/css/bootstrap.css

[web2py] Re: Admin interface slow when static dir has a lot of files

2012-05-06 Thread pbreit
I'd suggest putting the images outside the web2py directory or not using the web interface.

[web2py] Re: Another misinformed article about web2py

2012-05-06 Thread pbreit
Would making it so that you "import request" satisfy the author? It does seem like web3py (or whatever) whould make more use of import to avoid these critiques.

Re: [web2py] Re: Bootstrap.min.js

2012-05-06 Thread Aurelijus
Yes, bootstrap-min.js includes all the goodies, but as a skeleton suggests it has to be included in the end of a document. On Sun, May 6, 2012 at 9:03 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > the web2py bootstrap.min.js should include of the other boostrap-*.js > > > On Sunday

[web2py] Re: Dynamic Subdomain Routing

2012-05-06 Thread pbreit
You can get the subdomain with request.env.http_host.split('.')[0] If you always wanted it available, in a model: subdomain = request.env.http_host.split('.')[0]

[web2py] Re: response not displaying correctly in iframe

2012-05-06 Thread Anthony
I think the same problem as mentioned here: https://groups.google.com/d/msg/web2py/eS0bKdwuQuY/-v0lBhtIpPgJ. In your iframe, you have src='webpage.html' -- because the URL does not start with a "/", the browser interprets it as being relative to the current URL. So, when the parent page is http

[web2py] Restart web2py from command line

2012-05-06 Thread Yarin
Is there any way to restart web2py from the command line. I'm working on a mac, and there's no way to use the GUI to stop or restart the built-in rocket server. Currently the best I can do is: - Start web2py: python web2py.py -a 'pass' -i 127.0.0.1 -p 8000 - Stop web2py: kill -SIGTERM {wha

Re: [web2py] Re: An insult to web2py ?

2012-05-06 Thread Anthony
> > Regarding the editor and editing in production. I was expecting that > argument and think that shouldn't be done unless its some extreme > emergency. > OK, so let's say it's there for extreme emergencies. Also, maybe you need to make a quick fix on your "staging" server. There are other ti

Re: [web2py] Re: An insult to web2py ?

2012-05-06 Thread Anthony
> > The dal exposes more details therefore allows you to do more. However, by > exposing all these details, you get a tool that is harder to use (in the > sense that you have to repeat yourself) for all the other scenarios where > you don't need such details. > But what are examples where you

[web2py] Re: response not displaying correctly in iframe

2012-05-06 Thread simon
Well you only have a small extract of what I am doing. Even so it is a little weird so I will explain (any suggestions of alternative ways welcome!): I want to include within my view some of my own buttons and menus on the left of the screen; plus show an external web page from the internet. H

[web2py] Anyone using flake8 / pyflakes?

2012-05-06 Thread Keith Edmunds
I've just started using flake8 from within vim. Flake8 checks code for PEP8 conformance and general errors, including undefined names. That means that running it when editing, say, a web2py controller, lots of warnings are given: /path/to/file.py|16| W802 undefined name 'session' There is an opti

[web2py] Re: Reloading modules

2012-05-06 Thread Yarin
I think I've figured out the issue I was having with the auto reloader- the modules I import into the app do in fact reload, it was their dependancies that weren't- so if made a change on a module that was being imported only by another module, the changed module wasn't reloaded. The solution

Re: [web2py] Re: localhost external machine.

2012-05-06 Thread Mchurch
yes Yogesh, it's a private network. I tried on another windows 7 machine, with windows version of web2py and everything works perfectly. m... on the other windows machine i copied all web2py directory from my mac. Is it possible that i must download the windows version instead..?? Il giorn

[web2py] Re: My home made ide

2012-05-06 Thread villas
Thanks for this and I was interested to try it. FYI I got this error: AttributeError: 'MainPanel' object has no attribute 'terminal' Maybe it was the software I was using. Windows XP SP3, Python 2.7 and wx 2.8

[web2py] A good provider

2012-05-06 Thread Michele Comitini
Hello list, If prefer to manage your machines, clusters and so on this is my suggestion: http://www.giga-international.com/?show=vserver I have been using them for almost 2 years and their price is very for what you get: very fast networking and powerful VMs and also cheap real servers. Support

Re: [web2py] Anyone using flake8 / pyflakes?

2012-05-06 Thread Keith Edmunds
In case anyone's interested, I've posted a quick and dirty hack to fix this problem at https://bitbucket.org/tarek/flake8/issue/14/flake8-fails-to-ignore-errors-warning-from#comment-1385353 -- "You can have everything in life you want if you help enough other people get what they want" - Zig Zigl

[web2py] Re: Another misinformed article about web2py

2012-05-06 Thread Massimo Di Pierro
First of the comment about what web2py "allegedly" does is untrue. Web2py does not inject variables in modules. Web2py leaves modules alones and you use them normally as in any python program. Web2py simpley does not treats models and controllers as modules. They in are not modules at all. They

Re: [web2py] Re: Bootstrap.min.js

2012-05-06 Thread Massimo Di Pierro
Please open a google code ticket about this so you get the credit and we do not forget. ;-) On Sunday, 6 May 2012 13:12:18 UTC-5, Aurelijus Useckas wrote: > > Yes, bootstrap-min.js includes all the goodies, but as a skeleton suggests > it has to be included in the end of a document. > > On Sun

[web2py] Re: Restart web2py from command line

2012-05-06 Thread Massimo Di Pierro
We can add a restart option. Anybody wants to try a patch about this? The pid is stored in httpserver.pid. On Sunday, 6 May 2012 14:01:24 UTC-5, Yarin wrote: > > Is there any way to restart web2py from the command line. I'm working on a > mac, and there's no way to use the GUI to stop or resta

Re: [web2py] Re: localhost external machine.

2012-05-06 Thread howesc
it sounds to me like a routing problem - when hosting from your mac the image links must not be directed back to your mac server. double check that the URLs output in the HTML refer to the proper host. you might try proxying your traffic through something like "charles" (google charles http

[web2py] Re: Unable to restart Web2py on Mac

2012-05-06 Thread howesc
you may dislike my answerbut i have a shell script that passes the parms to web2py that i want. i launch it via terminal, and i ctrl-c to kill and then restart. i find that much faster than waiting for the tcl window to load (and i can share the script with my coding team and we don't hav

[web2py] Admin Interface suggestions

2012-05-06 Thread Larry Weinberg
Once again I am LOVING web2py. It's transformational technology. I do have some admin interface suggestions: 1 - It would be very nice if all views in the admin interface included a single horizontal line near the top that had links back to the last 4 or 5 edited files to make it easier to bou

Re: [web2py] Re: Restart web2py from command line

2012-05-06 Thread Jonathan Lundell
The Fedora rc file has some restart logic, I think. On May 6, 2012, at 5:44 PM, Massimo Di Pierro wrote: > We can add a restart option. Anybody wants to try a patch about this? The > pid is stored in httpserver.pid. > > > On Sunday, 6 May 2012 14:01:24 UTC-5, Yarin wrote: > Is there any way

[web2py] orderby from 2 tables

2012-05-06 Thread CtrlSoft
hi, i have 2 tables both has "added_on" field i need last 'n'(lets assume n=5) rows from both tables ordered by added_on. it can be 1 from first table and 4 from second or 2|3 rows1 =db(db.table1).select(orderby=~db.table1.added_on, limitby=(0,5)) rows2 =db(db.table2).select(orderby=~db.table2.

[web2py] Re: orderby from 2 tables

2012-05-06 Thread Massimo Di Pierro
Given rows1 =db(db.table1).select(orderby=~db.table1.added_on, limitby=(0,5)) rows2 =db(db.table2).select(orderby=~db.table2.added_on, limitby=(0,5)) you can do rows = rows1|rows2 # if you want to discard repeated values rows = rows1&rows2 # if you do not want to discard repeated values rows =

Re: [web2py] Re: Restart web2py from command line

2012-05-06 Thread Jonathan Lundell
On May 6, 2012, at 7:30 PM, Jonathan Lundell wrote: > The Fedora rc file has some restart logic, I think. scripts/web2py.archlinux.sh and web2py.fedora.sh > > On May 6, 2012, at 5:44 PM, Massimo Di Pierro > wrote: > >> We can add a restart option. Anybody wants to try a patch about this? The

[web2py] Re: Restart web2py from command line

2012-05-06 Thread pbreit
I have an alias in my profile: alias web2py='cd ~/web2py; python web2py.py -a "" -i 127.0.0.1 -p 8001' To stop I just press ctrl-c.

Re: [web2py] Re: localhost external machine.

2012-05-06 Thread Yogesh
Marco, just export w2p file from the admin login of web2py. Then add the module normally on the windows machine.. Magic of web2py hehe.. On Mon, May 7, 2012 at 2:13 AM, Mchurch wrote: > yes Yogesh, it's a private network. > > I tried on another windows 7 machine, with windows version of web2py

Re: [web2py] Re: Another misinformed article about web2py

2012-05-06 Thread Yogesh
Massimo, That's what i respect of you.. To the point explanation. Cheers!!! Regards, *Yogesh * On Mon, May 7, 2012 at 4:12 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > First of the comment about what web2py "allegedly" does is untrue. Web2py > does not inject variables in module

[web2py] Re: Unable to restart Web2py on Mac

2012-05-06 Thread Annet
I had the same problem in October 2010: https://groups.google.com/forum/?fromgroups#!searchin/web2py/annet$20other$20process/web2py/Zc53Lx85g50/P1CJjLFJuUcJ Back then it was qualified as an OS X weirdness ;-) Regards, Annet

Re: [web2py] Re: Bootstrap.min.js

2012-05-06 Thread Annet
I started working with bootstrap 4 weeks ago and didn't make use of the version in trunk. I just integrated the bootstrap skeleton into web2py's layout.html and web2py_ajax.html (just renamed them scaffold.html and scaffold_ajax.html). In the scaffold.html view: {{ response.files.ap

Re: [web2py] Re: Bootstrap.min.js

2012-05-06 Thread Massimo Di Pierro
I think we have 4 people now working on this. Let's move this discussion to web2py-developers. Please copy your email there. On Monday, 7 May 2012 00:18:35 UTC-5, Annet wrote: > > I started working with bootstrap 4 weeks ago and didn't make use of the > version in trunk. I just integrated the bo

[web2py] Re: TypeError: 'instancemethod' object is unsubscriptable

2012-05-06 Thread Annet
Massimo, I tried both solutions, they both result in the same error: Traceback (most recent call last): File "/Library/Python/2.5/site-packages/web2py/gluon/restricted.py", line 204, in restricted ccode = compile2(code,layer) File "/Library/Python/2.5/site-packages/web2py/gluon/restricte

Re: [web2py] Re: localhost external machine.

2012-05-06 Thread Marco Dellachiesa
I'll try asap!! Ps. I'm in Love with web2py, ma hehehe. Tnx! Il giorno 07/mag/2012 06:18, "Yogesh" ha scritto: > Marco, just export w2p file from the admin login of web2py. > Then add the module normally on the windows machine.. > > Magic of web2py hehe.. > > On Mon, May 7, 2012 at 2:13 AM, Mchur

[web2py] Re: Another misinformed article about web2py

2012-05-06 Thread Gour
On Sun, 6 May 2012 15:42:14 -0700 (PDT) Massimo Di Pierro wrote: > Yes this is a source of criticism mostly for people who do not > understand why we do it (to enable hot install and uninstall of apps > without conflicts). It is better than what other frameworks do > (reload module when they chan