[web2py] 'Table' object has no attribute '_notnulls'

2015-12-21 Thread Francisco Costa
After upgrading to web2py 2.13.2 (previously on 2.12.3) I got the following error: Traceback (most recent call last): File "/home/franciscocosta/www/web2py/gluon/restricted.py", line 227, in restricted exec ccode in environment File

[web2py] DAL Validator for list size

2015-07-08 Thread Francisco Costa
Hi, Is there any validator for a List size? db.define_table( 'categories', Field('id', required=True, unique=True), Field('name', 'string', length=128, required=True), ) db.define_table( 'sub_categories', Field('id', required=True, unique=True), Field('name', 'string',

[web2py] Re: DAL Validator for list size

2015-07-08 Thread Francisco Costa
values, i.e. it will accept the field when nothing has been selected. multiplecan also be a tuple of the form (a,b) where a and b are the minimum and (exclusive) maximum number of items that can be selected respectively. On Wednesday, July 8, 2015 at 4:36:29 PM UTC+2, Francisco Costa wrote

[web2py] Absolute URLs

2015-06-09 Thread Francisco Costa
How to force web2py to make all URL's absolute instead of having to write URL(..., scheme=True, host=True) in every link? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

Re: [web2py] Re: How to add a trailing slash in URL?

2015-05-06 Thread Francisco Costa
PM UTC-4, Francisco Costa wrote: nothing to explain, I just want my URL's to finish with a trail (obviously excluding the ones with vars) Francisco Tomé Costa +351 918412636 https://www.linkedin.com/in/franciscocosta​ On Tue, May 5, 2015 at 8:46 PM, Willoughby neil.e...@gmail.com wrote

[web2py] How to add a trailing slash in URL?

2015-05-05 Thread Francisco Costa
Is there any way to force URL to add a trailing slash? Even if there are any vars (query strings) I would like the last argument (or function) to have a trailing slash. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Unclear how to create a unique multiple fields on web2py

2015-03-12 Thread Francisco Costa
I tis also possible to use _before_insert before form process : http://stackoverflow.com/questions/8054665/multi-column-unique-constraint-with-web2py/23738715#23738715 On Sunday, 29 June 2014 02:16:14 UTC+1, Daniel Lafrance wrote: Thanks M. Di Pierro I was not expecting an answer so fast.

[web2py] Re: Wildcard in domain mapping route?

2015-03-12 Thread Francisco Costa
I don't think so, but would love to have something like this in Parameter Based System domains = {*.myserver.com: myapp/controller/function/*} On Wednesday, 30 May 2012 22:23:50 UTC+1, pbreit wrote: Is it possible to wildcard the sub-domain of a domain mapping route? Ex: domains =

[web2py] Re: list reference with ondelete=set null breaking when delete parent

2015-03-10 Thread Francisco Costa
Hi Paolo, but how do you find the tables (and records) that use the deleted record as a Foreign Key? I don't know if those records should have the is_active set to False, or the Foreign Key set to None On Tuesday, 10 March 2015 07:34:22 UTC, Paolo Valleri wrote: ondelete is for reference

Re: [web2py] Re: list reference with ondelete=set null breaking when delete parent

2015-03-09 Thread Francisco Costa
Hi ANdré, did you find a way to solve this? On Thursday, 20 March 2014 22:10:33 UTC, André Kablu wrote: Yes just migrated to mongodb, and there really exist some issue. using CASCADE or SET NULL, it does not matter, web2py does not respect and remove the reference from the referencing

[web2py] Re: web2py with bootstrap-slider bootstrap-typeahead

2015-03-06 Thread Francisco Costa
On Saturday, 31 January 2015 03:24:04 UTC, Massimo Di Pierro wrote: Niphlod. Calm down. Everything is going to be fine. ;-) In fact, I almost did not know JS when I started web2py and avoided it as the plague. Today I like it a log. Back to the original question. Assuming we are

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2015-02-18 Thread Francisco Costa
Some of the web2py content should be colaborative, maybe a wiki or a file in github so developers could provide changes On Tuesday, 17 February 2015 01:21:32 UTC, Massimo Di Pierro wrote: We have always been listing companies that do web2py support. Eventually we should have a certification

[web2py] dynamic IS_DATE_IN_RANGE validator

2015-02-17 Thread Francisco Costa
Is it possible to have a validator for dates in define_tables to end_date be bigger than start_date? db.define_table( 'events', Field('id', required=True, unique=True), Field('name', 'string', required=True), Field('start_date', 'date', required=True), Field('end_date',

[web2py] orderby field empty always in first place

2015-02-17 Thread Francisco Costa
if you query db like events = db(db.events).select(orderby=~db.events.end_date) All the events without end_date will show in last place in rows. How can you make them show in first, but still having end_date descending? -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Translate Controller names and Function names

2015-01-28 Thread Francisco Costa
On Wednesday, 28 January 2015 14:50:51 UTC, Jonathan Lundell wrote: There's also the alternative of embedding a language code in the URL and not translating the URL elements. The parameter-based routing system already supports that, and it would give you separate search-engine indexing.

[web2py] Re: Translate Controller names and Function names

2015-01-27 Thread Francisco Costa
I have this in models till now: views_translate = { # Controllers Names 'default' : 'principal', 'principal' : 'default', 'articles' : 'artigo', 'artigo': 'articles', # Function Names 'index' : 'inicio', 'inicio': 'index', 'new' : 'novo',

Re: [web2py] Translate Controller names and Function names

2015-01-27 Thread Francisco Costa
On Tuesday, 27 January 2015 17:14:48 UTC, Carlos Costa wrote: Very interesting question. It must have some effect on SEO. I have seen this post but it does not seem to solve exactly this https://groups.google.com/forum/#!searchin/web2py/translate$20url/web2py/3adXUSCGQQQ/TaKfRagHyvMJ Yes,

[web2py] Re: Translate Controller names and Function names

2015-01-27 Thread Francisco Costa
unfortunately it seams you can't use both rewrite systems, and I have other apps using the Parameter-based system On Tuesday, 27 January 2015 14:05:26 UTC, Niphlod wrote: IMHO you're better suited for routes http://web2py.com/books/default/chapter/29/04/the-core#URL-rewrite. As long at the

[web2py] Re: Translate Controller names and Function names

2015-01-27 Thread Francisco Costa
Tx Jonathan, how would a wrapper for the URL() look like? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are

[web2py] Translate Controller names and Function names

2015-01-27 Thread Francisco Costa
I'm using the Parameter-based rewrite system http://web2py.com/books/default/chapter/29/04/the-core#Parameter-based-system and I would like to find a strategy to **translate controller names and function names**. I have 2 domains and I use only one app for both, but I would like to have the

[web2py] Convert MongoDB / dict into a DAL Row

2014-11-14 Thread Francisco Costa
', length=128, required=True), Field('gender', db.genders, required=False, default=None), format='%(name)s' ) from gluon.dal import Row mongo = db._adapter.connection # Use PYMONGO user = mongo.auth_user.find_one({'name': 'Francisco Costa'}) print(user) #{ #u'name

Re: [web2py] Re: Minify (compress) response HTML

2014-09-11 Thread Francisco Costa
would be nice to have this https://pypi.python.org/pypi/htmlmin/0.1.5 incorporated in web2py On Thursday, 25 July 2013 04:00:41 UTC+1, Kernc wrote: On Thu, Jul 25, 2013 at 1:15 AM, Elcimar elc...@gmail.com javascript: wrote: Hmm... Go to listacaiu.com and view source code of the main

Re: [web2py] Is it possible to compress the output html before rendering out?

2014-09-11 Thread Francisco Costa
tried with https://pypi.python.org/pypi/htmlmin/0.1.5 and worked fine On Thursday, 27 October 2011 14:59:30 UTC+1, Anthony wrote: If you have a function that does the compressing, I suppose you could do something like: def my_action(): [some code] d = dict(...) return

[web2py] Fashion Marketplace in Web2py - Feedback needed

2014-03-14 Thread Francisco Costa
, turning every closet into a unique shopping experience. Founded in 2014, we are headquartered at Porto, Portugal Thanks, Francisco Costa -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py

Re: [web2py] Re: Fashion Marketplace in Web2py - Feedback needed

2014-03-14 Thread Francisco Costa
No, you can browse the marketplace without login https://chique.pt/buy?lang=en Francisco Costa http://franciscocosta.com On Fri, Mar 14, 2014 at 4:17 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Do I need to login? Is there more information one can see without login. Looks nice

Re: [web2py] Re: Fashion Marketplace in Web2py - Feedback needed

2014-03-14 Thread Francisco Costa
Thanks for the feedback Massimo, I'm only focus on the Portuguese version for now, but soon I'll official launch the EN version Francisco Costa http://franciscocosta.com On Fri, Mar 14, 2014 at 4:30 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I would make the BUY button bigger

[web2py] Re: Authorization for Webhooks

2014-01-03 Thread Francisco Costa
I had a similar problem with a webook. In my case I read the HTTP POST with request.body.read() Chek it here: http://web2py.com/books/default/chapter/29/04/the-core?search=request.body.read%28%29 And this example: http://www.web2py.com/AlterEgo/default/show/197 On Sunday, February 13, 2011

[web2py] Re: Internationalization for DB table field names and DB table content

2013-12-18 Thread Francisco Costa
Check http://stackoverflow.com/questions/12055856/how-to-apply-language-translation-on-requires-field-when-showing-other-table-fie I would go with IS_IN_DB(db, db.t_title.id, lambda r: T(r.name), orderby=db. t_title.id) On Monday, December 26, 2011 9:14:55 PM UTC, Alan Etkin wrote: And what

[web2py] How to orderby translation name?

2013-12-18 Thread Francisco Costa
I have this form for creating new items and where I ask for the colors that are referenced by an id saved in db.colors I'm already showing the translated color names, but they are being ordered by the original name I have this: db.items.color.requires = IS_IN_DB(db, db.colors.id, lambda row:

Re: [web2py] Re: How to orderby translation name?

2013-12-18 Thread Francisco Costa
Thanks Leonel because I'm using SQLFORM to generate the form I used a javascript solution, here is the code: http://stackoverflow.com/a/20665508/621727 Francisco Costa On Wed, Dec 18, 2013 at 5:51 PM, Leonel Câmara leonelcam...@gmail.comwrote: You have to either sort using javascript

[web2py] Custom Validator IS_NOT_EMPTY_IF_NOT_OTHER

2013-11-30 Thread Francisco Costa
I've found this validator IS_NOT_EMPTY_IF_OTHER : http://www.web2pyslices.com/slice/show/1586/obligate-a-field-just-in-case-another-one-has-value Do we have a custom validator for IS_NOT_EMPTY_IF_NOT_OTHER ? The logic is that a Field can't be Empty if another Field is already Empty --

[web2py] Re: resize image validator using PIL

2013-11-18 Thread Francisco Costa
its better to keep the TemporaryFile so that the image filesize gets updated, otherwise the image filesize will be the same as the original and it should be smaller On Thursday, September 2, 2010 12:30:49 PM UTC+1, kachna wrote: One more update. tempfile.TemporaryFile() in not needed.

[web2py] verify_email Message

2013-11-05 Thread Francisco Costa
Verify email message seams to only accept username, key and link. What if I want to pass another variable? My current message is: auth.messages.verify_email = re.compile('(\%)[^(]').sub('%%', response.render('emails/standard.html', dict(message=T('Welcome %(name)s! Click on the link

[web2py] Controller name translation and function name translation

2013-10-22 Thread Francisco Costa
Is it possible to translate a controller name, without to copy the all code to a different controller name? And a function name? What about table names and fields? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Controller name translation and function name translation

2013-10-22 Thread Francisco Costa
is for functions. Table names and fields can be translated easily using T('string_to_translate') Marin On Tue, Oct 22, 2013 at 7:25 PM, Francisco Costa ma...@franciscocosta.com javascript: wrote: Is it possible to translate a controller name, without to copy the all code

Re: [web2py] Controller name translation and function name translation

2013-10-22 Thread Francisco Costa
'), (...)) repeat for every controler/function that you need to translate. You have to do it manually. On Tue, Oct 22, 2013 at 7:45 PM, Francisco Costa ma...@franciscocosta.com javascript: wrote: Thanks Marin, can you provide me with an example of a translated controller and function using

[web2py] web2py upgrade admin error

2013-10-01 Thread Francisco Costa
Hi I get this error when I click on check for upgrades button on the admin Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. Traceback (most recent call last): File /home/franciscocosta/www/web2py/gluon/restricted.py, line 217, in restricted exec ccode in

[web2py] Re: web2py Talk

2013-04-05 Thread Francisco Costa
also this one: http://www.slideshare.net/blackthorne/web2pyweb-development-like-a-boss On Thursday, April 4, 2013 11:56:20 AM UTC+1, Francisco Costa wrote: Hi, I'm going to give a briefly presentation about web2py this Saturday: https://tymr.com/event/encontro-python-pt-6-abril-2013-porto

[web2py] Re: web2py Talk

2013-04-05 Thread Francisco Costa
http://franciscocosta.com/web2py.html On Thursday, April 4, 2013 11:56:20 AM UTC+1, Francisco Costa wrote: Hi, I'm going to give a briefly presentation about web2py this Saturday: https://tymr.com/event/encontro-python-pt-6-abril-2013-porto/515c6f2a03d36d409716741e Are there any great

[web2py] web2py Talk

2013-04-04 Thread Francisco Costa
Hi, I'm going to give a briefly presentation about web2py this Saturday: https://tymr.com/event/encontro-python-pt-6-abril-2013-porto/515c6f2a03d36d409716741e Are there any great slides/presentations out there that I can use or get inspiration from? Francisco Costa https://tymr.com

[web2py] Re: Translation plural

2013-03-13 Thread Francisco Costa
Translation Pluralization may be found here: http://web2py.com/books/default/chapter/29/04?search=plural#Internationalization,-and-Pluralization-with-T -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop

[web2py] Re: Translation plural

2013-03-13 Thread Francisco Costa
Translation Pluralization may be found here: http://web2py.com/books/default/chapter/29/04?search=plural#Internationalization,-and-Pluralization-with-T On Tuesday, September 11, 2012 4:23:08 PM UTC+1, Francisco Costa wrote: How to use the plural featurein tranlation T.plural ? -- --- You

Re: [web2py] default function in a non default controller with args - routing

2013-02-06 Thread Francisco Costa
Right now using the Parameter-based system for routing if we want to define different default_function for each controller we must set a list of all controllers, and then a dictionary with a list of all functions in each controller. blog=dict( controllers=['posts', 'comments'],

[web2py] web2py and handlebars fix

2013-02-04 Thread Francisco Costa
http://stackoverflow.com/questions/12132947/change-default-delimiters-in-ember-js/14697027#14697027 If you don't want to change any delimiters (on web2py or in handlebarshttp://handlebarsjs.com/) you can do it by saving the handlebars template in an external file like * people.hbs* in the

Re: [web2py] [OT] Ubuntu 12.10 will no longer ship with Python 2

2012-10-19 Thread Francisco Costa
Python2 is also installed by default, and importantly, /usr/bin/python is still a symlink to python2.7 --

Re: [web2py] web2py.com is down

2012-10-19 Thread Francisco Costa
confirm, web2py.com is down On Friday, October 19, 2012 7:48:25 PM UTC+1, Richard wrote: As in the object Richard --

[web2py] Translation plural

2012-09-11 Thread Francisco Costa
How to use the plural featurein tranlation T.plural ? --

[web2py] web2py 2.0.2 bug

2012-08-30 Thread Francisco Costa
using ngix + uwsgi I get this: * File /opt/web2py/gluon/languages.py, line 250, in read_possible_plurals for pname in os.listdir(pdir): OSError: [Errno 2] No such file or directory: '/gluon/contrib/rules' unable to load app 0 (mountpoint='') (callable not found or import error) *** no app

[web2py] tenjin template engine and web2py

2012-07-18 Thread Francisco Costa
I was reading about python templates engines and found about *tenjin* - http://www.kuwata-lab.com/tenjin Its seams that the main feature is speed as you can see in these benchmarks: http://www.kuwata-lab.com/tenjin/pytenjin-users-guide.html#benchmark Is it possible to use the tenjin template

[web2py] Re: tenjin template engine and web2py

2012-07-18 Thread Francisco Costa
SpitFire (awesome name) also looks good http://code.google.com/p/spitfire/ On Thursday, July 19, 2012 12:29:57 AM UTC+1, Francisco Costa wrote: I was reading about python templates engines and found about *tenjin* - http://www.kuwata-lab.com/tenjin Its seams that the main feature is speed

Re: [web2py] default function in a non default controller with args - routing

2012-07-10 Thread Francisco Costa
Thanks Anthony and Jonathan. It works! It would be nice to have this routing documentation updated in the online book. On Monday, July 9, 2012 10:58:22 PM UTC+1, Jonathan Lundell wrote: On 9 Jul 2012, at 1:29 PM, Francisco Costa wrote: I'm using the Parameter-based system for routing

[web2py] default function in a non default controller with args - routing

2012-07-09 Thread Francisco Costa
Hi, I'm using the Parameter-based system for routing In my routes.py I have this routers = dict( # base router BASE = dict( applications = ['admin', 'app', 'blog'], default_application = 'app', map_hyphen = True, domains = {

[web2py] IDs position in URLs and SEO

2012-07-09 Thread Francisco Costa
Some web applications with restful URLs like Foursquare ( https://foursquare.com/v/restaurante-baobab/*4bed589a75feef3b8d0197e6*https://foursquare.com/v/restaurante-baobab/4bed589a75feef3b8d0197e6) put ID's at the end of the URL, some others like StackOverflow (

[web2py] MongoDB 'document' or 'dict' filetype

2012-05-21 Thread Francisco Costa
At the moment MongodbAdapter only has these filetypes class MongoDBAdapter(NoSQLAdapter): uploads_in_blob = True types = { 'boolean': bool, 'string': str, 'text': str, 'password': str, 'blob': str,

Re: [web2py] MongoDB table definitions

2012-05-21 Thread Francisco Costa
requested here: https://groups.google.com/d/topic/web2py/pqdYpUbMXKQ/discussion On Wednesday, March 7, 2012 7:10:28 PM UTC, rdodev wrote: Bruno, Yes, it would seem that the only two options right now would be to implement a document type (which I'm not sure how time consuming that would

[web2py] Re: MongoDB Adapter error in select

2012-05-21 Thread Francisco Costa
, Francisco Costa wrote: It works Massimo! In MongoDb is also common to insert dicts, can we also have that? At the moment it only saves in the string format (check player Field) { _id : ObjectId(4fae3839b34f4brf5a31), city : Madrid, club : Real Madrid, *player : {'n_goals': 43, 'name': 'Ronaldo

[web2py] Re: MongoDB Adapter error in select

2012-05-12 Thread Francisco Costa
, May 11, 2012 9:16:58 PM UTC+1, Massimo Di Pierro wrote: One more try please. On Friday, 11 May 2012 06:04:52 UTC-5, Francisco Costa wrote: Thanks Massimo. Please let me know if you need more help in debugging it On Friday, May 11, 2012 12:40:35 AM UTC+1, Massimo Di Pierro wrote: Now I

[web2py] Re: MongoDB Adapter error in select

2012-05-11 Thread Francisco Costa
Thanks Massimo. Please let me know if you need more help in debugging it On Friday, May 11, 2012 12:40:35 AM UTC+1, Massimo Di Pierro wrote: Now I understand better where all these problems come from. I shall fix it tonight. On Thursday, 10 May 2012 18:02:24 UTC-5, Francisco Costa wrote

[web2py] Re: MongoDB Adapter error in select

2012-05-11 Thread Francisco Costa
Pierro wrote: Now I understand better where all these problems come from. I shall fix it tonight. On Thursday, 10 May 2012 18:02:24 UTC-5, Francisco Costa wrote: i didn't understand your question.. This is the complete code import sys import time from gluon.dal import DAL, Field mongo

Re: [web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
) File /opt/web2py/gluon/dal.py, line 1641, in parse_id return int(value) ValueError: invalid literal for int() with base 10: 'Toronto' Francisco Costa http://franciscocosta.com On Thu, May 10, 2012 at 7:03 AM, kokoyo hoatre2...@gmail.com wrote: Hi Massimo, i did it and get output (test

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
Still not working. I think Fields order is wrong. At the end of the select() function I write this: a = [] for f in fields: a.append(f.type) return dict(rows=rows, fields=a, colnames=colnames) and I got this: colnames: city age _id name fields: id text

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
:22 UTC-5, Francisco Costa wrote: Still not working. I think Fields order is wrong. At the end of the select() function I write this: a = [] for f in fields: a.append(f.type) return dict(rows=rows, fields=a, colnames=colnames) and I got this: colnames

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
' On Thursday, May 10, 2012 10:16:32 PM UTC+1, Francisco Costa wrote: Just add a '\' at the end of line 4664 and your are done! Great job Massimo! On Thursday, May 10, 2012 9:12:48 PM UTC+1, Massimo Di Pierro wrote: This helps. I have another attempt to fix this in trunk. Hard to test

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
: What's the model? On Thursday, 10 May 2012 16:27:51 UTC-5, Francisco Costa wrote: I found another problem!! if you do this: mongo.user.insert(name='Jim', age=18, city='Detroit') mongo.user.insert(name='Jack', age=18) and then select users = mongo(mongo.user.age==18

[web2py] Re: MongoDB Adapter error in select

2012-05-09 Thread Francisco Costa
) File /opt/web2py/gluon/dal.py, line 1641, in parse_id return int(value) ValueError: invalid literal for int() with base 10: 'Toronto' On Monday, May 7, 2012 11:40:36 PM UTC+1, Massimo Di Pierro wrote: Please try again. On Monday, 7 May 2012 15:48:04 UTC-5, Francisco Costa wrote

[web2py] Re: MongoDB Adapter error in select

2012-05-09 Thread Francisco Costa
): return int(value) Variablesbuiltininttype 'int'value'koko' On Wednesday, May 9, 2012 7:42:56 PM UTC+9, Francisco Costa wrote: I've enumerated fields and colnames and they are like this: fields: id text integer string colnames: city age _id name I believe

[web2py] Re: MongoDB Adapter error in select

2012-05-08 Thread Francisco Costa
, Massimo Di Pierro wrote: Please try again. On Monday, 7 May 2012 15:48:04 UTC-5, Francisco Costa wrote: missing a colon at the end of the line 4677 if key == 'id' and now I get this error File /opt/web2py/gluon/dal.py, line 8134, in select return adapter.select(self.query,fields

[web2py] MongoDB Adapter error in select

2012-05-07 Thread Francisco Costa
So I have this: import sys import time from gluon.dal import DAL, Field mongo = DAL('mongodb://localhost:27017/tymr') mongo.define_table('user', Field('name', 'text'), Field('age', 'integer'), Field('city', 'string') ) def insert_users():

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Francisco Costa
, Francisco Costa wrote: So I have this: import sys import time from gluon.dal import DAL, Field mongo = DAL('mongodb://localhost:27017/tymr') mongo.define_table('user', Field('name', 'text'), Field('age', 'integer'), Field('city', 'string

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Francisco Costa
committed a fix in trunk that should address it. Please let me know. On Monday, 7 May 2012 15:19:40 UTC-5, Francisco Costa wrote: I think that the mongofields_dict.keys() don't match to the data in the rows mongofields_dict: id name age city rows: Toronto 66L 24652490551171733682233802752L

[web2py] Ubuntu and Python3

2012-04-26 Thread Francisco Costa
People at Canonical are thinking on releasing the next Ubuntu (12.10) with Python3 as default. Wouldn't be nice to start developing web3py to be available in 6 months?

[web2py] Re: Ubuntu and Python3

2012-04-26 Thread Francisco Costa
another article http://www.wefearchange.org/2012/04/python-3-on-desktop-for-quantal-quetzal.html On Thursday, April 26, 2012 2:29:47 PM UTC+1, Francisco Costa wrote: People at Canonical are thinking on releasing the next Ubuntu (12.10) with Python3 as default. Wouldn't be nice to start

[web2py] Meteor web framework

2012-04-11 Thread Francisco Costa
http://www.meteor.com Meteor is a set of new technologies for building top-quality webapps in a fraction of the time, whether you're an expert developer or just getting started. I think this is something worth checking out

[web2py] Re: Support for PyPy

2012-03-13 Thread Francisco Costa
isn't justified yet. I've also include the combination of nginx + uwsgi that I found to be the fastest setup till now. On Monday, March 12, 2012 9:48:58 PM UTC, Anthony wrote: On Monday, March 12, 2012 5:02:00 PM UTC-4, Francisco Costa wrote: On Monday, March 12, 2012 7:46:50 PM UTC, Anthony

[web2py] Re: Support for PyPy

2012-03-12 Thread Francisco Costa
Well I've compiled pypy-1.8 from source (without jit) and found that is slower than python whyle executing web2py here are my test results *PYPY* ab -n 10 -c 5 http://127.0.0.1:8000/ This is ApacheBench, Version 2.3 $Revision: 655654 $ Copyright 1996 Adam Twiss, Zeus Technology Ltd,

[web2py] Re: Support for PyPy

2012-03-12 Thread Francisco Costa
On Monday, March 12, 2012 7:46:50 PM UTC, Anthony wrote: Maybe related to this: https://bugs.pypy.org/issue1051. Have you tried 1.7? Nop, i've tried the last source from bitbucket

Re: [web2py] Re: Support for PyPy

2012-03-12 Thread Francisco Costa
On Monday, March 12, 2012 8:36:35 PM UTC, Vasile Ermicioi wrote: Well I've compiled pypy-1.8 from source (without jit) wow, how many hours it took? 1h30m and found that is slower than python of course pypy nojit is slower, no need to compile it by yourself, you can see that on

[web2py] Re: Support for PyPy

2012-03-11 Thread Francisco Costa
They say its incompatible https://bitbucket.org/pypy/compatibility/wiki/web2py Could someone run some tests? On Tuesday, February 28, 2012 5:41:41 PM UTC, Massimo Di Pierro wrote: I have fixed all pypy bugs that have been reported but I did not run it myself. Please report any problems if

[web2py] Re: Dedicated IDE

2012-02-12 Thread Francisco Costa
at tymr we use gEdit + plugins On Feb 12, 4:17 pm, Anthony abasta...@gmail.com wrote: I am also comfortable with the web based IDE. However even with youadworld there was over 5000 files to port over. (Most didn't have to be ported because web2py added the same features required). It is

[web2py] PURE, a JS templating engine

2012-02-12 Thread Francisco Costa
http://beebole.com/pure/ has anyone give it a try? Get started: http://beebole.com/pure/documentation/get-started/

[web2py] Re: TYMR - web2py social network - Invitations for this community

2012-01-19 Thread Francisco Costa
Thanks all for the feedback! @Ovidio, the code is not available. @Marin, you shouldn't be able to not select a place to host events at the moment (that functionality is still in development). I've already corrected it. Thanks On Jan 18, 8:07 pm, Marin Pranjić marin.pran...@gmail.com wrote: I

[web2py] TYMR - web2py social network - Invitations for this community

2012-01-18 Thread Francisco Costa
Hi, TYMR is a social network (developed in web2py) for creating, managing promote any type of events. This all-in-one solution is private at the moment, but the web2py community can be a part of this exclusive network by registering here: http://tymr.com/register/web2py Any feedback is truly

[web2py] web2py powerby screenshot

2012-01-12 Thread Francisco Costa
Can anyone change tymr.com screenshot on http://www.web2py.com/poweredby/ That one is very old. tx

[web2py] Re: web2py powerby screenshot

2012-01-12 Thread Francisco Costa
-5, Francisco Costa wrote: Can anyone change tymr.com screenshot onhttp://www.web2py.com/poweredby/ That one is very old. tx

[web2py] Re: username and email login (auth)

2011-12-11 Thread Francisco Costa
has anyone successfully tried this? On Dec 9, 6:01 pm, Francisco Costa m...@franciscocosta.com wrote: No error, it enters in the if loop, but it seems that the auth.settings.login_userfield = 'email' doesn't change anything On Dec 9, 5:34 pm, Anthony abasta...@gmail.com wrote: The idea

[web2py] Re: username and email login (auth)

2011-12-11 Thread Francisco Costa
= request.vars.username request.post_vars.email = request.vars.email request.vars.username = None request.post_vars.username = None On Dec 11, 1:30 pm, Francisco Costa m...@franciscocosta.com wrote: has anyone successfully tried this? On Dec 9, 6:01 pm, Francisco Costa m

[web2py] username and email login (auth)

2011-12-09 Thread Francisco Costa
lots of users on login form submit their email instead of the username.. it seems that auth.define_tables(username=True) forces username login but it is possible to have both?

[web2py] Re: username and email login (auth)

2011-12-09 Thread Francisco Costa
. On the other hand, if you simply want to allow users to have a username, but always login with email address, you should be able to do: auth.settings.login_userfield = 'email' Anthony On Friday, December 9, 2011 7:22:57 AM UTC-5, Francisco Costa wrote: lots of users on login form

[web2py] Re: username and email login (auth)

2011-12-09 Thread Francisco Costa
request.vars.username to see if it is an email address (using the IS_EMAIL validator). Then, depending on that, dynamically set auth.settings.login_userfield to either 'email' or 'username', and then call auth.login() as usual. Anthony On Friday, December 9, 2011 9:50:02 AM UTC-5, Francisco Costa

[web2py] Re: username and email login (auth)

2011-12-09 Thread Francisco Costa
9, 2011 10:52:56 AM UTC-5, Francisco Costa wrote: I would prefer that way.. I what controller function? I'm using in form from default/user but I'm using a customauth On Dec 9, 3:02 pm, Anthony abas...@gmail.com wrote: Rather than write a whole new method, one trick might be in the login

[web2py] Re: username and email login (auth)

2011-12-09 Thread Francisco Costa
an error, or it just didn't check the email address properly? Anthony On Friday, December 9, 2011 12:17:18 PM UTC-5, Francisco Costa wrote: it seems it dosen't work.. maybe because I have a username field defined in my auth_user? On Dec 9, 4:46 pm, Anthony abas...@gmail.com wrote

[web2py] Re: loading db in module - AttributeError: 'thread._local' object has no attribute 'db'

2011-12-06 Thread Francisco Costa
to you class __init__ http://zerp.ly/rochacbruno Em 05/12/2011 23:21, Francisco Costa m...@franciscocosta.com escreveu: thanks Anthony, but how can I have access to db in modules then? On Dec 6, 1:14 am, Anthony abasta...@gmail.com wrote: Read the callout box at the end

[web2py] loading db in module - AttributeError: 'thread._local' object has no attribute 'db'

2011-12-05 Thread Francisco Costa
Hi, in models/db.py I have: from gluon.globals import current current.db = db In modules/example.py I have: from gluon.globals import * db = current.db but I get this error: AttributeError: 'thread._local' object has no attribute 'db' if I print current.db I get the output but why can't I

[web2py] Re: loading db in module - AttributeError: 'thread._local' object has no attribute 'db'

2011-12-05 Thread Francisco Costa
thanks Anthony, but how can I have access to db in modules then? On Dec 6, 1:14 am, Anthony abasta...@gmail.com wrote: Read the callout box at the end of this section:http://web2py.com/book/default/chapter/04#Accessing-the-API-from-Pyth You're not supposed to assign items from 'current' to

[web2py] uwsgi decorators and web2py

2011-12-01 Thread Francisco Costa
Hi, I'm using web2py + nginx + uwsgi I have a function where I get the users database and then I email them one by one. But when I run this function the page hangs for a few seconds and just loads after all those emails been sent. I was wondering if this problem is possible to solve with the

[web2py] Re: Auth in MongoDB

2011-10-28 Thread Francisco Costa
Hi Samuele, thanks for your answer. Do you have any idea whats the status of the mongodb adapter development? You will be able to do that using DAL with the mongodb adapter (once it is finished); you get that error since Auth() expects a DAL object as the second argument to constructor, in

[web2py] Re: Auth in MongoDB

2011-10-27 Thread Francisco Costa
any insight? On Oct 20, 5:51 pm, Francisco Costa m...@franciscocosta.com wrote: Hi, we are in the process of converting our MySQL DB toMongoDB(via pymongo). We have already convert the auth_user table. Now we want to change theauthconnection fromauth=Auth(globals(), db) toauth=Auth(globals

[web2py] Auth in MongoDB

2011-10-20 Thread Francisco Costa
Hi, we are in the process of converting our MySQL DB to MongoDB (via pymongo). We have already convert the auth_user table. Now we want to change the auth connection from auth = Auth(globals(), db) to auth = Auth(globals(), mongo) but we get this error: TypeError: 'Collection' object is not

[web2py] response.files.append attributes

2011-10-19 Thread Francisco Costa
When you add files to the head via response.files.append, web2py check if its a .css or .js and creates the html link according: css: link href=path/file.css rel=stylesheet type=text/css / js: script src=path/file.js type=text/javascript/script But if you want to change the rel attribute how

[web2py] Re: Foundation CSS Framework

2011-10-19 Thread Francisco Costa
On Oct 19, 10:05 pm, Anthony abasta...@gmail.com wrote: The core doesn't look too heavy to me. There's a bunch of extra stuff (CSS and JS) that could easily be cut out. I recommend LESS http://lesscss.org

  1   2   3   >