Re: [web2py] Re: web2py and python3

2015-12-06 Thread Pablo Angulo
I also have to work with unicode all the time. While it's true that python3 deals better with this issue, there is no way that web2py can move to python3 and our current code keeps working, precisely because of this issue. Our code has lots of .encode('utf8'), .decode('utf8'), unicode(...), etc. We

Re: [web2py] Re: always https

2015-08-10 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 El 10/08/15 a las 10:57, Paolo Amboni escribió: > OK now is much more clear. > If i replace the apache configuration file with the one that i find on the book i can have https on admin interface only? Yes, apache will forward both http and https t

Re: [web2py] Re: always https

2015-08-10 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 El 10/08/15 a las 10:11, Paolo Amboni escribió: > OK I'm waiting for a free certificate. > > But what i can't understand is why all the site is https not only the admin interface. I told you, some web2py contributor it was best to do it that way in

[web2py] web2py on arch linux, for development and production

2015-07-31 Thread Pablo Angulo
Hello! I've been developing with web2py in arch linux for some time now with no problem (just recall to run "python2 web2py.py"). It's a fine distro, and if you think it takes ages to install (it does), you can use manjaro linux which is basically archlinux preconfigured with very sensible choices

[web2py] plugin for handsontable

2015-07-29 Thread Pablo Angulo
I have packaged a plugin with one possible use of the great library handsontable: http://www.web2pyslices.com/slice/show/2042/handsontable-plugin-for-a-spreadsheet You may comment on the plugin as you want, but I specifically want to ask if you find the following trick acceptable (or improvable):

Re: [web2py] Re: New feature in trunk: API tokens

2015-07-10 Thread Pablo Angulo
Sorry, I see signing the email scrambled the patch: > diff --git a/applications/welcome/controllers/default.py > b/applications/welcome/controllers/default.py > index c775603..e99ef0f 100644 > --- a/applications/welcome/controllers/default.py > +++ b/applications/welcome/controllers/default.py > @

Re: [web2py] Re: New feature in trunk: API tokens

2015-07-10 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 > diff --git a/applications/welcome/controllers/default.py b/applications/welcome/controllers/default.py > index c775603..e99ef0f 100644 > --- a/applications/welcome/controllers/default.py > +++ b/applications/welcome/controllers/default.py > @@ -57

Re: [web2py] Re: New feature in trunk: API tokens

2015-07-01 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Just one more comment: I wrote hash(SALT+request.url+'#'+user_id) but meant hash(SUPER_SECRET_GLOBAL_PASSWORD+request.url+'#'+user_id) El 01/07/15 a las 00:06, Pablo Angulo escribió: > > This email was going to be a simpl

Re: [web2py] Re: New feature in trunk: API tokens

2015-06-30 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 This email was going to be a simple "Great!", but eventually I have many comments: El 29/06/15 a las 20:37, Massimo Di Pierro escribió: > 2. yes that is correct (except it is _token=, not token=). Just mind that the > token is as good as a passwor

Re: [web2py] Re: New feature in trunk: API tokens

2015-06-29 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 ok, thanks! But I have two questions: 1. what can I do with auth.requires_membership and auth.requires(custom_function), which I use a lot? 2. so if I have to send an email, all I have to do is find the use token in the database with: user_token =

Re: [web2py] Re: Triggering a one-time migration when schema changes

2015-04-11 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 El 09/04/15 a las 10:21, Niphlod escribió: > another "caveat circumvented", another step in the good direction now the > problem is only IF you have conditional models. I tried this and it triggered the migration on a conditional model: python

Re: [web2py] Re: Triggering a one-time migration when schema changes

2015-04-09 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 El 08/04/15 a las 20:58, Niphlod escribió: > good too, but NEEDS to happen without lazy_tables ^_^ This is what I do: db = DAL('mysql://web2pyuser:pass@localhost/database', migrate=migrate, lazy_tables=(not migrate)) -BEGIN PGP SIGNATURE- Ve

Re: [web2py] Re: Please help us test the 2.9.12 binaries

2015-03-03 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 El 03/03/15 a las 00:43, Dave S escribió: > Well, that's what this thread is about. Finding out what broke, whether it > is a new bug or a place where backwards compatibility /needs/ to be broken (for example , having in the old versions incorrectly

Re: [web2py] Re: Please help us test the 2.9.12 binaries

2015-03-02 Thread Pablo Angulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, Dave! El 02/03/15 a las 21:26, Dave S escribió: > Well, from the original message in this thread: > > "2.9.12 includes mostly bug fixes but there is some major DAL refactoring so we are concerned about backward compatibility. We think it works

[web2py] translating the views

2014-10-01 Thread Pablo Angulo
I sometimes find very inconvenient the translate feature. Some views contain a lot of static text, so if I want to translate it I would do: {{=T('I sometimes find very inconvenient the translate feature. Some views contain a lot of text, so if I want to translate it I would do:')}} but if there a

Re: [web2py] Re: add static files to header from a module

2014-08-16 Thread Pablo Angulo
I think I got it: - As Leonel said, "Simply adding to current.response.files may not works if the request is ajax". I have to add: if a component is loaded with the LOAD function, adding to current.response.files will not work even if ajax=False and ajax_trap=False. - The statements: cur

