[web2py] Re: Learning Management System survey

2014-01-09 Thread Jesus Alvaro
Any news on progress? El sábado, 8 de enero de 2011 22:40:01 UTC+1, Anthony escribió: Looks like there's a lot of dissatisfaction with Blackboard (and Moodle): http://www.reddit.com/r/programming/comments/eye4y/shame_on_you_blackboard/ -- Resources: - http://web2py.com -

[web2py] Re: Learning Management System survey

2014-01-09 Thread Alan Etkin
Any news on progress? Check Pyodel http://code.google.com/p/pyodel There's a working prototype available and an online demo at http://pyodel.appspot.com -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Web2py Integration with Sentry

2014-01-09 Thread James Q
Interesting. I have never written wsgi middleware, any pointers on that? As middleware, I would still need to have an understanding of how to detect if an exception has been logged in the request, no? Thanks! -- J On Tuesday, January 7, 2014 8:24:14 PM UTC-5, Derek wrote: I haven't, but

[web2py] Sqllite Database backup and recover

2014-01-09 Thread Sharjeel Ali Shaukat
I want to make backup of storage.sqllite database let say backstorage.sqllite then i want to fill new database tables with backup database insert values from backupdatabase to new database ur help is required -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Hi there Web2ppy noob here

2014-01-09 Thread kartik murthy
I am tryin to build a web app where in i will be using the app to store some data info about electrical units consumed. I have three tables viz. dept,meter and reading. The problem here is i wrote a function in the default.py for the table meter where in the dept_id is a FK referencing id of

[web2py] syntax error in code

