[web2py] Re: development server slow

2013-11-09 Thread Annet
I think I have a similar problem. I installed web2py 2.7.4 using Webfaction's install script. After I cleared my browser's cache, the first request for init/default/index loads fast the second request loads slow. When I clear the browser cache again the first request is fast again. Kind

[web2py] Re: Problem getting auth.wiki('slug', env=dict(mytest=...)) to work in a view?

2013-11-09 Thread Alan Etkin
After further experimentation, it seems the default is for the wiki page to get processed once when you submit it after editing. Further auth.wiki calls on that slug just retrieve the computed html, they do not do processing, hence the env argument is ignored. Do you think this is a bug

[web2py] Re: development server slow

2013-11-09 Thread Niphlod
@Annet: webfaction uses its own servers to run python apps (either apache or nginx). It has nothing to do with the development webserver that you start on your local computer with, e.g., web2py -a yourpassword @vinicius: did you try loading static files with e.g. curl to see if it's a browser

[web2py] Re: Improving database performance

2013-11-09 Thread Niphlod
BTW, this post is shady. Just connecting to a database holding 100K records or 2M takes the exact same amount of time. Of course fetching and representing on a page 10 records or 2M makes a difference, but it has nothing to do with web2py's (optional) optimizations. -- Resources: -

[web2py] Re: AD LDAP Auth without creating Auth tables

2013-11-09 Thread Niphlod
web2py definitely needs the auth tables to work with any auth backend (even LDAP). Of course username and pwd are stored in AD, but AD doesn't have, e.g, the user id. web2py uses auth_* tables for dealing with RBAC, and even if you don't need granular permissions, groups etc, it still has to

Re: [web2py] Scheduler - a second try

2013-11-09 Thread Niphlod
On my not-so-limited experience with SQLite and multiprocessing, I found out that it's a real PITA even with WAL enabled. If you turn on DEBUG logging, the amount of lines logged is going to block operations just for logging sake, so I'd definitely not recommend SQLite as a logging backend for

Re: [web2py] Re: Improving database performance

2013-11-09 Thread Jim Steil
Hoping he will pay some code so we can see where the problem is... Jim On Nov 9, 2013 6:55 AM, Niphlod niph...@gmail.com wrote: BTW, this post is shady. Just connecting to a database holding 100K records or 2M takes the exact same amount of time. Of course fetching and representing on a page

[web2py] Form fields in DB showing a 0 value

2013-11-09 Thread raferbop
db.define_table( 'route', Field('city'), Field('country_iso')) db.define_table( 'order_bus', Field('depart_from', db.route), Field('arrive_to', db.route), Field('date', 'date'), Field('time', db.depature_times), # drop-down select time options

[web2py] web2py Components for layout.html and other HTML pages [ not derived from layout.html]

2013-11-09 Thread JoeCodeswell
Dear web2py Forum, Often i find myself making View pages that are NOT derived from layout.html and yet wanting to include *some *aspects of its capabilities. I thought the web2py Component concept might help to deliver a modular approach. My initial thoughts would be to pair small CSS files

[web2py] Re: web2py Components for layout.html and other HTML pages [ not derived from layout.html]

2013-11-09 Thread Anthony
You can also build a layout by using {{include 'some_fragment.html'}} as well as template blockshttp://web2py.com/books/default/chapter/29/05/the-views#Blocks-in-views. You could have a basic layout that defines several (possibly empty) blocks, and then have various additional layouts that

[web2py] Re: Form fields in DB showing a 0 value

2013-11-09 Thread 黄祥
please use format as record representation or set it on IS_IN_DB form validation. e.g. if you want to show city as a drop down menu in order_bus form : db.define_table( 'route', Field('city'), Field('country_iso'), format = '%(city)s') db.order_bus.depart_from.requires = IS_IN_DB(db,

[web2py] Problems with migration to Postgres

2013-11-09 Thread Malte Krüger
After i have been trying to fix this for myself for some time now i think i have to post this. Here maybe someone can help me. I have a an Application that works perfectly with SQLite on my local machine and on the server. Now i am trying to switch to postgres for further testing. I am using a

[web2py] Re: how to launch scheduler for a conditional model?

2013-11-09 Thread eyeteajay
OK thanks. I have 2 databases, a main db for the actual, prepared website content, and an administrator db, that holds the status for some unprepared, late-night data mining. I wanted to use the scheduler to run unsupervised tasks only on the administrator db. A final task would prepare some

[web2py] Re: Form fields in DB showing a 0 value

2013-11-09 Thread raferbop
Stifan,Winvalid literal for long() with base 10: 'Montego Bay' On Saturday, November 9, 2013 4:03:15 PM UTC-5, 黄祥 wrote: please use format as record representation or set it on IS_IN_DB form validation. e.g. if you want to show city as a drop down menu in order_bus form : db.define_table(

[web2py] Re: Problems with migration to Postgres

2013-11-09 Thread Niphlod
check databases/sql.log for additional details of what web2py did and wants to do. AFAIK web2py defines tables strictly in the order in which they are defined in the model file. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Form fields in DB showing a 0 value

2013-11-09 Thread 黄祥
oopss, sorry didn't notice that you are using SQLFORM.widgets.autocomplete, yes, it should. basically the reference type of field is refer to primary key of the table which is 'id' field, please use it as reference base and then please use record representation (format) to show it in html form

Re: [web2py] Re: development server slow

2013-11-09 Thread Vinicius Assef
On Sat, Nov 9, 2013 at 10:52 AM, Niphlod niph...@gmail.com wrote: @vinicius: did you try loading static files with e.g. curl to see if it's a browser culprit or rocket's (default webserver in web2py) fault ? Good point, Simone. As this is an intermittent problem, I'll try working in a

[web2py] Re: AD LDAP Auth without creating Auth tables

2013-11-09 Thread GregD
Niphlod, Thanks for the response. I understand it better now. web2py generates this message DatabaseError: ('Error while executing SQL statement:\n- SQLCODE: -607\n- unsuccessful metadata update\n- Column: ID not defined as NOT NULL - cannot be used in PRIMARY KEY constraint definition',

[web2py] Best practice when making downloads more private.

2013-11-09 Thread Encompass solutions
I need a way to make downloads private/one time for the user. What is the best practice for this? * Should I need a special download script? My guess is yes. * Should I have a special directory and how would I best do that? * Is there a way to create one time downloads without authentication?