[web2py] Re: Need opinions/reviews about embedded jquery/javascript XHTML editor

2014-01-16 Thread Simon Ashley
Just to save you a little bit of time: def advanced_editor(field, value): return TEXTAREA(_id=str(field).replace('.', '_'), _name=field.name,_class ='text ckeditor', _contenteditable='true', _toolbarStartupExpanded='false' , value=XML(value), _cols=80)

[web2py] Re: Need opinions/reviews about embedded jquery/javascript XHTML editor

2014-01-16 Thread Annet
I am using CKeditor as well, mainly because its basic version suits my needs, and in case I need other features its easily extendible. Furthermore it really is WYSIWYG. In case of TinyMCE I had to write my own style sheet to make the editor match my application's styling. In the past I also

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
The value for dentista is correct, is equal to Nominativi.id selected in drop-down list. When I insert or update the record with 'logo' empty the query is generated with '' instead of NULL and sqlite cannot parse the full query. if I update with db.Consulenze.insert(dentista=1240) it woks.

[web2py] Re: upload e CASCADE delete

2014-01-16 Thread maurizio
Thanks Anthony, I think you're right, solution should be that after check ondelete='CASCADE' and check autodelete=True, default _before_delete erase the associated files in uploads folder. I posted an issue on Google Gode (n.1854). Maurizio Il giorno mercoledì 15 gennaio 2014

[web2py] DAL usage

2014-01-16 Thread Arnon Marcus
Our schema is quite large (200+ Tables) and changes very seldom. I was thinking, is there a way to not have to rebuild it in it's entierty on every request? I mean, is there a way to seperate-out the schema definition from the connection object? Ideally, I would put the schema definition code in

Re: [web2py] Re: javascript/openlayers example in web2py

2014-01-16 Thread Miguel Sánchez
Hi Manuele and other members, I ´m not a programmer, I come from the Human Sciences, but I´m mounting my social project in http://redhumus.org . I have a lot of issues yet. I have created the plugin_map in my application to manage gpx tracks from openstreetmaps. The deal is create an

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
I found the code in sqlhtml.py, the empty upload value is '' or default elif field.type == 'upload': f = self.vars[fieldname] fd = '%s__delete' % fieldname if f == '' or f is None: if self.vars.get(fd, False):

[web2py] Redis caching

2014-01-16 Thread Arnon Marcus
I noticed that the current implementation for web2py uses pickles. That is a design choice. There are pros and cons. Right off of my head, the biggest cons may be retricting cache-use to python, and performance penalties. When I think of all that redis can do, I can not help imagining a better

[web2py] web2py and PostgreSQL drivers

2014-01-16 Thread Jayadevan M
I was using pg8000 with web2py. Recently I installed psycopg2. But web2py is still using pg8000. What could be the reason? The script to start web2py in admin mode has the following - source /opt/python2.7/bin/activate which python python -V pip freeze /var/www/web2py/web2py.py -a password -p

[web2py] Re: web2py and PostgreSQL drivers

2014-01-16 Thread Jayadevan M
Looks like the import psycopg2 was failing in dal.py. I tried the command from command line (python) and got an error. I had installed PostgreSQL libraries in a non-default directory. The following fixed it - export LD_LIBRARY_PATH=/opt/pg/9.3/lib:/usr/local/lib On Thursday, January 16, 2014

[web2py] ultramemcache

2014-01-16 Thread Arnon Marcus
We are using gevent, and we want to use memcached (for now, before we upgrade web2py to a version that supports redis...) I've noticed that there is threading going on in the gluon.memcache package - would this work with gevent? This package is specifically meant for using memcached from a

[web2py] Re: crud form errors

2014-01-16 Thread sasogeek
How do I highlight the fields with errors though? like it appears in the tutorials? example please. On Wednesday, 15 January 2014 14:41:11 UTC, Anthony wrote: Error messages are in form.errors.fieldname (if it is None, there is no error for that field). On Wednesday, January 15, 2014

[web2py] Re: crud form errors