2014-01-09 Thread kartik murthy
Hi there, I am building an app to store electrical consumption data . I have build a database which include three tabled dept,meter and reading. THe problem that i have encountered is with the syntax in the following code: def reg_meter(): form = SQLFORM.factory(

[web2py] Re: Hi there Web2ppy noob here

2014-01-09 Thread Alan Etkin
form = SQLFORM.factory( Field('meter_num',requires=IS_IN_DB(db,db.meter)), Field('meter_type',requires=IS_IN_DB(db,db.meter)), Field('dept_id',requires=IS_IN_DB(db,db.dept.id,'%(dept_id)s')) You have missed the closing parenthesis for the .factory method. -- Resources: -

[web2py] Migrating a hude database from Spring to web2py

2014-01-09 Thread Tushar Tuteja
I have a J2EE application and a database which has 200 tables in it. I want to develop a new application using web2py, which would use only 5 tables. I want to know how should I go about it. As I am not clear about how I would use database without mapping all the 200 tables which is a huge task.

Re: [web2py] syntax error in code

2014-01-09 Thread Federico Ferraro
form.process().accepted: El ene 9, 2014 7:00 a.m., kartik murthy 619.kar...@gmail.com escribió: Hi there, I am building an app to store electrical consumption data . I have build a database which include three tabled dept,meter and reading. THe problem that i have encountered is

Re: [web2py] Migrating a hude database from Spring to web2py

2014-01-09 Thread Michele Comitini
Instantiate the DAL with fake_migrate=True, migrate=False,migrate_enable=False Define the tables with only the fields you are going to need in a model file. This is going to create the metadata needed by web2py without touching your legacy database schema. 2014/1/9 Tushar Tuteja

Re: [web2py] syntax error in code

2014-01-09 Thread Rob Mayhue
It looks like you are missing the closing ')' on the entered.update_record line. If that doesn't fix it please include the error message that you are getting. On Thursday, January 9, 2014 6:00:52 AM UTC-5, Federico Ferraro wrote: form.process().accepted: El ene 9, 2014 7:00 a.m., kartik

[web2py] Re: GAE: insert using key_name

2014-01-09 Thread Alan Etkin
How about adding support in dal.py for the following: # processes the field input and add defaults, computes, etc. (does not make actual insertion). values = db._insert(spam=alot, ...) {spam: alot, ...} I made a pr about supporting _insert for processing values without applying

[web2py] Re: ckeditor in appadmin

2014-01-09 Thread Michel Hayek
Thanks Steve Worked well. -- *This e-mail is confidential and may also be privileged. If you are not the intended **recipient, please notify the sender immediately, delete it from your system and do **not copy, disseminate, distribute or disclose any information contained therein.* --

Re: [web2py] Migrating a hude database from Spring to web2py

2014-01-09 Thread Paolo Valleri
Mind that DAL should be instantiated with fake_migrate_all; run your app once, then you can set it to false. This operation will create several files (one for each defined table) in the app/databases/ directory moreover, do you need to alter the 5 tables you mentioned? Paolo On Thursday,

Re: [web2py] Migrating a hude database from Spring to web2py

2014-01-09 Thread Tushar Tuteja
No, I don't want to alter the 5 tables schema. But I want to perform CRUD operations. And it would be great if somehow I can restrict web2py from altering table schemas all together as a J2EE application is running on the same the DB and DB is a remote DB. thanks, Tushar Tuteja On 9 January 2014

Re: [web2py] Migrating a hude database from Spring to web2py

2014-01-09 Thread paolo.vall...@gmail.com
Then set the three variables Michele mentioned to false directly, it is not necessary to create any metadata, the following code snippet print the station name from a remote database (vpn address), the powerful thing is that the table station has several fields but I defined only once :) db =

Re: [web2py] Migrating a hude database from Spring to web2py

2014-01-09 Thread Anthony
Note, it is not necessary to bother with migrate=False if you are setting migrate_enabled=False -- the latter will prevent all migrations (the former is simply used to set the default value of the migrate argument for each .define_table in case it is not explicitly set, but that is ignored when

[web2py] Re: REF: DAL Catching errors

2014-01-09 Thread Anthony
try: db.test.insert(...) except IntegrityError: [return friendly error message] Of course, if the inserts are done via form submission, you should instead add an IS_NOT_IN_DB validator, in which case, it will automatically check for duplicates and return the appropriate error message.

[web2py] Re: Web2py Integration with Sentry

2014-01-09 Thread Massimo Di Pierro
The problem is that it would not work. you can have exceptions at two levels: web2py apps, web2py itself. In other frameworks these two levels are mixed up so sentry will catch either exceptions. In web2py the two levels are well separated and web2py catches app exceptions before they

[web2py] Re: !! NEW ADMIN !!

2014-01-09 Thread Jayadevan M
Hello, How can I 'install' the plugin? On Tuesday, January 7, 2014 2:49:54 AM UTC+5:30, samuel bonill wrote: https://lh6.googleusercontent.com/m1SF59SEqKdRRSBdoT-_LLsbS0hFlfsO_orZ-fU5KKs=w800-h450Admin Plus(A-Plus) is a web2py plugin that provides an easy-to-use interface for managing

[web2py] Re: REF: update_or_insert() confirming update

2014-01-09 Thread Massimo Di Pierro
update_or_insert returns the id of the new record or None if existing record was updated. On Thursday, 9 January 2014 00:23:49 UTC-6, software.ted wrote: wanted to find out how to confirm that an update really took place when using update_or_insert(), insert atleast returns the auto id but

[web2py] Re: Learning Management System survey

2014-01-09 Thread Massimo Di Pierro
I have something coming up soon. On Thursday, 9 January 2014 03:47:35 UTC-6, Jesus Alvaro wrote: Any news on progress? El sábado, 8 de enero de 2011 22:40:01 UTC+1, Anthony escribió: Looks like there's a lot of dissatisfaction with Blackboard (and Moodle):

Re: [web2py] Re: !! NEW ADMIN !!

2014-01-09 Thread samuel bonill
Hello, How can I 'install' the plugin? link : http://web2py.com/books/default/chapter/29/12/components-and-plugins#Plugins -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: REF: update_or_insert() confirming update

2014-01-09 Thread Anthony
If it doesn't return an id, that means no new insert was done, which means it did find a matching record and therefore updated it. Whether or not any fields in the matching record were actually changed depends on your inputs. Note, if more than one record matches the criteria, it will only

Re: [web2py] Re: intercept closing session

2014-01-09 Thread Giuseppe D'Amico
I have to create the database, using the same model for every user it is not safe, so I use the session_id as name file for the model, I need to intercept when a user's session ends, to delete its model 2014/1/8 Anthony abasta...@gmail.com On Wednesday, January 8, 2014 1:48:28 AM UTC-5,

Re: [web2py] Re: intercept closing session

2014-01-09 Thread Anthony
On Thursday, January 9, 2014 10:02:23 AM UTC-5, Giuseppe D'Amico wrote: I have to create the database, using the same model for every user it is not safe, so I use the session_id as name file for the model, I need to intercept when a user's session ends, to delete its model It's not

[web2py] Re: Learning Management System survey

2014-01-09 Thread Rod Watkins
Excellent. I was not even aware of this thread, but its potential is great. Rod On Thursday, January 9, 2014 6:30:25 AM UTC-8, Massimo Di Pierro wrote: I have something coming up soon. On Thursday, 9 January 2014 03:47:35 UTC-6, Jesus Alvaro wrote: Any news on progress? El sábado, 8 de

Re: [web2py] Re: REF: DAL Catching errors

2014-01-09 Thread Teddy Nyambe
Thanx Anthony, I will use [try] On 9 Jan 2014 15:52, Anthony abasta...@gmail.com wrote: try: db.test.insert(...) except IntegrityError: [return friendly error message] Of course, if the inserts are done via form submission, you should instead add an IS_NOT_IN_DB validator, in

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-09 Thread Calvin Morrison
Brando, Thanks for working this out! it would be good to make a web2py slice or add it to the documentation/ examples Calvin On 8 January 2014 14:35, Brando bhe...@trustcc.com wrote: This works, added the requires statement for form validation: def submit(): import datetime form =

[web2py] Re: GAE: insert using key_name

2014-01-09 Thread Quint
Excellent! I already included it to try it out but how do i use it? When I use your example I get: AttributeError: 'DAL' object has no attribute '_insert' (obviously because there is no _select() in DAL) When i try: db._adapter._insert(props) I get: File

[web2py] Re: GAE: insert using key_name

2014-01-09 Thread Quint
Please Ignore that. I got it. Works great! On Thursday, January 9, 2014 7:21:45 PM UTC+1, Quint wrote: Excellent! I already included it to try it out but how do i use it? When I use your example I get: AttributeError: 'DAL' object has no attribute '_insert' (obviously because there is

[web2py] Re: Learning Management System survey

2014-01-09 Thread Jesus Alvaro
Good News! I am really interested. Thanks El jueves, 9 de enero de 2014 16:42:54 UTC+1, Rod Watkins escribió: Excellent. I was not even aware of this thread, but its potential is great. Rod On Thursday, January 9, 2014 6:30:25 AM UTC-8, Massimo Di Pierro wrote: I have something coming up

[web2py] Re: auth.enable_record_versioning

2014-01-09 Thread Niphlod
make your own versioning with database callbacks. http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#before-and-after-callbacks That way you can customize to whatever degree you like what happens when a row gets deleted/updated/inserted at any step. On Thursday,

[web2py] Re: Best practices with sessions

2014-01-09 Thread Niphlod
On Wednesday, January 8, 2014 10:41:49 PM UTC+1, Wonton wrote: Hello everyone, I'm trying to implement the web2py recipes to improve the efficiency and security of my backend. I'm beggining with sessions and I have a couple of doubts: - My site is over SSL and has user authentication,

[web2py] Re: Scheduler repeat time drift

2014-01-09 Thread Niphlod
okkey.then let me check the code and report back On Wednesday, January 8, 2014 10:14:45 PM UTC+1, Brian M wrote: I've got it scheduled to repeat every 86400 seconds (24*60*60) so once a day. I thought that it was supposed to keep the same start time like the book says but it has

[web2py] Re: Scheduler repeat time drift

2014-01-09 Thread Niphlod
ok, got the issue. We check for last_run_time and add n = period seconds to it, that is different from what you'd like, i.e. adding n = period seconds * times_run to start_time. The wording in the book is correct: you get your task queued to be executed n period seconds after the first

[web2py] Re: GAE: insert using key_name

2014-01-09 Thread Alan Etkin
Works great! On Thursday, January 9, 2014 7:21:45 PM UTC+1, Quint wrote: Excellent! I already included it to try it out but how do i use it? Your message is confusing, does it work or it does not? It worked for my environment (recent release of gae sdk and development server)

[web2py] Re: GAE: insert using key_name

2014-01-09 Thread Quint
Sorry for the confussion.. But it works fine. I will definitally use this. (I posted something stupid and removed the stupid post but left some traces. ;-)) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] incomplete format error when trying to insert ids

2014-01-09 Thread Apple Mason
My many-to-many table is throwing an error every time I access that table in the admin page: type 'exceptions.ValueError' incomplete format Traceback (most recent call last): File /home/apl/Desktop/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File

[web2py] Give ID/class to custom form field

2014-01-09 Thread Ruud Schroen
{{=login.custom.begin}} {{=login.custom.email}} {{=login.custom.password}} {{=login.custom.submit}} {{=login.custom.end}} How do i give the custom email, password and submit an ID/class? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Set Field Type Dynamically

2014-01-09 Thread MVolpes
Awesome thanks!!! I know have a light weight but full featured grid! -- 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

[web2py] Re: incomplete format error when trying to insert ids

2014-01-09 Thread Apple Mason
Nevermind, I figured it out. My format string was wrong. After fixing that, everything works. On Thursday, January 9, 2014 4:42:01 PM UTC-5, Apple Mason wrote: My many-to-many table is throwing an error every time I access that table in the admin page: type 'exceptions.ValueError'

[web2py] Re: GAE: insert using key_name

2014-01-09 Thread Alan Etkin
But it works fine. I will definitally use this. Ok. If you can, it would be useful if you could share your tests about supported features for records lacking id values and any issue you find with setters and getters using key names. Note that the Rows class supports defining objects using

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-09 Thread Brando
Calvin, I have a few other things I want to work out, but I'm going to start a new thread with a more relevant title. On Thursday, January 9, 2014 10:10:04 AM UTC-8, Calvin Morrison wrote: Brando, Thanks for working this out! it would be good to make a web2py slice or add it to the

[web2py] Multiple File Upload Form Works! - Need Help with validation for multiple files

2014-01-09 Thread Brando
Thanks to Calvin Morrison's excellent work here is a really simple solution to uploading multiple items. I need help validating multiple files. I can upload one .txt file without issue; however, if i choose more than one it will not pass validation. Can someone tell me what kind of loop or

Re: [web2py] Re: REF: update_or_insert() confirming update

2014-01-09 Thread Teddy Nyambe
Noted, thanx! On 9 Jan 2014 16:52, Anthony abasta...@gmail.com wrote: If it doesn't return an id, that means no new insert was done, which means it did find a matching record and therefore updated it. Whether or not any fields in the matching record were actually changed depends on your inputs.

Error with virtual field (was: Re: [web2py] [ANN] Started development on web2admin)

2014-01-09 Thread Manuele Pesenti
Il 10/09/12 15:49, rif ha scritto: I started the development of a new django-like admin interface. You can find it here: https://github.com/rif/web2admin It is very basic but still usable because it uses SQLFORM.smartgrid. I am announcing it early because I need your feedback and feature

[web2py] Translatable string inside jquery selector

2014-01-09 Thread Ruud Schroen
I have a translatable string inside a jquery selector. I properly escaped the single quotes cause i don't get an error from jquery. $(#resultemail).removeClass().addClass('error').text('{{=T(Sorry, we don\\'t know you...)}}').fadeTo(900,1); But the string is not showing up in my language

[web2py] Re: Give ID/class to custom form field

2014-01-09 Thread Anthony
login.custom.email['_class'] = 'myclass' etc. On Thursday, January 9, 2014 4:42:20 PM UTC-5, Ruud Schroen wrote: {{=login.custom.begin}} {{=login.custom.email}} {{=login.custom.password}} {{=login.custom.submit}} {{=login.custom.end}} How do i give the custom email, password and

[web2py] Scheduler: Error retrieving status?

2014-01-09 Thread User
I'm just getting started with the scheduler and I'm getting an error when I start it on windows 7: C:\www\web2pypython web2py.py -K my_app web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2014 Version 2.8.2-stable+timestamp.2013.12.09.17.54.55 Database drivers available:

[web2py] Re: Translatable string inside jquery selector

2014-01-09 Thread weheh
I believe you will have to execute the jquery selector at least once before your string will appear in the language file. On Friday, January 10, 2014 7:31:40 AM UTC+8, Ruud Schroen wrote: I have a translatable string inside a jquery selector. I properly escaped the single quotes cause i

[web2py] Re: Translatable string inside jquery selector

2014-01-09 Thread Anthony
In what view file is that line, and has that view file been executed since adding that line? On Thursday, January 9, 2014 6:31:40 PM UTC-5, Ruud Schroen wrote: I have a translatable string inside a jquery selector. I properly escaped the single quotes cause i don't get an error from jquery.

[web2py] Re: auth.enable_record_versioning

2014-01-09 Thread Jayadevan M
Great. You guys have thought about everything, huh? :) On Friday, January 10, 2014 1:50:36 AM UTC+5:30, Niphlod wrote: make your own versioning with database callbacks. http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#before-and-after-callbacks That way you can

[web2py] DAL auth_user usage problem

2014-01-09 Thread Alexey Khramtsov
Hello! I'm trying to use the current user with DAL. db.define_table('tickets', Field('title', required=IS_NOT_EMPTY, label='ticket_title'), Field('description', 'text', required=IS_NOT_EMPTY, label='ticket_description'), Field('created_by', 'reference auth_user'),

[web2py] Re: !! NEW ADMIN !!

2014-01-09 Thread Jayadevan M
Hi, I tried this in my 'test' app which has just 2 tables (blog_post, emp). It worked great. Thanks. When I try in this my actual app with 50+ tables, the list of tables displayed in

[web2py] Re: Learning Management System survey

2014-01-09 Thread weheh
I missed this thread when it first came out. It would be interesting to have this as a plugin of sorts for web2py, maybe like grid. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: Translatable string inside jquery selector

2014-01-09 Thread Ruud Schroen
In layout.html, and yes it has been executed several times. I even tried putting it outside the jquery and executing it, still no luck.. On Fri, Jan 10, 2014 at 4:42 AM, Anthony abasta...@gmail.com wrote: In what view file is that line, and has that view file been executed since adding that