[web2py] Re: how to iterate efficiently (memory-wise) through a huge DAL query

2011-07-22 Thread Luis Goncalves
Thanks, Vineet! Lot's of good info there! I don't have actual code yet, because I couldn't even get the db queries to work in a reasonable amount of time. The little code I showed in my initial post already runs slow ( my DB records are db.itemEntry, not db.table ...). The slowness (so far)

[web2py] Re: how to iterate efficiently (memory-wise) through a huge DAL query

2011-07-22 Thread Luis Goncalves
Thanks, Massimo! Even if I grab 1000 at a time (which is definitely better to do!!), I still have to wait for minutes before I get rows back! However, I have found that this is 'fast' : n = db.table.count() # not sure if that's the syntax, but somehow find out how many records in table for i

[web2py] Re: SQLFORM with divs or ordered lists instead of tables (for easier control with CSS)

2011-07-22 Thread Anthony
What's wrong with this method - http://web2py.com/book/default/chapter/07#Custom-forms - you can put the form widgets wherever you want? Or specifically, how would "better/smarter/proper use of the #id table-field entries" help? What would you like to see in the rendered form HTML that would en

[web2py] Re: SQLFORM with divs or ordered lists instead of tables (for easier control with CSS)

2011-07-22 Thread Luis Goncalves
Yes ... too many :( Here's a 'simple' one: The database table definition, which I use as a form for input: db.define_table('scorecard', Field('offense1', db.player, requires=IS_IN_DB( db, 'player.id', '%(name)s', zero=T('choose one')) ), Field('defense1', db.player, requires=I

[web2py] Re: how to iterate efficiently (memory-wise) through a huge DAL query

2011-07-22 Thread Massimo Di Pierro
You never want to do this: n = q.count() s = db(q) for i in range(1,n): r = s.select( limitby=(i,1)).first() # do something with r instead you consider something like this: i, m = 0, 1000 while True: rows = db(q).select(limitby=(i*m,(i+1)*m)) for r in rows: # do something with r

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread Anthony
On Friday, July 22, 2011 10:35:28 PM UTC-4, Ross Peoples wrote: > > I hope Massimo accepts my mobile browser detection patch so that I can > attach the new welcome application that supports this new desktop/mobile > dual mode. I'd certainly like a few testers before I submit a formal patch > wi

[web2py] Re: The web2py grid/crud plugin you've always dreamed about!

2011-07-22 Thread Massimo Di Pierro
+1 should this be included in web2py/contrib? On Jul 22, 5:35 pm, Bruno Rocha wrote: > Hi, > > I present you PowerGrid Plugin (now in beta 0.1) > [http://labs.blouweb.com/PowerGrid/] > > What is it? > > A plugin to show, manage and paginate data > It works with paginated JSON callbacks, you can

[web2py] Re: how to iterate efficiently (memory-wise) through a huge DAL query

2011-07-22 Thread Vineet
Luis, The problem of churning huge data can be tackled very well in Python. The task can be very slow if we use wrong methods; at the same time, it can be amazingly fast by using the correct mix of methods in Python. (e.g. 'for' loops cause a large overhead). I have gone through the same situation

[web2py] Re: The web2py grid/crud plugin you've always dreamed about!

2011-07-22 Thread tomt
Hi, Your latest plugin looks great and I am eager to learn more about it. However, I got some errors when I installed web2py.app.PowerGrid.w2p and tried to run it: Traceback (most recent call last): File "/home/xa21/workspace/web2py/gluon/restricted.py", line 192, in restricted exec ccode

[web2py] Re: SQLFORM with divs or ordered lists instead of tables (for easier control with CSS)

2011-07-22 Thread Anthony
On Friday, July 22, 2011 10:29:25 PM UTC-4, Luis Goncalves wrote: > > Thanks! Also, I think we need to make better/smarter/proper use of the > #id table-field entries of each field! > Do you have an example? Anthony

[web2py] how to iterate efficiently (memory-wise) through a huge DAL query

2011-07-22 Thread Luis Goncalves
I am trying to use web2py's DAL for a project that is not a webapp. I have a database with about 8M entries, and I want to process the data. Suppose I create a query that returns a lot of results: extreme case example: q = db.table.id>0 How do I iterate through all the results of a large quer

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread Ross Peoples
After some hacking on the welcome application, I have finally got this working! I attached a screenshot of a "/default/test" function I created. That URL uses the "test.html" view when viewed on the desktop browser, and the same URL uses the "test.mobile.html" view when viewed using the iPhone

[web2py] Re: autofilling (redefining?) a Field value

2011-07-22 Thread mart
Thanks guys for the replies! :) so, I was looking to have a field updated while the form was being filled out, which didn't work very well ;) . So I went for the more obvious solution... i put it in the view :) http://{0}/blueLite/default/ index.html'.format(build.buildServer)}}>{{=build.buildSer

[web2py] Re: SQLFORM with divs or ordered lists instead of tables (for easier control with CSS)

2011-07-22 Thread Luis Goncalves
Thanks! Also, I think we need to make better/smarter/proper use of the #id table-field entries of each field!

[web2py] Re: SQLFORM with divs or ordered lists instead of tables (for easier control with CSS)

2011-07-22 Thread Anthony
Also, if you need more control, see http://web2py.com/book/default/chapter/07#Custom-forms. On Friday, July 22, 2011 9:59:24 PM UTC-4, Luis Goncalves wrote: > Thanks, Anthony! > > I still haven't figured it out completely (mostly because I don't know very > much about CSS and someone else is

[web2py] Re: SQLFORM with divs or ordered lists instead of tables (for easier control with CSS)

2011-07-22 Thread Luis Goncalves
Thanks, Anthony! I still haven't figured it out completely (mostly because I don't know very much about CSS and someone else is dealing with that part of the project). Thanks! Luis.

[web2py] Re: GAE users - SDK upgrade breaks your test database

2011-07-22 Thread howesc
i was wrong, the above does not quite work. but our friends from the app engine team have told us: Another way to deal with it is to use the --default_partition="" flag rather than using an older version of the sdk. http://code.google.com/appengine/forum/?place=topic%2Fgoogle-appengine%2FkJGP

[web2py] Web2py talk proposal - Codebits 2011

2011-07-22 Thread blackthorne
Hi, just submitted a talk proposal on web2py for the Codebits 2011 event yield in Lisbon, Portugal (November). I invite you to support me with your votes at and join me if you're close by: http://codebits.eu/intra/s/proposal/152 So, don't forget to put your thumbs up to my talk proposal and hope

Re: [web2py] The web2py grid/crud plugin you've always dreamed about!

2011-07-22 Thread Furqan Rauf
looks sweet On Fri, Jul 22, 2011 at 6:23 PM, Lucas D'Avila wrote: > Parabéns Bruno, muito bom! > pretendo usa-lo nos próximos projetos. > > 2011/7/22 Bruno Rocha > >> Hi, >> >> I present you PowerGrid Plugin (now in beta 0.1) [ >> http://labs.blouweb.com/PowerGrid/] >> >> What is it? >> >> A pl

Re: [web2py] New to programming question

2011-07-22 Thread DanB
Martin, Thanks so much for the quick response! That makes a few things a lot more clear, thank you. I really like a lot of the things the InstantPress does, and as I'm a rather novice programmer, I thought I would work through your example to learn more, and maybe build some things I've got in

Re: [web2py] The web2py grid/crud plugin you've always dreamed about!

2011-07-22 Thread Lucas D'Avila
Parabéns Bruno, muito bom! pretendo usa-lo nos próximos projetos. 2011/7/22 Bruno Rocha > Hi, > > I present you PowerGrid Plugin (now in beta 0.1) [ > http://labs.blouweb.com/PowerGrid/] > > What is it? > > A plugin to show, manage and paginate data > It works with paginated JSON callbacks, you

Re: [web2py] New to programming question

2011-07-22 Thread Martín Mulone
Web2py execute the models in alphabetical order, some people put number before the name of the model ex: 0config.py , I put underscore ex: _config.py. There are no other reason, is not a python thing . Web2py have many changes since instant press was written some things can be rewrite in different

Re: [web2py] Re: Just started web development

2011-07-22 Thread Furqan Rauf
Sure, I would love to do it. Thanks On Fri, Jul 22, 2011 at 4:39 PM, cjrh wrote: > On Friday, 22 July 2011 23:02:28 UTC+2, Furqan wrote: >> >> Also I want to help develop and enrich the web2py framework so feel free >> to throw some task at me, I am a newbie programmer but willing to learn. >> >

[web2py] The web2py grid/crud plugin you've always dreamed about!

2011-07-22 Thread Bruno Rocha
Hi, I present you PowerGrid Plugin (now in beta 0.1) [ http://labs.blouweb.com/PowerGrid/] What is it? A plugin to show, manage and paginate data It works with paginated JSON callbacks, you can use web2py DAL's Query or Table, or you can create your own callback returning the desired JSON or JSO

[web2py] New to programming question

2011-07-22 Thread DanB
I've working with web2py for a little while now (loving it!), and been poking through a few appliances, especially Instant Press!) to puzzle out how things work. This is probably a basic Python question, or maybe it's something about web2py, so here goes. I noticed that in instant Press, the appl

Re: [web2py] autofilling (redefining?) a Field value

2011-07-22 Thread Bruno Rocha
this -> ? http://www.web2pyslices.com/slices/take_slice/85 On Fri, Jul 22, 2011 at 12:56 PM, mart wrote: > Hi, > > I would like to have a table field 'autofill' a value based on another > field's choice. I would like to have a link displayed depending on the > user's server name choice. somethin

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread Ross Peoples
The changes are all over the place right now. I was hoping to release these as a series of patches to make later testing easier. I submitted the mobile detection already as issue 346. All of the changes since have been to the welcome application, since layout selection is a per app thing. Assum

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread pbreit
Ah, I see. That could be interesting. Possible to upload the changes as patches so we could isolate the differences?

[web2py] Re: autofilling (redefining?) a Field value

2011-07-22 Thread pbreit
I'm not sure I totally understand. Wouldn't you need to do this with JavaScript?

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread Ross Peoples
It is difficult to make the same views and everything work on small and large screens. The solution I am proposing is a separate layout for mobile devices based on plugin_jqmobile. Views would use .html versions of the views unless overridden by a .mobile view. This way, simple views don't need

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread pbreit
This came out recently: http://www.getskeleton.com It seems to me pretty difficult to make one web app work well on both large and small screens.

Re: [web2py] Re: Just started web development

2011-07-22 Thread cjrh
On Friday, 22 July 2011 23:02:28 UTC+2, Furqan wrote: > > Also I want to help develop and enrich the web2py framework so feel free to > throw some task at me, I am a newbie programmer but willing to learn. > Excellent. This places you in a good position to evaluate whether the documentation (we

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread Ross Peoples
I have already submitted a patch to address device detection. It's very simple and uses the user agent string. It may not be the most elegant way to do detection, but it works and it's really fast. I tested the detection using an iPhone and an iPad, but I don't have any other devices to test wit

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread howesc
it's been years since i last was doing device detection, but i used the WURFL: http://wurfl.sourceforge.net/

Re: [web2py] Re: Just started web development

2011-07-22 Thread Furqan Rauf
I do have questions but right now I am going through lot of work related work and other businesses so once I get back to development of my app I will make sure to research before bugging you guys, Also I want to help develop and enrich the web2py framework so feel free to throw some task at me, I a

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread Chris May
Hey Ross, thanks for starting this discussion. And what a timely discussion, considering today's Smashing Magazine article is a roundup of Responsive Design (RD) patterns. (www.smashingmagazine.com) (For those unfamiliar with RD, also check out A List Apart for a great intro: http://www.alistapart

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread Anthony
+1 On Friday, July 22, 2011 3:14:02 PM UTC-4, Ross Peoples wrote: > As mobile devices get more popular, it is important for many sites and apps > to provide both a regular (desktop) site and a mobile site. It is currently > difficult to accomplish this with web2py. Plugin jqmobile is great for

[web2py] Re: DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread Ross Peoples
If this functionality is desired, then consider the mentioned patch to be the first of many to come: http://code.google.com/p/web2py/issues/detail?id=346

[web2py] Re: Just started web development

2011-07-22 Thread Ross Peoples
Welcome to web2py. Let us know if you need help. Just be sure you check the book first before asking questions, as it is a really good resource and answers the most common questions.

[web2py] GAE users - SDK upgrade breaks your test database

2011-07-22 Thread howesc
Hi all, if you are using GAE and upgrade to yesterday's release of the SDK you will find that all your data has disappeared! where oh where did it go? well, someone at google had the bright idea to change your appname when running in the development server to dev~. this means that the datast

[web2py] DISCUSSION: Dual Desktop/Mobile Functionality

2011-07-22 Thread Ross Peoples
As mobile devices get more popular, it is important for many sites and apps to provide both a regular (desktop) site and a mobile site. It is currently difficult to accomplish this with web2py. Plugin jqmobile is great for mobile devices, but doesn't really work for regular web browsers. I am d

[web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-22 Thread Tiago Moutinho
How can i enable the spooler? I have pass target='spooler' to the decorator args but it gives the same error. On Jul 22, 7:44 pm, Tiago Moutinho wrote: > I'M sorry Roberto for this boring question, but it gives an error in > web2py when i try to run the controller, and i don't know ao to solve

[web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-22 Thread Tiago Moutinho
I'M sorry Roberto for this boring question, but it gives an error in web2py when i try to run the controller, and i don't know ao to solve this. Exception: you have to enable the uWSGI spooler to use the @spool decorator Thks in advance On Jul 22, 5:39 pm, "Roberto De Ioris" wrote: > > I using

Re: [web2py] Re: blob attach field issue with 1.97.1

2011-07-22 Thread Richard Vézina
Look for... Richard On Fri, Jul 22, 2011 at 12:03 PM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Can't reproduce the problem in a simple app... Look like it come from my > update function code... What should I like for? > > Thanks > > Richard > > > On Fri, Jul 22, 2011 at 10:21 AM, R

[web2py] Re: jquery mobile switch in view

2011-07-22 Thread Ross Peoples
I have been pondering this for quite a while, and the only way I can think of doing this, while retaining the bytecompile option is to wrap the layout.html file in a if/then statement, and checking for mobile browsers in a model somewhere. So your model would have a variable called is_mobile th

[web2py] viewing a uploaded video

2011-07-22 Thread hasan alnator
Hello , am trying to view an uploaded video using the mediaplayer in the plugin wiki but i dont know why its not playing anything out of the static folder :: {{=plugin_wiki.widget('mediaplayer',src='/SQLFORMS_AND_UPLOAD/uploads/ person.image. 94758e04f2f20187.4a7175657279202d20416a6178205475746f

Re: [web2py] Re: Admin is disabled because insecure channel

2011-07-22 Thread Ross Peoples
The web2py server can only run on one port at a time and you cannot run a secure and a non-secure site from the same port. So you have to run two instances of the web2py server, one using ssl certs, and the other without.

[web2py] Re: No CallBack (Onaccept) When using facebook or Twitter Connect for loging.

2011-07-22 Thread howesc
this is a kinda nasty little bugger. the facebook published way is to call FB.logout() (assuming you are using the javascript FB API) after you call the web2py logout function: var SM = { 'facebookLogout' : function () { FB.logout(function(response) { $(location).attr('href', '/auth

Re: [web2py] Re: database replication

2011-07-22 Thread Anthony
Just changed the book example to use random.sample. Anthony On Friday, July 22, 2011 12:55:46 PM UTC-4, Anthony wrote: > On Friday, July 22, 2011 12:28:24 PM UTC-4, nils wrote: >> >> Hi Anthony, >> >> yes, migrate is set for fields in the aut table. >> >> Also another note, shuffle did not

[web2py] Re: virtual fields multiple execution

2011-07-22 Thread Massimo Di Pierro
Yes your patch looks right and a major speedup. The pre-patch code should be considered buggy because it was evaluating the virtual fields more time necessary. On Jul 22, 11:49 am, howesc wrote: > massimo accepted my patch, so i guess that validates it. > > thanks!!! > > christian

Re: [web2py] Re: database replication

2011-07-22 Thread Anthony
On Friday, July 22, 2011 12:28:24 PM UTC-4, nils wrote: > > Hi Anthony, > > yes, migrate is set for fields in the aut table. > > Also another note, shuffle did not work for me I have to, from random > import sample. > then change > DAL(sample(['mysql connection string','mysql connection > strin

[web2py] Re: virtual fields multiple execution

2011-07-22 Thread howesc
massimo accepted my patch, so i guess that validates it. thanks!!! christian

Re: [web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-22 Thread Roberto De Ioris
> I using 0.9.8.1. > How can i update to 0.9.8.2 > > thks in advance pip install uwsgi (or pip install -U uwsgi) Or download the sources from the official site and recompile them. BTW we are getting a bit Off-topic i suppose we can move the discussion to the uWSGI list (or the irc channel) an

[web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-22 Thread Tiago Moutinho
I using 0.9.8.1. How can i update to 0.9.8.2 thks in advance On Jul 22, 10:15 am, Roberto De Ioris wrote: > Il giorno 22/lug/2011, alle ore 11:09, Tiago Moutinho ha scritto: > > > thks Roberto, > > > tiago@tiago:~$ cd /opt/web2py/ > > tiago@tiago:/opt/web2py$ mkdir myspool > > tiago@tiago:/opt/w

Re: [web2py] Re: Admin is disabled because insecure channel

2011-07-22 Thread António Ramos
2 copies one with ssl certificate and another without ssl? why? António 2011/7/22 Massimo Di Pierro > > python web2py.py -h > ... > -p PORT, --port=PORT port of server (8000) > ... > -c SSL_CERTIFICATE, --ssl_certificate=SSL_CERTIFICATE >file that contains ssl cert

Re: [web2py] Re: database replication

2011-07-22 Thread nils
Hi Anthony, yes, migrate is set for fields in the aut table. Also another note, shuffle did not work for me I have to, from random import sample. then change DAL(sample(['mysql connection string','mysql connection string'],1),migrate_enabled=False) Regards, Nils On Fri, Jul 22, 2011 at 4:02 P

[web2py] Re: Admin is disabled because insecure channel

2011-07-22 Thread Massimo Di Pierro
> python web2py.py -h ... -p PORT, --port=PORT port of server (8000) ... -c SSL_CERTIFICATE, --ssl_certificate=SSL_CERTIFICATE file that contains ssl certificate -k SSL_PRIVATE_KEY, --ssl_private_key=SSL_PRIVATE_KEY file that contains ssl priv

[web2py] Re: Can't get linkto working in SQLFORM

2011-07-22 Thread DenesL
Yes, I can reproduce it running web2py 1.97.1 from source on Windows. >>> link=URL('list_records') >>> print link /test/default/list_records >>> form = SQLFORM(db.person,1,linkto=link) >>> print form.element('#dog__owner__row') dog.owner sqlhtml.py line 845 does not seem right on getting db: db

Re: [web2py] Re: blob attach field issue with 1.97.1

2011-07-22 Thread Richard Vézina
Can't reproduce the problem in a simple app... Look like it come from my update function code... What should I like for? Thanks Richard On Fri, Jul 22, 2011 at 10:21 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > I think that web2py determine that the field name has change : > > 467

Re: [web2py] heroku, web2py and gunicorn

2011-07-22 Thread Furqan Rauf
I could do it but I am a newbie, no nothing about the deployment or stress testing On Fri, Jul 22, 2011 at 10:06 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Hello everybody, > > heroku will be supporting web2py. They run gunicorn. web2py runs with > gunicorn but I have never trie

[web2py] autofilling (redefining?) a Field value

2011-07-22 Thread mart
Hi, I would like to have a table field 'autofill' a value based on another field's choice. I would like to have a link displayed depending on the user's server name choice. something like this (but obviously this is wrong ;) ) this is the table definition (the last validation line is the issue):

[web2py] Re: Unable to install application "kpax"

2011-07-22 Thread Massimo Di Pierro
fascinating On Jul 22, 10:36 am, neilrobau2 wrote: > Tried again with tick on Overwrite Installed App - it worked! > > On Jul 22, 11:39 am, neilrobau2 wrote: > > > > > > > > > VERSION says Version 1.97.1 (2011-06-26 19:25:44). Downloaded as > > "Current (for everybody) > > Version 1.97.1 (20

[web2py] Re: Unable to install application "kpax"

2011-07-22 Thread neilrobau2
Tried again with tick on Overwrite Installed App - it worked! On Jul 22, 11:39 am, neilrobau2 wrote: > VERSION says Version 1.97.1 (2011-06-26 19:25:44). Downloaded as > "Current (for everybody) > Version 1.97.1 (2011-06-26 19:25:44)", Windows version. > > On Jul 22, 3:45 am, Massimo Di Pierro >

[web2py] heroku, web2py and gunicorn

2011-07-22 Thread Massimo Di Pierro
Hello everybody, heroku will be supporting web2py. They run gunicorn. web2py runs with gunicorn but I have never tried it. Any volunteer to run some stress tests? cd web2py python anyserver -s gunicorn Massimo

Re: [web2py] Re: database replication

2011-07-22 Thread Anthony
On Friday, July 22, 2011 10:12:01 AM UTC-4, nils wrote: > > Hi Anthony, > > That worked, maybe the docs should be updated. > Indeed. > I did try migrate=False, thought they were both the same thing. > migrate=False (as an argument to DAL) doesn't turn off migrations -- it merely determines the

Re: [web2py] web2py videos on the internet

2011-07-22 Thread Bruno Rocha
I have some (in portuguese) web2py + Ipython ( IDE for what?) http://vimeo.com/26387038 Comet http://vimeo.com/18399381 PowerTable http://vimeo.com/18447603 Uploadify http://vimeo.com/20107460 I am also recording new videos(which will be subtitled) There are more videos from brazilian people

Re: [web2py] Re: blob attach field issue with 1.97.1

2011-07-22 Thread Richard Vézina
I think that web2py determine that the field name has change : 4674. 4675. 4676. 4677. 4678. 4679. 4680. 4681. 4682. 4683. new_fields = [] new_fields_names = [] for name in fields: if not name in self.fields: if name != 'id':

Re: [web2py] Admin is disabled because insecure channel

2011-07-22 Thread António Ramos
can i use https with rocket? how to? thank you António 2011/7/22 Bruno Rocha > Use https or change security checks at your own risk in > applications/admin/models 0.py and access.py. > > > 2011/7/22 António Ramos > >> i´m trying to access my server from another machine. >> >> i started web2py

Re: [web2py] Re: [Newbie] Best practice to set application wide settings

2011-07-22 Thread Bruno Rocha
look at this -> http://martin.tecnodoc.com.ar/default/post/2011/05/13/20_optimize-your-web2py-app-using-the-new-import-method

Re: [web2py] Re: database replication

2011-07-22 Thread nils
Hi Anthony, That worked, maybe the docs should be updated. I did try migrate=False, thought they were both the same thing. Regards, Nils On Fri, Jul 22, 2011 at 3:05 PM, Anthony wrote: > Have all the tables already been created in the slave databases (web2py may > be trying to create tables

[web2py] Re: database replication

2011-07-22 Thread Anthony
Have all the tables already been created in the slave databases (web2py may be trying to create tables or run migrations)? What happens if you do: db = DAL(shuffle(['connection string']), migrate_enabled=False) Anthony On Friday, July 22, 2011 9:28:40 AM UTC-4, Nils Olofsson wrote: > Hi, I

[web2py] Re: jquery mobile switch in view

2011-07-22 Thread Anthony
On Friday, July 22, 2011 4:56:20 AM UTC-4, David Marko wrote: > > The {{extend }} can use variable as parameter so you can, under ome > conditions, compute template name and store it into response object(you can > place such code in model) > e.g. > response.template="layoutjq.html" > > ... and

[web2py] web2py videos on the internet

2011-07-22 Thread António Ramos
Sorry all post lately but its pertinent ( i think... :) all videos that i found in the internet are made by massimo(99,99%). Great videos but i think that with a lot of people using and loving web2py there shoud be videos from other users experience. Maximo could stimulate his students to post

Re: [web2py] Re: blob attach field issue with 1.97.1

2011-07-22 Thread Richard Vézina
Not working... :-( Richard On Fri, Jul 22, 2011 at 9:43 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Can you please try: > > Field('field1','upload',uploadfield='field1_blob'), > > Field('field1_blob','blob',deafult='',writable=False,readable=False), > > this should work even if

[web2py] Re: blob attach field issue with 1.97.1

2011-07-22 Thread Massimo Di Pierro
Can you please try: Field('field1','upload',uploadfield='field1_blob'), Field('field1_blob','blob',deafult='',writable=False,readable=False), this should work even if you omit the blob field. On Jul 22, 8:30 am, Richard wrote: > My email won't get into my mail box... And I get no answer... So

[web2py] Re: Web2py Certification Program ?

2011-07-22 Thread Massimo Di Pierro
You are right, I should list the on the web page, I usually teach the depaul course and I use web2py. Massimo On Jul 22, 6:03 am, Miguel Lopes wrote: > There is some private offering, which I think should be listed in web2py.com > : > > * a program at DePaul > University:http://www.cdm.depaul.

[web2py] Re: [Newbie] Best practice to set application wide settings

2011-07-22 Thread David Marko
Look to this web2py utils ... http://packages.python.org/web2py_utils/index.html ... there is an object for storing/accessing configurations values into database. Its very handy ...

[web2py] Re: blogs

2011-07-22 Thread hasan alnator
NO , i dont get any errors but can u show me an example of but using a video in the upload folder thank you .

[web2py] blob attach field issue with 1.97.1

2011-07-22 Thread Richard
My email won't get into my mail box... And I get no answer... So excuse the duplication if you get it twice... Hello, I get errors on update. 2 differents errors are return depending if the file is attach before update or at the update of the form. Model definition field Field('field1','up

[web2py] Re: database replication

2011-07-22 Thread Nils Olofsson
Hi, I did something similar, if "add" in request.function: db = DAL(['mysql://Database connection string']) else: print "Using Slave Database" db = DAL(shuffle(['database connection string']) That would and uses the slave database (readonly) but, I get this error message.

Re: [web2py] [Newbie] Best practice to set application wide settings

2011-07-22 Thread Bruno Rocha
The best practice says that: 1. have the latest web2py version 2. create your classes and custom objects in /modules 3. create in /modules a class to hold your settings properties or use gluon.storage.Storage 4. In models import your modules with your classes and objects (you can use 'current' obj

Re: [web2py] Admin is disabled because insecure channel

2011-07-22 Thread Bruno Rocha
Use https or change security checks at your own risk in applications/admin/models 0.py and access.py. 2011/7/22 António Ramos > i´m trying to access my server from another machine. > > i started web2py with this command line > > c:\web2py\web2py.exe -i 192.168.1.8 > > > How to solve it? > > > >

Re: Re : Re: [web2py] Re: Web2py Powertables plugin : in-line editing problem.

2011-07-22 Thread Bruno Rocha
I will maintain both plugins. (but not so fast to update and solve issues) http://labs.blouweb.com On Fri, Jul 22, 2011 at 8:33 AM, JmiXIII wrote: > Hello , > > > PowerGrid seems pretty nice and usefull, yet powertable fits better my > needs. I've used the details to render other view containin

[web2py] Re: database replication

2011-07-22 Thread Anthony
You could define 'read_only_actions' anywhere it makes sense, for example: read_only_actions = ['list','another_read_action','yet_another_read_action'] if request.function in read_only_actions: db =... ... else db = Of course, if that one 'if' statement is the only place you re

[web2py] Admin is disabled because insecure channel

2011-07-22 Thread António Ramos
i´m trying to access my server from another machine. i started web2py with this command line c:\web2py\web2py.exe -i 192.168.1.8 How to solve it? thank you António

Re: [web2py] blogs

2011-07-22 Thread Kenneth Lundström
Hello, have you read: http://web2py.com/book/default/chapter/07?search=upload#SQLFORM-and-Uploads Do you get any error messages when using the flash plugin? Kenneth hello guys , am trying to build a blogs website but i want to have a video and image upload in every post so its not just tex

Re : Re: [web2py] Re: Web2py Powertables plugin : in-line editing problem.

2011-07-22 Thread JmiXIII
Hello , PowerGrid seems pretty nice and usefull, yet powertable fits better my needs. I've used the details to render other view containing forms and it's Ok for me. Yet is Powergrid intended to replace PowerTable or will you work on both project? That's just to know which plugin to choose for

Re: [web2py] Web2py Certification Program ?

2011-07-22 Thread Miguel Lopes
There is some private offering, which I think should be listed in web2py.com : * a program at DePaul University: http://www.cdm.depaul.edu/ipd/Programs/Pages/WebDevelopmentwithPython.aspx * a program in Brasil: http://www.cursodepython.com.br/ And free courses (structured content, besides the www

[web2py] Re: database replication

2011-07-22 Thread Nils Olofsson
Hi, I'm still not sure as to how to go about using this. Say, I have a controller with the function list: and a function called write: if the function is list then read from slaves, if the function is write, write to master. So the correct code should be: if request.function in read_only_action

[web2py] Re: Simultaneous multi-language system.

2011-07-22 Thread jamarcer
Hello: I have added a comment to the ticket: http://code.google.com/p/web2py/issues/detail?id=342 It is an approach to the issue, based in Anthony's proposal: a class that stores multiple T objects. I am demetrio's companion. We develop the same application, but we have different roles :), so I

[web2py] blogs

2011-07-22 Thread hasan alnator
hello guys , am trying to build a blogs website but i want to have a video and image upload in every post so its not just text but i dont know how to use an uploaded file in the pages and i tryed to use flash video plugin it dosent see any video out of the static folder .. please help me guys

[web2py] Re: Simultaneous multi-language system.

2011-07-22 Thread jamarcer
Hello: I have added a comment to the ticket, explaining an approach to this issue. It is based on Anthony's proposal, as demetrio said :). I am demetrio's companion, so I will test this approach, or others possible solutions. Regards. Link to ticket: http://code.google.com/p/web2py/issues/deta

[web2py] [Newbie] Best practice to set application wide settings

2011-07-22 Thread Jagmal
Hi All, I am new to web2py framework and have been working on a small project to set up authentication. In here, I would like to configure default options. For ex, I would like to disable registration. I am wondering what is a good way to do it. Should I create a model class and put these default

Re: [web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-22 Thread Roberto De Ioris
Il giorno 22/lug/2011, alle ore 11:09, Tiago Moutinho ha scritto: > thks Roberto, > > tiago@tiago:~$ cd /opt/web2py/ > tiago@tiago:/opt/web2py$ mkdir myspool > tiago@tiago:/opt/web2py$ uwsgi --socket :3031 --spooler myspool -- > master --processes 4 --import mytasks --module web2py.wsgihandler >

[web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-22 Thread Tiago Moutinho
thks Roberto, tiago@tiago:~$ cd /opt/web2py/ tiago@tiago:/opt/web2py$ mkdir myspool tiago@tiago:/opt/web2py$ uwsgi --socket :3031 --spooler myspool -- master --processes 4 --import mytasks --module web2py.wsgihandler uwsgi: unrecognized option '--import' On Jul 22, 5:47 am, "Roberto De Ioris" w

Re: [web2py] Web2py Certification Program ?

2011-07-22 Thread Bruno Rocha
I've been working together with Latinux.org to create a web2py/python certification program, but the project is closed (I guess). IMO. We need a web2py foundation first. 2011/7/22 António Ramos > Hello, > > Why not create a web2py certification program? > It would be good for the programmer and

[web2py] Re: jquery mobile switch in view

2011-07-22 Thread David Marko
The {{extend }} can use variable as parameter so you can, under ome conditions, compute template name and store it into response object(you can place such code in model) e.g. response.template="layoutjq.html" ... and in a view use the following: {{extend response.template}}

[web2py] Web2py Certification Program ?

2011-07-22 Thread António Ramos
Hello, Why not create a web2py certification program? It would be good for the programmer and for web2py Thank you António

[web2py] jquery mobile switch in view

2011-07-22 Thread andrej burja
hi is it possible to create a site with a switch like chosing a language (http://vimeo.com/7520812) but instead of language i would like to select which version of a view i woul like to see: desktop or mobile so the first line in i view would be: extend "layout.html" or extend "plugin_jqmobile/l

Re: [web2py] Re: Web2py Powertables plugin : in-line editing problem.

2011-07-22 Thread Bruno Rocha
PowerTable is being rewriten, for lots of improvements and no more dependency on SQLTABLE. By now, in powertable the only out-of-box option for edit is inline editing, or you can load an IFRAME(CRUD) form in details and edit records there. Optionally you can use VirtualFields to append new button

  1   2   >