Re: [web2py] Re: add static files to header from a module

2014-08-13 Thread Pablo Angulo
plot/plugins/jqplot.pointLabels.min.js')) in the xml method, but it didn't make to the response either. El 13/08/14 a las #4, Pablo Angulo escribió: > El 13/08/14 a las #4, Anthony escribió: >> Can you show your module code? Are you doing the appending at the top >> leve

Re: [web2py] Re: add static files to header from a module

2014-08-13 Thread Pablo Angulo
El 13/08/14 a las #4, Leonel Câmara escribió: > Simply adding to current.response.files may not works if the request > is ajax (say your module is loaded). But it's not loaded via ajax, I call it like this: > @requires_get_arguments(('grupo', db.grupo), > ('productor', db.

Re: [web2py] Re: add static files to header from a module

2014-08-13 Thread Pablo Angulo
El 13/08/14 a las #4, Anthony escribió: > Can you show your module code? Are you doing the appending at the top > level in the module, or within a function/method? The latter: > # -*- coding: utf-8 -*- > # (C) Copyright (C) 2012-14 Pablo Angulo > # This file is pa

Re: [web2py] Re: add static files to header from a module

2014-08-13 Thread Pablo Angulo
If I understand, you mean that whenever I call JQPlot jqplot = JQPlot(*args, col_represent=str) I have to append the following lines: response.files.append(URL('static', 'jqplot/jquery.jqplot.min.js')) response.files.append(URL('static', 'jqplot/jquery.jqplot.min.css'))

Re: [web2py] Free web2py hosting for a free software web2py application

2014-03-25 Thread Pablo Angulo
Dear Philip: I tried pythonanywhere and it could work, but I'd have to write code to mold into the limitations of that hosting and accept that a few things wouldn't work: do you still offer your spare hosting space? You'd need to install the following packages. |sudo apt-get install latex-xco

Re: [web2py] Re: /var/.htaccess and Internal Server Error

2013-04-15 Thread Pablo Angulo
El 15/04/13 16:31, LightDot escribió: > That's intriguing. Since it's a clean server and you didn't put it > there, it makes me wonder where it came from. Hmmm, most probably, I untarred a file with a moodle file folder at the wrong place, then moved the folder but not the hidden file .htaccess! T

[web2py] Re: copy database, problem with foreign key constraint

2013-02-26 Thread pablo . angulo
The diagnostic is confirmed by the following experiment: I filled the few missing lines in the csv files with dummy data so that all ids are consecutive starting at 1, and the import worked. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group

[web2py] copy database, problem with foreign key constraint

2013-02-26 Thread pablo . angulo
Hello: I'm trying to copy the contents from the testing sqlite database into apache. Both: - the script cpdb, - export and import of a csv file, - manual, careful export and import of each table of a database fail. The reason is related to foreign keys. The method import_from_csv_files will

[web2py] Re: Graph Model (proposal to contribute)

2013-02-18 Thread pablo . angulo
Thanks a ton, Jose, I did a much more modest attempt at the same thing: print 'digraph Bloques{\n' \ 'ranksep="2"\n' \ 'splines="true"\n' for table in db: for field in table:

[web2py] Re: 'list:reference', contains, Mysql, instr

2013-01-22 Thread pablo . angulo
> > person = db(db.person.name='').select().first() >> papers = db.paper.authors.contains(person.id).select() >> > > Sorry, I didn't read carefully enough. That's not what I need, I need to perform a join. My real-world query is rather like: db.define_table('person', Field('name', unique

[web2py] Re: 'list:reference', contains, Mysql, instr

2013-01-22 Thread pablo . angulo
El lunes, 21 de enero de 2013 22:47:41 UTC+1, Massimo Di Pierro escribió: > > Now I understand the problem. You want to pass an expression where a value > is expected. I do not believe we can support this. INSTR does not solve the > problem because it would not be correct to looks for substring

[web2py] 'list:reference', contains, Mysql, instr

2013-01-21 Thread pablo . angulo
Hello: I was getting incorrect SQL from statements like: db(db.paper.authors.contains(person.id)).select() where db.define_table('paper', Field('title'), Field('authors', 'list:reference person'), ) so I rewrote dal.MySQLAdapter.CONTAINS from: def CONTAINS(self, first, s

[web2py] sqlite OperationalError: database is locked in a cron job

2011-05-23 Thread Pablo Angulo
Hello: I'm working on a cron job that must write to the database: is this allowed? I don't know if the following error is sqlite only: File "web2py/gluon/dal.py", line 4487, in insert return self._db._adapter.insert(self,self._listify(fields)) File "web2py/gluon/dal.py", line 772, in inser

[web2py] plugins for plugin_wiki

2011-05-09 Thread Pablo Angulo
Hello! I have written two extra plugins for plugin-wiki, one for using Gallery: http://galleria.aino.se/ and another for using videojs (html5 video with flash fallback): http://videojs.com/ Are you interested? Then how should I ship them: isolated or as a patch to plugin_wiki? They are ve