[web2py] Puzzle: reference table not working?

2012-07-25 Thread lyn2py
I created a brand new app for this. Code: db.define_table('location', Field('city', 'string',length=255,requires=IS_NOT_EMPTY()), Field('state', 'string',length=255,requires=IS_NOT_EMPTY()), Field('country', 'string',length=255,requires=IS_NOT_EMPTY()), ) db.define_table('person',

[web2py] Re: field of type upload exceptions.UnboundLocalError

2012-07-25 Thread Annet
Massimo, It would help if you could help debug as suggested below. As mentioned in issue 906, I did add a print statement at line 1206: elif field.type == 'upload': f = self.vars[fieldname] fd = '%s__delete' % fieldname ... print f

[web2py] digital data store

2012-07-25 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 cl

[web2py] Re: Visit Plugow on FISL13

2012-07-25 Thread Annet
Hi Vinicius, I don't understand Portuguese, but it sounds like a interesting application. I had a look at several ways to generate QRcodes, how do you generate them? How exactly do you interact with them? Kind regards, Annet. --

Re: [web2py] Re: auth for entire controller

2012-07-25 Thread Richard Baron Penman
thanks for tips - yes I did have that inserted in the controller. On Thu, Jul 26, 2012 at 2:01 PM, Anthony wrote: >> The redirect in: >> if not any(has_membership): >> redirect(URL(r=request, c='default', f='index')) >> >> will not break the execution of models? > > > Since the original code

Re: [web2py] Re: how to achieve public/private key authentication for web service in web2py?

2012-07-25 Thread Amit
Thanks Michele,I am going to generate keys using simpatica, I will let you know if i face any problem. Thanks, Amit On Wed, Jul 25, 2012 at 7:01 PM, Michele Comitini < michele.comit...@gmail.com> wrote: > 2012/7/25 Amit : > > Michele, > > > > I have gone through the X509_Auth class and its metho

Re: [web2py] markmin embed:http://... not work trunk version

2012-07-25 Thread Vladyslav Kozlovskyy
Hi, Jose! try 'iframe' instead of 'embed': iframe:http://www.youtube.com/embed/x1w8hKTJ2Co In 1.99.7 embed looks like iframe, and iframe is not used at all (it's a new feature): *>>> markmin2html('embed:http://www.youtube.com/embed/x1w8hKTJ2Co')* 'http://www.youtube.com/embed/x1w8hKTJ2Co";

[web2py] Re: Error using Scheduler with CouchDB

2012-07-25 Thread Ted
Hi Niphlod, Since the usecase for a Scheduler often needs concurrent fast write/reads and updates (from multiple clients) with information that is largely temporary I think a Nosql DB is a great way to handle scheduler data. In my case I don't want the overhead of installing a full relational d

[web2py] JSON output with referencing data

2012-07-25 Thread Jaymin Oh
Hi, I'm Korean Web2py user. I'm returning output of DB select like 'return dict(teams=teams)'. {"teams": [{"status": "active", "updated_by": 1, "tags": [12], "max": 4, "created_by": 1, }]} The above output is my output of 'teams' controller. I have several referencing column, 'tags' and

Re: [web2py] Re: Web2Py on OpenShift

2012-07-25 Thread Andrew Replogle
Updated the issue on github: https://github.com/prelegalwonder/openshift_web2py/issues/3 Will research wsgi spec tomorrow to see if this behavior is expected. --

Re: [web2py] Re: auth for entire controller

2012-07-25 Thread Anthony
> > The redirect in: > if not any(has_membership): > redirect(URL(r=request, c='default', f='index')) > > will not break the execution of models? > Since the original code did not test for the controller, I assumed it was inserted at the top of the controller in question, which would allow a

[web2py] Re: Template security

2012-07-25 Thread Anthony
I see. Interesting problem. I'm not sure there's an easy solution. Of course, if you don't trust the people working on the views, OS calls are not the only way they can implement an attack. Even with a more restricted template system, they could probably leak sensitive app data in hidden divs,

Re: [web2py] BR()

2012-07-25 Thread Bruno Rocha
On Thu, Jul 26, 2012 at 12:39 AM, pbreit wrote: > Wow, you would write that instead of ?? Sometimes the repetition is a variable {{=CAT(*[BR() for i in xrange(*how_many_times*)])}} --

[web2py] Re: Template security

2012-07-25 Thread Babak
I've had clients request that some independent design firm come in and beautify there website. They request access to the views sometimes to re-arrange things. On Wednesday, July 25, 2012 3:45:06 PM UTC-7, Anthony wrote: > > Of course *I* like Python code. But what about giving access to the

[web2py] Re: Question on using legacy tables

2012-07-25 Thread tomt
More good news. I discovered that this fix now allows me to use SQLFORM.grid on legacy tables that don't have an 'id' field! On Wednesday, July 25, 2012 9:10:38 PM UTC-6, tomt wrote: > > I tried the latest trunk, and it solves the problem I described. This is > great and it will make it much ea

Re: [web2py] BR()

2012-07-25 Thread pbreit
Wow, you would write that instead of ?? On Wednesday, July 25, 2012 4:34:38 PM UTC-7, rochacbruno wrote: > > Good idea, very easy, I am used to do this. > > {{=CAT(*[BR() for i in range(5)])}} > > --

Re: [web2py] Re: auth for entire controller

2012-07-25 Thread Bruno Rocha
> > You can do in the way anthony said, but you can do it all in models, no >> need to touch controller code. > > > Note, I did suggest moving it to a model file to avoid unnecessarily > executing all the models. > The redirect in: if not any(has_membership): redirect(URL(r=request, c='default

Re: [web2py] Re: auth for entire controller

2012-07-25 Thread Anthony
> > You can do in the way anthony said, but you can do it all in models, no > need to touch controller code. Note, I did suggest moving it to a model file to avoid unnecessarily executing all the models. Anthony --

[web2py] Re: Question on using legacy tables

2012-07-25 Thread tomt
I tried the latest trunk, and it solves the problem I described. This is great and it will make it much easier for me to interact with my legacy tables. I also have to thank you for the amazingly fast fix!!! Thanks a lot - Tom On Wednesday, July 25, 2012 8:14:14 PM UTC-6, Massimo Di Pierro wrot

[web2py] Re: Question on using legacy tables

2012-07-25 Thread Massimo Di Pierro
There is a solution in trunk. Please give it a try. On Wednesday, 25 July 2012 20:36:07 UTC-5, tomt wrote: > > Hi, > I was using a version of trunk. I downloaded today's version and got the > same error. I opened a ticket as suggested. (Issue 908) > > On Wednesday, July 25, 2012 7:38:47 AM UTC-

[web2py] Re: field of type upload exceptions.UnboundLocalError

2012-07-25 Thread Massimo Di Pierro
It would help if you could help debug as suggested below. Massimo On Tuesday, 24 July 2012 07:00:42 UTC-5, Massimo Di Pierro wrote: > > In gluon/sqlhtml.py there is this logic: > > elif field.type == 'upload': > f = self.vars[fieldname] > fd = '%s__delete' % field

Re: [web2py] Re: auth for entire controller

2012-07-25 Thread Bruno Rocha
You can do in the way anthony said, but you can do it all in models, no need to touch controller code. models/...py auth = Auth() # a dict of controllers as keys, and a list of allowed groups as values auth_rules = { "defau

[web2py] markmin embed:http://... not work trunk version

2012-07-25 Thread Jose
Hi all >From the book: https://web2py.com/books/default/chapter/29/5 The following is not working embed:http://www.youtube.com/embed/x1w8hKTJ2Co show me the url and not the video I'm using the trunk version, in version 1.99.7 works well. José --

[web2py] Re: auth for entire controller

2012-07-25 Thread Anthony
That looks pretty good. If you want to avoid running all your models, you can put that logic early in your models (obviously somewhere after auth is defined): if request.controller == 'secret_stuff' and not auth.has_membership('admin' ): Anthony On Wednesday, July 25, 2012 9:14:31 PM UTC-4, Ri

[web2py] Re: Question on using legacy tables

2012-07-25 Thread tomt
Hi, I was using a version of trunk. I downloaded today's version and got the same error. I opened a ticket as suggested. (Issue 908) On Wednesday, July 25, 2012 7:38:47 AM UTC-6, Massimo Di Pierro wrote: > > Please open a ticket. This can be fixed if not fixed already. Using trunk > or stable?

[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] 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: SQLFORM.grid pagination refresh

2012-07-25 Thread Anthony
:-) On Wednesday, July 25, 2012 8:41:42 PM UTC-4, dave wrote: > > Thank you very much this solved the problem, very nice people around, I > guess im sticking to web2yp for my framework of choice > --

[web2py] Re: SQLFORM.grid pagination refresh

2012-07-25 Thread dave
Thank you very much this solved the problem, very nice people around, I guess im sticking to web2yp for my framework of choice --

Re: [web2py] displacement of password button [web2py twitter bootstrap]

2012-07-25 Thread Simon Ashley
ps: just noticed that the password buttons are different in the last 2 browsers ... On Thursday, 26 July 2012 09:57:49 UTC+10, Simon Ashley wrote: > > Was using the 21/07 truck version. > Downloaded a fresh version this morning to re check and cache cleared. > Displays differently in different

Re: [web2py] displacement of password button [web2py twitter bootstrap]

2012-07-25 Thread Simon Ashley
Was using the 21/07 truck version. Downloaded a fresh version this morning to re check and cache cleared. Displays differently in different browsers. ( - Chrome: issue as mentioned, - Firefox: displayed correctly, - IE9: No welcome message, - Safari: No welcome message ) Cl

[web2py] Re: Select Distinct for more than 1 distinct value

2012-07-25 Thread villas
I have only seen complex queries to solve this. The sql can differ according to the DB. Example for SQL Server: http://archive.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=SelectTopNByGroup Sometimes grabbing more data than you need and then discarding it is quicker and easier than

Re: [web2py] Re: Import CSV in appadmin to update database

2012-07-25 Thread Mark Li
My question title is misleading, what I want to accomplish is using a CSV file, formatted in the manner below, to update both the 'owner' data table and the 'owner-food' relational table. Assuming here I have 3 tables, 'person', 'fav food', and 'owner-food' which is a relational table (many to

Re: [web2py] BR()

2012-07-25 Thread Bruno Rocha
Good idea, very easy, I am used to do this. {{=CAT(*[BR() for i in range(5)])}} --

Re: [web2py] Re: prettydate question

2012-07-25 Thread Massimo Di Pierro
I tried with your language file and I cannot reproduce the problem. BTW, your language file does not seem to have a translation for those strings. On Wednesday, 25 July 2012 15:56:31 UTC-5, Alec Taylor wrote: > > Thanks > > On Thu, Jul 26, 2012 at 6:40 AM, ctrlSoft wrote: > >> >> >> On Wednesday

Re: [web2py] how to use cache decorator within modules?

2012-07-25 Thread Anthony
> > I am ok with renaming lazy_cache (although some people will ask, isn't the > cache lazy already by definition?). We cannot call it current_cache because > it is not current.cache and that would cause confusion. It is a lazy > current.cache. > I was thinking current_cache because it's a dec

[web2py] Re: Template security

2012-07-25 Thread Anthony
> > Of course *I* like Python code. But what about giving access to the > templates/views where we do not want to grant access to the internals of > the server via system calls. ie, > > {{ > import os > os.popen('...') > }} > > Can this be safer? > The templates are run on the server side --

Re: [web2py] Template security

2012-07-25 Thread vinicius...@gmail.com
It will be as safe as you care about it. But, surely it is not a good practice. Even web2py's views having the power to use full python code, you should separate your app in layers. You should place, as far as it is possible, just presentation logic in views. Exceptions happen. And full Python

Re: [web2py] Re: Empty Database value is not None, but an empty string

2012-07-25 Thread Anthony
I find sometimes the admin shell doesn't work as expected, particularly for db related operations. Anthony On Wednesday, July 25, 2012 6:34:49 PM UTC-4, Mark Li wrote: > > Massimo I tried your example and it worked! I was using the web2py web > shell from the admin interface before, but using t

Re: [web2py] Re: Empty Database value is not None, but an empty string

2012-07-25 Thread Mark Li
Massimo I tried your example and it worked! I was using the web2py web shell from the admin interface before, but using the interactive console shell through cygwin worked. Thanks to you, Anthony, and viniciusban for helping out. On Wednesday, July 25, 2012 2:51:01 PM UTC-7, Massimo Di Pierr

[web2py] Template security

2012-07-25 Thread Babak
Of course *I* like Python code. But what about giving access to the templates/views where we do not want to grant access to the internals of the server via system calls. ie, {{ import os os.popen('...') }} Can this be safer? --

[web2py] Re: Left outer join in a compex select

2012-07-25 Thread Massimo Di Pierro
About the first problem: you can do: linked_cards == db.userCard.with_alias('linked_cards') groupCards = db().select(db.userCard.ALL,linked_cards.ALL left= linked_cards.on((linked_cards.card_id ==db.card.id))) I do not have a simple solution to the second problem. Let me think about it

Re: [web2py] how to use cache decorator within modules?

2012-07-25 Thread Massimo Di Pierro
I renamed lazy_cache and I added a docstring. On Wednesday, 25 July 2012 16:41:57 UTC-5, Anthony wrote: > > I'm sure technically there's some double laziness going on, but from an > API standpoint, maybe it would be sufficient to just include one "lazy" in > the name. :-) Another option might b

Re: [web2py] Re: Visit Plugow on FISL13

2012-07-25 Thread Massimo Di Pierro
Nice. Look forward to meet you there. On Wednesday, 25 July 2012 16:43:37 UTC-5, viniciusban wrote: > > Sure, Massimo. > > You go to http://labs.agenciax4.com.br/fisl13 , log in with your twitter > or fb and get a QRCode. > After that, you head to our totem, show your qrcode (what identifies yo

Re: [web2py] how to use cache decorator within modules?

2012-07-25 Thread Massimo Di Pierro
I am ok with renaming lazy_cache (although some people will ask, isn't the cache lazy already by definition?). We cannot call it current_cache because it is not current.cache and that would cause confusion. It is a lazy current.cache. On Wednesday, 25 July 2012 16:41:57 UTC-5, Anthony wrote: >

Re: [web2py] Re: Empty Database value is not None, but an empty string

2012-07-25 Thread Massimo Di Pierro
I cannot reproduce the problem: $ python web2py.py -S welcome -N >>> db=DAL() >>> db.define_table('testtable', ... Field('column1'), ... Field('column2'), ... Field('column3','string')) >>> db.testtable.import_from_csv_file(open('/Users/massimodipierro/Downloads/example.csv'),null='') >>> print d

Re: [web2py] Re: Visit Plugow on FISL13

2012-07-25 Thread vinicius...@gmail.com
Sure, Massimo. You go to http://labs.agenciax4.com.br/fisl13 , log in with your twitter or fb and get a QRCode. After that, you head to our totem, show your qrcode (what identifies you on it) and record a video. This video is converted and uploaded to our youtube account with your name on it a

Re: [web2py] how to use cache decorator within modules?

2012-07-25 Thread Anthony
I'm sure technically there's some double laziness going on, but from an API standpoint, maybe it would be sufficient to just include one "lazy" in the name. :-) Another option might be current_cache. Anthony On Wednesday, July 25, 2012 5:25:36 PM UTC-4, Massimo Di Pierro wrote: > > Because whi

Re: [web2py] User accessed site without logging in

2012-07-25 Thread Massimo Di Pierro
Hello Neil, thank you for this thread and for how you handled the issue. This was a tricky one to debug and a very important issue for the community. We can all rejoice this is a uwsgi issue and not a web2py one. There is nothing web2py can do if the web server injects the wrong headers but I

Re: [web2py] Re: Empty Database value is not None, but an empty string

2012-07-25 Thread Mark Li
I'm using SQLite3 on Windows (running from source). I didn't install anything extra, just been using SQLite that came with web2py I attempted try: db.testtable.import_from_csv_file('example.csv', null='') except: print db._lastsql db.rollback() However, print db._lastsql doe

Re: [web2py] how to use cache decorator within modules?

2012-07-25 Thread Massimo Di Pierro
Because while the cache decorator wraps the function once. The lazy_lazy_cache wraps cache once, therefore the function twice. This is because cache requires current.request but this is only available when the function is called, not when the module is first imported and the cache decorator exe

Re: [web2py] BR()

2012-07-25 Thread Massimo Di Pierro
Why not? Good idea. It is in trunk! {{=BR()*5}} On Wednesday, 25 July 2012 12:18:26 UTC-5, Lucas R. Martins wrote: > > You also can use {{=BR()*5}} or {{=ANYTHING()*5}} > > Em Qua 25 Jul 2012 13:51:38 BRT, Toby Shepard escreveu: > > In my own html generating libraries, I normally allow > > an

[web2py] Re: Visit Plugow on FISL13

2012-07-25 Thread Massimo Di Pierro
Can you tell us more hat it does? On Wednesday, 25 July 2012 12:36:46 UTC-5, viniciusban wrote: > > Plugow is a totem developed by our team, at Agencia X4, using Python and > web2py. > > It integrates several techologies like webcam, qrcode, social networks > (twitter and fb) and youtube. > We

Re: [web2py] Re: prettydate question

2012-07-25 Thread Alec Taylor
Thanks On Thu, Jul 26, 2012 at 6:40 AM, ctrlSoft wrote: > > > On Wednesday, July 25, 2012 7:17:43 PM UTC+3, Alec Taylor wrote: >> >> On Tue, Jul 24, 2012 at 2:28 AM, ctrlSoft wrote: >> >>> yes. > http://i.imgur.com/jaeop.jpg >>> >>> http://i.imgur.com/xPBG1.jpg >>> >>> Quick aside, th

Re: [web2py] Re: Web2Py on OpenShift

2012-07-25 Thread Alec Taylor
Excellent, thanks. I haven't really looked at the newly built in OpenShift feature, but I'm pretty sure it just facilitates updating the application on OpenShift, rather than the application + web-framework. On Thu, Jul 26, 2012 at 6:23 AM, Andrew Replogle wrote: > I haven't attempted with a rec

Re: [web2py] Re: prettydate question

2012-07-25 Thread ctrlSoft
On Wednesday, July 25, 2012 7:17:43 PM UTC+3, Alec Taylor wrote: > > On Tue, Jul 24, 2012 at 2:28 AM, ctrlSoft wrote: > >> yes. >>> http://i.imgur.com/jaeop.jpg >> >> http://i.imgur.com/xPBG1.jpg >> >> Quick aside, that view you've screenshotted, would you be able to show me > the code

[web2py] Modifying form submit button markup?

2012-07-25 Thread Alec Taylor
I've been able to change the textual value of the submit button on `SQLFORM.factory` by modifying the `submit_button` attribute. I want to change its class to: , and move it up to the text field, so it will look like: *Search*[][icon] For a better explanation on what classes I want to a

Re: [web2py] Re: Web2Py on OpenShift

2012-07-25 Thread Andrew Replogle
I haven't attempted with a recent release. I'll pull down trunk and see if I can get the admin working. Keep in mind that when an OpenShift gear is started, your configuration is copied from the git area to a runtime area and executed from there. So, while I haven't tested this and can't confirm f

Re: [web2py] User accessed site without logging in

2012-07-25 Thread Neil
This is very useful information - I was always unsure about using async. Thanks a lot! On Wednesday, July 25, 2012 6:49:39 PM UTC+1, Roberto De Ioris wrote: > > > You can get the updated stable-branch from here: > > http://projects.unbit.it/hg/uwsgi-1.2 > > (the maintainance release will be tom

Re: [web2py] how to use cache decorator within modules?

2012-07-25 Thread Derek
because this one is really lazy. On Wednesday, July 25, 2012 7:44:20 AM UTC-7, Anthony wrote: > > Why is it called lazy_lazy_cache, as opposed to just lazy_cache? > > On Wednesday, July 25, 2012 10:36:50 AM UTC-4, villas wrote: >> >> Hi All, >> >> For anyone who was interested in this thread, Mas

[web2py] Re: email question, and mysterious variable behavior

2012-07-25 Thread Niphlod
'logging' gets the raw email printed on the console. it is only for debugging purposes. BTW (and I mean no harm on that): I get that asking on such an active list is "speedier" than having to read documentation, but since you are going to use the feature, why don't you just go and read about it

[web2py] Re: Inconsistent behavior with SqlGrid and referenced tables

2012-07-25 Thread Derek
I'll quote Massimo here... http://permalink.gmane.org/gmane.comp.python.web2py/79516 A field has two attributes, requires and represent. If web2py finds a 'reference auth_user" but no requires, it assumes db.report.person.requires=IS_IN_DB(db, db.auth_user.id, db.auth_user._format) db.report.p

[web2py] Re: email question, and mysterious variable behavior

2012-07-25 Thread joe
Thanks, the variable thing works now. Also, if the server is 'logging', will the email be sent? Sorry, I have never used this before. Thanks for the help -Joe peacock On Wednesday, July 25, 2012 2:42:42 PM UTC-5, Niphlod wrote: > > mail.settings.server needs to be ('logging' for debugging purp

[web2py] Re: Inconsistent behavior with SqlGrid and referenced tables

2012-07-25 Thread Derek
created_by works because it references db.auth_user and db.auth_user has a format attribute which specifies how it is to be represented. So, your argument '%(name)s' gives it a label, but not a representation. Add a format attribute to those other tables. On Saturday, July 21, 2012 7:13:08 AM UT

[web2py] Re: email question, and mysterious variable behavior

2012-07-25 Thread Anthony
> > from gluon.tools import Mail > mail = Mail() > mail.settings.server = 'http://127.0.0.1:8000' > mail.settings.sender = 'myem...@emailclient.com' > You also need: mail.settings.login = 'username:password' row.notified = True > > The other odd thing is that notified stays

[web2py] Re: email question, and mysterious variable behavior

2012-07-25 Thread Niphlod
mail.settings.server needs to be ('logging' for debugging purposes or) an ip(:port) where a mail daemon is listening, not the http address of a web2py instance.. And again (this rises up quite a bit): DAL is not an ORM. DAL is a Database Abstraction Layer, not an Object Relational Mapper.

Re: [web2py] BR()

2012-07-25 Thread Anthony
Right, you have to put it inside an XML(). On Wednesday, July 25, 2012 2:53:05 PM UTC-4, viniciusban wrote: > > They don't work. Output is escaped. > > Try it out. > > -- > Vinicius Assef > > > On 07/25/2012 03:40 PM, Anthony wrote: > > Though you can do: > > > > | > > {{=BR().xml()*5}} >

Re: [web2py] BR()

2012-07-25 Thread Niphlod
1.99.7 {{=XML(BR().xml()*5)}} works ok. On Wednesday, July 25, 2012 9:17:04 PM UTC+2, Derek wrote: > > nope... > unsupported operand type(s) for *: 'BR' and > 'int' > and also... > 'BR' object has no attribute 'XML' > > On Wednesday, July 25, 2012 12:09:24 PM UTC-7, Derek wrote: >> >> Ok, how

[web2py] email question, and mysterious variable behavior

2012-07-25 Thread joe
Hello Two problems. First, I have no experience whatsoever with the mail system, but I need to use it for a request/notification system. (when the status of a run changes to what a user wanted it to change to, the user gets an email). The email is not being sent. I set up email like this:

Re: [web2py] BR()

2012-07-25 Thread Derek
Better way is this: {{=XML(""*5)}} But only because you have a ton less brackets. On Wednesday, July 25, 2012 12:14:09 PM UTC-7, viniciusban wrote: > > You cannot, too. > > I've tested. The correct way is: {{=XML(str(BR())*5)}} > > > > > On 07/25/2012 04:09 PM, Derek wrote: > > Ok, how about {

[web2py] Re: [WEB2PY] Twitter bootstrap Carousel not cycling

2012-07-25 Thread howesc
check the JS console for errors. if somehow your code above is executed before bootstrap has finished loading it bet the init fails...though i wouldn't expect it to work at all. i guess check the console and let us know if you see errors. On Wednesday, July 25, 2012 9:04:00 AM UTC-7, dundee w

[web2py] Re: web2py with Amazon AWS and dynamoDB

2012-07-25 Thread howesc
i may be speaking out of turn, but i don't recall that there is a DAL adapter for dynamodb. i bet the DAL adapter would look like other nosql adapters We should probably add it in if there is demand for it! the rest of web2py should run fine. On Wednesday, July 25, 2012 4:51:56 AM UTC-7,

[web2py] Re: Suggestion - a pickled DAL field

2012-07-25 Thread howesc
For what it is worth i have used custom fields for this type of thing with great success! On Tuesday, July 24, 2012 8:20:03 AM UTC-7, Anthony wrote: > > You could use a SQLCustomType field: > http://web2py.com/books/default/chapter/29/6#Custom-Field-types-(experimental) > . > > Anthony > > On Tu

Re: [web2py] BR()

2012-07-25 Thread Derek
nope... unsupported operand type(s) for *: 'BR' and 'int' and also... 'BR' object has no attribute 'XML' On Wednesday, July 25, 2012 12:09:24 PM UTC-7, Derek wrote: > > Ok, how about {{=(BR()*5).XML()}} > > On Wednesday, July 25, 2012 11:53:05 AM UTC-7, viniciusban wrote: >> >> They don't work.

[web2py] Re: Web2Py on OpenShift

2012-07-25 Thread Alec Taylor
Looking good, but I was wondering, is it possible to get this working with latest trunk? I tried, but ended up with "Internal error"s before I was even presented with the enter admin password view. The welcome app worked fine though >.< Thanks On Saturday, June 9, 2012 1:07:39 AM UTC+10, Andre

Re: [web2py] BR()

2012-07-25 Thread vinicius...@gmail.com
You cannot, too. I've tested. The correct way is: {{=XML(str(BR())*5)}} On 07/25/2012 04:09 PM, Derek wrote: Ok, how about {{=(BR()*5).XML()}} On Wednesday, July 25, 2012 11:53:05 AM UTC-7, viniciusban wrote: They don't work. Output is escaped. Try it out. -- Vinicius Ass

Re: [web2py] BR()

2012-07-25 Thread Derek
Ok, how about {{=(BR()*5).XML()}} On Wednesday, July 25, 2012 11:53:05 AM UTC-7, viniciusban wrote: > > They don't work. Output is escaped. > > Try it out. > > -- > Vinicius Assef > > > On 07/25/2012 03:40 PM, Anthony wrote: > > Though you can do: > > > > | > > {{=BR().xml()*5}} > > | >

[web2py] Re: Error using Scheduler with CouchDB

2012-07-25 Thread Niphlod
Scheduler was meant to run on relational dbs. Actually, I think noone ever tested it on Nosql adapters, but if this is a popular requirement I could see into it. BTW, I posted an app to test the scheduler in trunk for this kind of tests. https://groups.google.com/d/topic/web2py/E_mASrZIpvw/disc

Re: [web2py] BR()

2012-07-25 Thread vinicius...@gmail.com
They don't work. Output is escaped. Try it out. -- Vinicius Assef On 07/25/2012 03:40 PM, Anthony wrote: Though you can do: | {{=BR().xml()*5}} | or | {{=str(BR())*5}} | Anthony On Wednesday, July 25, 2012 1:23:37 PM UTC-4, viniciusban wrote: No, you cannot. On 07/25/2012 02:18

Re: [web2py] BR()

2012-07-25 Thread Anthony
Though you can do: {{=BR().xml()*5}} or {{=str(BR())*5}} Anthony On Wednesday, July 25, 2012 1:23:37 PM UTC-4, viniciusban wrote: > > No, you cannot. > > On 07/25/2012 02:18 PM, Lucas R. Martins wrote: > > You also can use {{=BR()*5}} or {{=ANYTHING()*5}} > > > > Em Qua 25 Jul 2012 13:51:

Re: [web2py] User accessed site without logging in

2012-07-25 Thread Roberto De Ioris
Il giorno 25/lug/2012, alle ore 18:54, Neil ha scritto: > I got to the point where I could reproduce this locally using incognito mode. > Looks like it is a known uwsgi bug that was just patched 3 days ago: > > http://stackoverflow.com/questions/11598935/uwsgi-resends-headers-in-async-mode >

[web2py] Visit Plugow on FISL13

2012-07-25 Thread vinicius...@gmail.com
Plugow is a totem developed by our team, at Agencia X4, using Python and web2py. It integrates several techologies like webcam, qrcode, social networks (twitter and fb) and youtube. We're on FISL 13 [1] (International Free Software Forum, 13th edition) in Brazil. If you understand Portuguese

Re: [web2py] BR()

2012-07-25 Thread vinicius...@gmail.com
No, you cannot. On 07/25/2012 02:18 PM, Lucas R. Martins wrote: You also can use {{=BR()*5}} or {{=ANYTHING()*5}} Em Qua 25 Jul 2012 13:51:38 BRT, Toby Shepard escreveu: In my own html generating libraries, I normally allow an integer argument to the maker, which is a count of how many tags

Re: [web2py] BR()

2012-07-25 Thread Lucas R. Martins
You also can use {{=BR()*5}} or {{=ANYTHING()*5}} Em Qua 25 Jul 2012 13:51:38 BRT, Toby Shepard escreveu: In my own html generating libraries, I normally allow an integer argument to the maker, which is a count of how many tags to put out. So: {{=BR(5)}} could output This works out since t

Re: [web2py] Re: Complex query with left outer join

2012-07-25 Thread vinicius...@gmail.com
Indeed, pbreit. Did you check if your SQL query is correct? print db._lastsql would help, too. Baby steps, baby. Baby steps. -- Vinicius Assef On 07/25/2012 01:58 PM, pbreit wrote: I don't really understand what you're trying to do but I would recommend trying to simplify. First, you don't

Re: [web2py] Complex query with left outer join

2012-07-25 Thread vinicius...@gmail.com
timedelta syntax is timedelta(days=1) On 07/25/2012 11:13 AM, jw wrote: Hi, my question is about the following query. I'm planning to program an e-learning software. For this I use three tables to select the cards to learn for today. Table "cards" contains the question, "userCard" contains the

[web2py] Re: Complex query with left outer join

2012-07-25 Thread pbreit
I don't really understand what you're trying to do but I would recommend trying to simplify. First, you don't always need to do a join or a left join. Try to figure out if those are really necessary. For example, do you really need to join the questions and the progress or can you retrieve thos

Re: [web2py] User accessed site without logging in

2012-07-25 Thread Neil
I got to the point where I could reproduce this locally using incognito mode. Looks like it is a known uwsgi bug that was just patched 3 days ago: http://stackoverflow.com/questions/11598935/uwsgi-resends-headers-in-async-mode To anyone else using a recent version of uwsgi - you might want to

[web2py] BR()

2012-07-25 Thread Toby Shepard
In my own html generating libraries, I normally allow an integer argument to the maker, which is a count of how many tags to put out. So: {{=BR(5)}} could output This works out since the BR tag can't have any components anyway. Just a thought. I find it useful at times. Tobiah --

Re: [web2py] Re: callback on an anchor tag

2012-07-25 Thread Anthony
> > Oh, I had thought that 'myaction' stood for a full URL. So in this > case, is 'myaction' actually the name of a controller, or function? > It's a function. When you don't pass an application or controller name to URL(), it assumes the current application and current controller. Anthony

Re: [web2py] Complex query with left outer join

2012-07-25 Thread Alec Taylor
On Thu, Jul 26, 2012 at 12:13 AM, jw wrote: > Hi, > > my question is about the following query. I'm planning to program an > e-learning software. For this I use three tables to select the cards to > learn for today. > Table "cards" contains the question, "userCard" contains the progress for > the

Re: [web2py] Re: callback on an anchor tag

2012-07-25 Thread Toby Shepard
On 07/25/2012 09:21 AM, Anthony wrote: Ok, thanks. Perhaps there is a small problem with the manual section on views. I copied my example from the manual: {{=A('click me', callback=URL('myaction'), target="t")}} and the response of the ajax callback will be stored in the D

Re: [web2py] Re: callback on an anchor tag

2012-07-25 Thread Toby Shepard
On 07/24/2012 06:48 PM, Massimo Di Pierro wrote: {{=A("CLICK ME!!", callback=URL('http://mysite.com/foo.html' ), target='hater')}} should be {{=A("CLICK ME!!", callback='http://mysite.com/foo.html' ,target='hater')}} Ok, so now I have:

Re: [web2py] Re: callback on an anchor tag

2012-07-25 Thread Anthony
> > Ok, thanks. Perhaps there is a small problem with the > manual section on views. I copied my example from the manual: > > > {{=A('click me', callback=URL('myaction'), target="t")}} > > > and the response of the ajax callback will be stored in the DIV with id > equal to "t". > No, the

Re: [web2py] Re: Suggestion - a pickled DAL field

2012-07-25 Thread Anthony
> > > Make it a computed field? > > > > > > I'm not sure that would be helpful in this case. A computed field > > computes its value automatically based on other fields in the record, > > but in this case, he needs to pickle an object, which is not one of the > > other fields. Also, it n

Re: [web2py] Re: prettydate question

2012-07-25 Thread Alec Taylor
On Tue, Jul 24, 2012 at 2:28 AM, ctrlSoft wrote: > yes. >>> >> http://i.imgur.com/jaeop.jpg > > http://i.imgur.com/xPBG1.jpg > > Quick aside, that view you've screenshotted, would you be able to show me the code (view+controller) you used to generate it? --

Re: [web2py] Re: "Internal error" on every page, can't even access admin

2012-07-25 Thread Alec Taylor
Alright, happened again, just checked the uwsgi log: tmpfile(): No space left on device [proto/http.c line 338] error parsing request :\ On Thu, Jul 26, 2012 at 2:04 AM, Alec Taylor wrote: > I didn't do anything on the website for the past 3 hours (had some more > academic research to do), and

Re: [web2py] prettydate question

2012-07-25 Thread Asimionese Alexandru
On Wednesday, July 25, 2012 11:48:34 AM UTC+3, ctrlSoft wrote: > > > > On Tuesday, July 24, 2012 5:58:16 PM UTC+3, dbdeveloper wrote: >> >> ctrlSoft, is issue still present ? >> >> Vladyslav Kozlovskyy (Ukraine) >> >> 23.07.12 13:32, ctrlSoft написав(ла): >> >> datetime format is: 2012-07-18 1

[web2py] web2py with Amazon AWS and dynamoDB

2012-07-25 Thread kantaki
Hello, is it possible to run web2py with dynamodb? If yes what are the restrictions? Maybe there are other frameworks that are more suitable with dynamodb? --

[web2py] Left outer join in a compex select

2012-07-25 Thread jw
Hi! I'm trying to develop a E-Learning-System. The idea is to give the student a bunch of cards to learn every day. Therefore I have a table 'cards' which includes only the answer. Table 'userCard' includes the date when the user learnt the card the last time and in which stage (multiplier for t

  1   2   >