[web2py] web2py.com looks kind of crappy

2015-06-12 Thread Richard Penman
I get the impression web2py.com is not maintained these days - I see an award from 2012, a broken button (This button could not be generated. Help https://www.coinbase.com/external_redirect?link=https%3A%2F%2Fsupport.coinbase.comsignature=2b3e71a85b300325118665602b21e9470c9ce414), and looks

Re: [web2py] Re: Is there a working bootstrap3 formstyle for auth?

2015-06-01 Thread Richard Penman
? On Tuesday, May 26, 2015 at 3:59:38 PM UTC+2, Richard Penman wrote: I wasn't using the scaffolding app, just setting the formstyle and then checking the user login/register forms. On Sat, May 23, 2015 at 2:58 AM, Niphlod nip...@gmail.com wrote: uhm. could you point out what

Re: [web2py] Re: get rid of 'verify password' in register?

2015-05-22 Thread Richard Penman
Because the first examples used a different attribute: auth.settings.login_verify_password = False On Saturday, August 25, 2012 at 9:56:33 PM UTC+8, Alec Taylor wrote: Hmm, that worked this time... not sure what happened last-time. Maybe I had put the code in the wrong section of the file?

[web2py] Is there a working bootstrap3 formstyle for auth?

2015-05-22 Thread Richard Penman
Hello, Is there a working boostrap3 formstyle for auth? I tried: auth.settings.formstyle = 'bootstrap3' auth.settings.formstyle = SQLFORM.formstyles.bootstrap3_stacked auth.settings.formstyle = SQLFORM.formstyles.bootstrap3_inline All of these added bootstrap3 to the form but some parts were

[web2py] Re: Is there a working bootstrap3 formstyle for auth?

2015-05-22 Thread Richard Penman
well, here is a temporary workaround: auth.settings.remember_me_form = False auth.settings.register_verify_password = False On Friday, May 22, 2015 at 3:34:03 PM UTC+8, Richard Penman wrote: Hello, Is there a working boostrap3 formstyle for auth? I tried: auth.settings.formstyle

[web2py] Documentation to create a custom widget

2015-01-16 Thread Richard Penman
Hello, is there documentation about how to create a custom widget? The autocomplete example in the book is quite limited: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Widgets Basically I want to create a custom CAPTCHA for my form. Looking at the existing Recaptcha class I

[web2py] webfaction nginx uwsgi install

2015-01-11 Thread Richard Penman
Hello, I used the recipe here for installing web2py on webfaction with nginx and uwsgi: https://community.webfaction.com/questions/7193/install-web2py-with-nginx-and-uwsgi It worked great for me before but now have some problems. I copied uwsgihandler.py from handlers/ directory but get this

[web2py] Why is the default form enctype multipart/form-data?

2015-01-11 Thread Richard Penman
Hello, I noticed the encoding type for all forms is multipart/form-data rather than application/x-www-form-urlencoded. Is there a reason for this? My understanding is the form-data encoding is useful for file uploads and when transferring large amounts of non-alphanumeric data, but otherwise

[web2py] Re: Login to web2py from external script

2015-01-11 Thread Richard Penman
at 3:32:31 PM UTC+8, Richard Penman wrote: Do you happen to have made a script that can login to web2py? It looks quite complex because have to manage the _formkey and login form uses multipart/form-data instead of application/x-www-form-urlencoded. I have this working solution using

[web2py] Login to web2py from external script

2015-01-10 Thread Richard Penman
Do you happen to have made a script that can login to web2py? It looks quite complex because have to manage the _formkey and login form uses multipart/form-data instead of application/x-www-form-urlencoded. I have this working solution using mechanize: br = mechanize.Browser()

[web2py] How to call rows format?

2014-08-28 Thread Richard Penman
Hello, my database table defines 'format' - what is the proper way to use this in a view? Currently I have been using what I found in internals of SQLFORM: db.tablename._format(record) Richard -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Setting default app on GAE

2014-08-28 Thread Richard Penman
Hello, how is the default app set on GAE? In routes.py I have default_application = 'places' but still redirects to welcome. app.yaml states: # Warning! Static mapping - below - isn't compatible with # the parametric router's language logic. # You cannot use them together. I have

[web2py] Re: concurrency, web2py, and GAE

2014-08-27 Thread Richard Penman
Was this threading problem resolved? On Saturday, August 18, 2012 7:15:37 AM UTC+2, Massimo Di Pierro wrote: I am pretty sure web2py does not put those variables in global namespace but there is some extra logic for GAE that was written with some stronger assumptions. Will take a look.

[web2py] Re: Can't get web2py working with GAE locally

2014-08-27 Thread Richard Penman
Would be worth mentioning this in the book. On Saturday, January 4, 2014 3:25:17 AM UTC+1, Massimo Di Pierro wrote: It is in handlers/gaehandler.py There reason we moved is that we do now want to pollute the main folder and we do now want to overwrote any changes you may have to make to it

[web2py] Re: Hi, Is there a way to block ip address if there are more no of requests from the same ip address

2014-08-26 Thread Richard Penman
Try putting something like this in your controller to detect and ban IP addresses that download too fast: # block malicious crawlers that download too fast BAN_IP_TIME = 60

[web2py] Re: How can Web2py prevent web scraping?

2014-08-26 Thread Richard Penman
I created a simpler system just counting requests and then blocking when exceeded maximum in a time frame: http://www.web2pyslices.com/slice/show/1991/block-fast-bots On Friday, May 10, 2013 1:36:22 AM UTC+2, Derek wrote: I've read an idea about using a 'ticket' system... each session gets X

[web2py] Cherokee setup

2013-01-14 Thread Richard Penman
I usually use nginx / uwsgi but just tried comparing the cherokee setup. The admin has changed quite a lot since the book was written. For running admin the web2py book has this: sudo nohup cherokee-admin However this will block displaying the admin login password, so need this instead: sudo

[web2py] Fatal Python error: Couldn't create autoTLSkey mapping

2013-01-14 Thread Richard Penman
hello, I set up a uwsgi / nginx server using the setup-web2py-nginx-uwsgi-ubuntu.sh script. However I find when the app tries to start a sub-process I get this error: Fatal Python error: Couldn't create autoTLSkey mapping I read around and apparently this can happen when lack of memory. Do

[web2py] RuntimeError: table appears corrupted

2012-12-28 Thread Richard Penman
I have had an app running for a few months and recently could not connect to (nginx) server. Then after restart got this error: RuntimeError: table appears corrupted If I add migrate=False,fake_migrate=True to DAL then app works. But when remove this error returns. Any idea what is going

Re: [web2py] Re: web3py?

2012-12-01 Thread Richard Penman
Interesting development. This seems to address the common criticisms of web2py, which aren't an issue for me but surely deter others. On Friday, November 30, 2012 3:51:20 AM UTC+11, LightDot wrote: Some valid and interesting questions can get unanswered, slip below the radar, that's bound

[web2py] Re: Importing installed modules

2012-11-15 Thread Richard Penman
-linux-i686.egg') It will make the path longer at every http request. If MCryption is pip installed. web2py should just see it. On Wednesday, 14 November 2012 22:28:30 UTC-6, Richard Penman wrote: I installed a module with pip to: /home/www/lib/python2.6/M2Crypto-0.21.1-py2.6-linux-i686.egg

[web2py] Migrating with postgres

2012-11-14 Thread Richard Penman
Having trouble migrating with postgres. With fake_migrate=True the the .table files are created. If migrate=True then error: auth_user already exists. Tried all combinations of these and deleting and removing .table files, but no joy. Is web2py meant to support modify the tables with

[web2py] Importing installed modules

2012-11-14 Thread Richard Penman
I installed a module with pip to: /home/www/lib/python2.6/M2Crypto-0.21.1-py2.6-linux-i686.egg When using python directly I can import this module. How should I help web2py find this? For now I have this in my model: import sys

[web2py] Re: How to create long running tasks?

2012-11-01 Thread Richard Penman
processes - or is there a better way? On Thursday, November 1, 2012 3:45:28 PM UTC+11, Massimo Di Pierro wrote: Please use the scheduler. On Wednesday, 31 October 2012 21:56:47 UTC-5, Richard Penman wrote: Hello, I create a new process after each form submission to parse some data

[web2py] How to create long running tasks?

2012-10-31 Thread Richard Penman
Hello, I create a new process after each form submission to parse some data: subprocess.Popen(['python', parser_script], cwd=os.path.dirname(parser_script)) (The parser_script is independent of web2py) This parsing can take days and multiple parsers need to be executed at once. However if the

[web2py] Re: Twitter Bootstrap scatfolding application *updated.

2012-10-30 Thread Richard Penman
Is there a more minimal bootstrap based app available? This one is great but relies on dozens of module functions. On Friday, August 24, 2012 4:48:03 AM UTC+10, Martin.Mulone wrote: Twitter Bootstrap scatfolding application *updated. Now is awesome :-P * Now based on version 2.1.0 (sync)

[web2py] Server file dialog

2012-10-30 Thread Richard Penman
Is there an existing app / plugin that supports selecting a file from the server? Specifically I want to select a filepath from the /static/ directory and sub-directories. Richard --

[web2py] digital data store

2012-07-26 Thread Richard Penman
Hello, I made this web2py app for selling digital data via PayPal: http://sitescraper.net/data Would appreciate feedback. If you are interested it is hosted on webfaction with nginx for the static content and uwsgi for web2py. Blog was generated with jekyll. If there is enough interest I can

[web2py] auth for entire controller

2012-07-25 Thread Richard Penman
How can I apply auth control to an entire controller rather than decorators for each function? http://web2py.com/books/default/chapter/29/9#Authorization --

[web2py] Re: auth for entire controller

2012-07-25 Thread Richard Penman
I mean is there a better way than something like: if not auth.has_membership('admin'): session.flash = 'You are not part of the admin group' redirect(URL(r=request, c='default', f='index')) --

[web2py] Re: New HackerNews discussion about python frameworks - web2py is not getting enough love

2012-03-28 Thread Richard Penman
yes quite hostile: the smartest web hackers I know universally regard web2py as a fundamentally incorrect way to approach web developmentā€”but usually say so in far more colorful terms. web2py appears both bad and unpopular to me

[web2py] import_from_csv_file broken

2012-02-15 Thread Richard Penman
I exported a table from sqlite with: open(filename, 'w').write(str(db(db.category.id).select())) Output file looks as expected. And then I tried importing into postgres with: db.category.import_from_csv_file(filename) Each row was inserted but all values are NULL. Any ideas? Version 1.99.4

[web2py] embedding web2py forms in static websites

2012-02-13 Thread Richard Penman
I want to embed web2py forms in a static website (same domain) and keep the static part as simple as possible. Currently I have this in the static website: div id=form/div script type=text/javascript$(#form).load(path/to/web2py/app);/script And this in the web2py app: def email(): script

[web2py] nginx/uwsgi setup script for webfaction

2012-02-09 Thread Richard Penman
someone created a nice script for setting up web2py with nginx and uwsgi on webfaction: http://community.webfaction.com/questions/7193/install-web2py-with-nginx-and-uwsgi Works well. Hopefully gets officially supported by webfaction.