2014-01-16 Thread Anthony
It's up to you to code and style it as you like. Here's how web2py does it: https://github.com/web2py/web2py/blob/master/gluon/html.py#L1826. If you want it exactly as web2py does it, then just use form.custom.widget.fieldname instead of completely manual HTML. See

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Anthony
I cannot reproduce the problem. Can you pack and attach an app the exhibits the problem? On Thursday, January 16, 2014 3:23:24 AM UTC-5, Ivan Gazzola wrote: The value for dentista is correct, is equal to Nominativi.id selected in drop-down list. When I insert or update the record with

[web2py] Re: Need opinions/reviews about embedded jquery/javascript XHTML editor

2014-01-16 Thread Anthony
If you don't want to have to replicate web2py's automatic id and name attribute generation, you should also be able to do something like: def advanced_editor(field, value): return SQLFORM.widgets.text.widget(field, XML(value), _class='text ckeditor', _contenteditable='true',

[web2py] Upload file functionality

2014-01-16 Thread LaDarrius Stewart
I thought I was on the correct path with this can soemone tell me where this is going wrong? db.define_table('consumer', Field http://127.0.0.1:8000/examples/global/vars/Field('lname','string', requires=IS_NOT_EMPTY http://127.0.0.1:8000/examples/global/vars/IS_NOT_EMPTY()),

[web2py] Adrian and Jacob retiring as Django BDFLs

2014-01-16 Thread Michele Comitini
Not directly related to web2py. Django moves to full community mode. http://www.holovaty.com/writing/bdfls-retiring/ -- 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

[web2py] Re: Upload file functionality

2014-01-16 Thread LaDarrius Stewart
Looking at my custom retrieve file shouldnt the path be looking in here path = applications/facesheet/uploads On Thursday, January 16, 2014 10:25:21 AM UTC-6, LaDarrius Stewart wrote: I thought I was on the correct path with this can soemone tell me where this is going wrong?

[web2py] Re: Upload file functionality

2014-01-16 Thread Anthony
Where/how is this link generated: *http://127.0.0.1:8000/facesheet/default/upload/1/John/Smith/download/test3.docx http://127.0.0.1:8000/facesheet/default/upload/1/John/Smith/download/test3.docx* Why do you need the custom store and retrieve functions -- what's wrong with the built-in

[web2py] Re: Markmin components

2014-01-16 Thread Janko Strusa
How can I implement this in a view. I am not sure how to call that markmin action to be used instead of MARKMIN helper. Dana srijeda, 8. svibnja 2013. 17:23:24 UTC+2, korisnik Massimo Di Pierro napisao je: There is an official syntax for this. @{component:controller/function/args} To

[web2py] Re: Upload file functionality

2014-01-16 Thread LaDarrius Stewart
from the form2 in the upload method above is how the link is made and the custom store retrieve was from an example on the web there isnt many. But its like its not even using the custom retrieve cause why is looking there for the file. Is there and example of using the built in way? On

Re: [web2py] Re: Web2py Integration with Sentry

2014-01-16 Thread James Q
Great. I won't be able to get to this soon, but I assume the standard process: git clone, make change and make a pull request? -- james On Jan 15, 2014 12:17 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Always. :-) Rules are simple. I always take a patch if: 1) fixes a security

[web2py] Can I/how would I create a self-signed certificate using IIS?

2014-01-16 Thread Keith Planer
I'm trying to get remote admin working for my web2py server. I followed instructions from herehttp://www.howtogeek.com/107415/it-how-to-create-a-self-signed-security-ssl-certificate-and-deploy-it-to-client-machines/ which didn't work for me, I got Error opening metabse: 0x80040154 when I tried

[web2py] Re: Can I/how would I create a self-signed certificate using IIS?

2014-01-16 Thread Keith Planer
I understand this link might have some guidance for me, but the link is down: http://www.web2py.com/AlterEgo/default/show/140 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Upload file functionality

2014-01-16 Thread Anthony
On Thursday, January 16, 2014 12:29:11 PM UTC-5, LaDarrius Stewart wrote: from the form2 in the upload method above is how the link is made and the custom store retrieve was from an example on the web there isnt many. But its like its not even using the custom retrieve cause why is looking

Re: [web2py] Re: Bootstrap3 package - help to test

2014-01-16 Thread Richard Vézina
Seems pretty clean... I would need to use it to find issue though and I am still with w2p 2.4.7 for now waiting for the new rname feature to be available (and stable)... Also I build many autocompleting around bootstrap typeahead that is no longer part of bootstrap... So I have to refactor and use

[web2py] Caching of Modules

2014-01-16 Thread Mark Graves
I'm trying to import a local module into my application. I've got the following at the bottom of one of my model files: from gluon.custom_import import track_changes track_changes(True) It still appears to be caching the class definition. Has any of this code changed recently? Initially I

[web2py] Re: ultramemcache

2014-01-16 Thread Niphlod
no, you can't. But if you want to write your own and the api is compatible, just change the imports at the top and hope for the best. On Thursday, January 16, 2014 12:02:11 PM UTC+1, Arnon Marcus wrote: We are using gevent, and we want to use memcached (for now, before we upgrade web2py to a

Re: [web2py] Re: Can I/how would I create a self-signed certificate using IIS?

2014-01-16 Thread Richard Vézina
Except if you need SSL only for your own (as a developper) needs I suggest you to walk the extra miles and create your own CA and sign you SSL certificate then you then deploy CA througt GPO with AD and you will not be bother again about self-signed SSL certificate... The link here you refer too,

Re: [web2py] DAL usage

2014-01-16 Thread Richard Vézina
lazy_table supposed to do just that no? Richard On Thu, Jan 16, 2014 at 3:34 AM, Arnon Marcus a.m.mar...@gmail.com wrote: Our schema is quite large (200+ Tables) and changes very seldom. I was thinking, is there a way to not have to rebuild it in it's entierty on every request? I mean, is

[web2py] Re: Redis caching

2014-01-16 Thread Derek
Nope, nobody thought of it already. You should patent the idea! I say you should implement it. And while you are at it, add in an ORM and ZeroMQ. On Thursday, January 16, 2014 2:17:31 AM UTC-7, Arnon Marcus wrote: I noticed that the current implementation for web2py uses pickles. That is a

[web2py] Re: Writing Web2Py specification and finding free lance Web2Py coders

2014-01-16 Thread Derek
I suppose you could find people with skills by looking at the web2pyslices website and then send them emails. On Friday, January 10, 2014 2:59:10 AM UTC-7, Timothy Swieter wrote: I've got a couple web ideas I'd like to put into motion. Some work will be done by myself, other work I'd like

[web2py] Re: Redis caching

2014-01-16 Thread Niphlod
On Thursday, January 16, 2014 10:17:31 AM UTC+1, Arnon Marcus wrote: I noticed that the current implementation for web2py uses pickles. That is a design choice. There are pros and cons. Right off of my head, the biggest cons may be retricting cache-use to python, and performance penalties.

[web2py] Re: scheduler question

2014-01-16 Thread Niphlod
On Thursday, January 16, 2014 5:13:59 AM UTC+1, Jayadevan M wrote: A couple of questions about web2py scheduler - 1) I have configured web2py using nginx znd uwsgi on CentOS. These services will automatically restart if the server reboots. How can I ensure that web2py scheduler also

[web2py] Re: Important New Year News: Edison Award

2014-01-16 Thread Tim Richardson
web2py is now in the nominee showcase. As I write this, web2py is on page 20 of the nominee slide show. http://www.edisonawards.com/nomineegallery.php On Saturday, 4 January 2014 15:08:38 UTC+11, Massimo Di Pierro wrote: Web2py/me have been nominated for the Edison Award. Please wish web2py

[web2py] Re: DAL usage

2014-01-16 Thread Anthony
If you set DAL(..., lazy_tables=True), most of the table definition code is deferred until the first time you call db.tablename, so tables that are not accessed on a given request are not fully defined. Of course, you can put the schema definition code into a function or class in a module and

Re: [web2py] where can I find older versions ?

2014-01-16 Thread Stef Mientki
thanks ! that one is working. cheers, Stef On 15-01-14 22:10, Niphlod wrote: he's seeking the binary. https://code.google.com/p/web2py/issues/detail?id=1809 However, I still can't reproduce the issue. You can download the 2.8.2 version that is not giving the error here

[web2py] Re: DAL usage

2014-01-16 Thread Anthony
It sounds like instead, you would prefer for the module to create a table object so the table object can be imported directly (and then added to the DAL connection object of the current request) -- that way, the table object would be created only once, the first time it is imported. Of

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
Ok, i renamed the field logo in logo2 and all works fine... Rechecking the code I saw that I had defined in a previous version the field logo as reference. it is probably not deleted the foreign key in sqlite when I change the definition of the field from reference to upload thx Ivan Il

[web2py] using CAS

2014-01-16 Thread Robert Bjornson
Hi, I'm trying to use our university CAS server as the authentication for my web2py app. I am able to direct logins to CAS fine, by using this code in my model file: auth=Auth(db, cas_provider='https://securedev.its.yale.edu/cas') After completing the cas login, when I look at db.auth_user

Re: [web2py] Re: ultramemcache

2014-01-16 Thread Arnon Marcus
I was going to, but couldn't find it... In fact, I even ran a full text-search on the entire web2py stack, and found no import memcache anywhere (nor from memcache for that matter...) Which is extremely weird, as it actually does work with my memcached server... Hmm... I guess I must have missed

[web2py] Re: using CAS

2014-01-16 Thread Massimo Di Pierro
You can do if auth.user and not auth.user.first_name: pull them from ldap and store them in auth.user On Thursday, 16 January 2014 16:10:18 UTC-6, Robert Bjornson wrote: Hi, I'm trying to use our university CAS server as the authentication for my web2py app. I am able to

[web2py] Re: Redis caching

2014-01-16 Thread Arnon Marcus
Derek: Are you being sarcastic and mean? cache doesn't cache only resultsets, hence pickle is the only possible choice. Well, not if you only need flat and basic objects - there the benefit of pickle is mute and it's overhead is obvious - take a look at this project:

[web2py] Re: error class 'gluon.contrib.pypyodbc.ProgrammingError' ('', 'SQL_INVALID_HANDLE') when DAL is mssq

2014-01-16 Thread Josh Myers
I was also getting this same error and I thank Gianganh for his help in moving me along. Now, using the solution above, instead of getting the SQL_INVALID_HANDLE, I am getting the following: class 'pyodbc.Error' ('HY000', 'The driver did not supply an error!') Gianganh, did you also get this

[web2py] Re: using CAS

2014-01-16 Thread Robert Bjornson
Hi Massimo, Thanks for the reply. I'm still not certain the best place to do this. Is there a callback within the login processing where I can stick this code, or should I use _next in the CAS redirect to go to a controller that will do this? Thanks, Rob On Thursday, January 16, 2014

[web2py] Re: Redis caching

2014-01-16 Thread Anthony
What I had in mind is simpler than that - just have a bunch of simple queries that you would do in your cache.ram anyways, and instead have their raw result-set (before being parsed into rows objects) and cached as-is (almost...) Note, when you do .select(..., cache=...), it does in

[web2py] Re: DAL usage

2014-01-16 Thread Arnon Marcus
It sounds like instead, you would prefer for the module to create a table object so the table object can be imported directly (and then added to the DAL connection object of the current request) -- that way, the table object would be created only once, the first time it is imported.

[web2py] Re: How to add a column?

2014-01-16 Thread 黄祥
very detail and clear explaination with the examples, why not put this on the book on dal chapter? best regards, stifan -- 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: Important New Year News: Edison Award

2014-01-16 Thread Michele Comitini
Why didn't they put the logo instead of a random snapshot?? 2014/1/16 Tim Richardson t...@growthpath.com.au web2py is now in the nominee showcase. As I write this, web2py is on page 20 of the nominee slide show. http://www.edisonawards.com/nomineegallery.php On Saturday, 4 January 2014

[web2py] Re: DAL usage

2014-01-16 Thread Anthony
I don't know that needing to define a per-request readable/writable is such a common use-case - or else I don't fully understand what you are alluding to... Sometimes you want to show/hide particular fields in a form, grid, etc. depending on some condition, so you set the readable and

[web2py] Re: DAL usage

2014-01-16 Thread Anthony
In most ORMs/DALs there is a clear separation between the connection-object and the schema-object(s), and for good reason : schema-changes are few and far between - requests/connections are numerous and rapid - it makes no sense tying them together like that... It's a poor

[web2py] Re: DAL usage

2014-01-16 Thread Arnon Marcus
A database scema is a description of the structure of a database - it has nothing to do with requests. You are talking about a convinience-feature that could have been implemented differently - this coupling is convinient but makes no sense from a performance standpoint. I am looking for a way