Re: [web2py] Re: SQLite tables not recognised in web2py; even when web2py created them?

2013-02-08 Thread Alec Taylor
But I am creating a contrib for: https://github.com/web2py/web2py/tree/master/gluon/contrib/login_methods (OAuth2; my work-in-progress is on Github) But because of the design of the standard I require 3 additional tables + a user table. So how do you propose I manage this scenario? On Sat, Feb

Re: [web2py] Re: SQLite tables not recognised in web2py; even when web2py created them?

2013-02-08 Thread Bruno Rocha
Usually you create a "script" file in /models/db.py then you define your tables there, so when starting in shell mode you pass -M python web2py.py -S yourapp -M -M run the models/* files and defines your table as "object" for you to access. Every framework works in this way. Optionally, you can

Re: [web2py] Integrating iPhone device tokens into web2py auth

2013-02-08 Thread Alec Taylor
You'd probably be better off using OAuth2… On Fri, Feb 8, 2013 at 12:22 PM, chris_g wrote: > I'm looking into supporting Apple push notifications in an iPhone app that > connects to a web2py server. > In order to know which devices to push details to, web2py's auth module > would presumably need

Re: [web2py] Re: SQLite tables not recognised in web2py; even when web2py created them?

2013-02-08 Thread Alec Taylor
Hold up; you mean to tell me I need to redefine the schema each time a new db (DAL object) needs to access it? That sounds silly. Isn't there a way around this? On Saturday, February 9, 2013 4:40:28 PM UTC+11, Vasile Ermicioi wrote: > > let say you have table1 and table2 in database, > > you s

[web2py] Re: Book app

2013-02-08 Thread Massimo Di Pierro
https://github.com/mdipierro/web2py-book On Friday, 8 February 2013 23:51:57 UTC-6, Kenneth wrote: > > Hello, > > is the web2py online book app available as an appliance? > > I'd like to take a look for example on the database setup. > > > Kenneth > > -- --- You received this message because

[web2py] Book app

2013-02-08 Thread Kenneth
Hello, is the web2py online book app available as an appliance? I'd like to take a look for example on the database setup. Kenneth -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving email

[web2py] Re: Integrating iPhone device tokens into web2py auth

2013-02-08 Thread Massimo Di Pierro
I do not know how this works. Can you give us more details? On Friday, 8 February 2013 20:31:14 UTC-6, howesc wrote: > > i have millions of APNS tokens! i'd share, but they are tied to an app > > i did not tie APNS tokesn to web2py auth, but i added fields to my end > user table, and the devi

Re: [web2py] Re: SQLite tables not recognised in web2py; even when web2py created them?

2013-02-08 Thread Vasile Ermicioi
let say you have table1 and table2 in database, you shoud define your tables db.define_table('table1', ..) and only after that you will have access to db.table1 you can;t access db.table2 if it is not defined even if it exists in the database -- --- You received this message because you are

Re: [web2py] Re: SQLite tables not recognised in web2py; even when web2py created them?

2013-02-08 Thread Alec Taylor
On Sat, Feb 9, 2013 at 6:28 AM, Niphlod wrote: > dal has no introspection (i.e. it doesn't ask any "schema" information, nor > it tries to "calculate" it). > > until you define your tables (or do DAL(, auto_import=True)) DAL will > never know that a table exists. Unfortunately that didn't wor

[web2py] Re: Integrating iPhone device tokens into web2py auth

2013-02-08 Thread howesc
i have millions of APNS tokens! i'd share, but they are tied to an app i did not tie APNS tokesn to web2py auth, but i added fields to my end user table, and the device uses my REST JSON API to POST the APNS tokens to the server and update the user. we don't use the APNS token as any sort o

[web2py] Re: Include odbc and mssql support with pypyodbc.py

2013-02-08 Thread 江文
Massimo Di Pierro writes: > > > Thank you very much for your work. > > We plan to include pypyodbc.py (only this file) in web2py under contrib. > Would that be ok? Is the license mentioned in the file itself sufficient or should we ship a separate license file? > > MassimoOn Friday, 8 Febr

Re: [web2py] Star Rating

2013-02-08 Thread Bruno Rocha
https://github.com/mdipierro/web2py-recipes-source/blob/master/apps/04_advanced_forms/web2py.app.star_rating.w2p?raw=true On Fri, Feb 8, 2013 at 8:52 PM, Michael Gheith wrote: > Hello web2py community :) > > I'm trying to implement a simple star rating for my site. I followed the > steps in the

Re: [web2py] Re: Editing problem with current admin app

2013-02-08 Thread Nico Zanferrari
Thank you, Alec. I've just downloaded the source version from Github as;2.4.1 alpha.2 (2013-02-08 12:41:08)but I still have exactly the same problems with both Chrome and Firefox on Ubuntu. Am I doing something wrong? 2013/2/8 Alec Taylor > Nico: Try with the latest web2py (from github); I had

[web2py] Re: GAE deployment questions...from a total beginner!

2013-02-08 Thread Riccardo C
Thanks a lot for all these informations. It seems I have a lot to learn ;) On Wednesday, 6 February 2013 20:54:21 UTC, howesc wrote: > > Riccardo, > > some answers: > > - i "backup" the source code of my app by using HG or GIT. > - google offers data backup via google cloud storage. you can

[web2py] Re: How can I extend DAL for MySQL REGEXP?

2013-02-08 Thread Massimo Di Pierro
Yes. very soon. 1-2 weeks. On Friday, 8 February 2013 15:30:32 UTC-6, Tim Richardson wrote: > > this is good. Massimo, is a new stable release coming soon? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and

[web2py] Star Rating

2013-02-08 Thread Michael Gheith
Hello web2py community :) I'm trying to implement a simple star rating for my site. I followed the steps in the web2py Application Development Cookbook, but it is not working unfortunately; I select 2 stars for example, but it's not being saved to the database. I have taken a look at the star

Re: [web2py] db.executesql(..., as_dict=True) seem buggy

2013-02-08 Thread Brian M
What database are you using? Did it work prior to web2py 2.3.2? The dict keys (field names) are retrieved from the cursor.description provided by the database driver so I suppose it is possible that your driver is changing the case - web2py shouldn't be affecting the case though. I use execut

[web2py] Re: uploading a picture through SQLFORM.factory?

2013-02-08 Thread Dragan Matic
Thank you Sir. The information about table and file names was the key information for a problem than I was trying to solve for a week and I couldn't find it in the book. You have just saved my day. Dragan On Friday, February 8, 2013 2:41:51 PM UTC+1, Anthony wrote: > > The download() function

[web2py] Re: How can I extend DAL for MySQL REGEXP?

2013-02-08 Thread Tim Richardson
this is good. Massimo, is a new stable release coming soon? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more o

[web2py] reCaptcha in registration form with custom layout

2013-02-08 Thread Daniel Garcia
Hello everyone, I'm trying to use reCaptcha in the registration form with a custom layout. I added the reCaptcha functionality using * auth.settings.register_captcha = Recaptcha(request, RECAPTCHA_PUBLIC_KEY,RECAPTCHA_PRIVATE_KEY , ...) *and it works perfectly when using the default table layout

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread rif
I'd love to work on it again :) vineri, 8 februarie 2013, 22:05:41 UTC+2, rif a scris: > > At the time when it was announced there were not many feature suggestions. > However if many users find it useful we will find a better place for it. > > -rif > > vineri, 8 februarie 2013, 20:34:00 UTC+2, R

[web2py] db.executesql(..., as_dict=True) seem buggy

2013-02-08 Thread Richard
Hello, Consider this : db.executesql("SELECT field1 AS Field1 FROM table1", as_dict = True) Where field1 have been capitalize ("AS Field1")... But the dicts keys are all small cap... At least under web2py 2.3.2 Richard -- --- You received this message because you are subscribed to the Goo

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread rif
At the time when it was announced there were not many feature suggestions. However if many users find it useful we will find a better place for it. -rif vineri, 8 februarie 2013, 20:34:00 UTC+2, Ramos a scris: > > Also why is this not the default admin? > > > > 2013/2/8 António Ramos > > >> Why

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread rif
Yes, AFAIK it was never tested on windows. -rif vineri, 8 februarie 2013, 21:38:11 UTC+2, Derek a scris: > > It shouldn't be the default because it doesn't work for everyone (at > least, it doesn't work for me) > > ('42000', "[42000] [Microsoft][ODBC SQL > Server Driver][SQL Server]Introducing

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread Bruno Rocha
It needs more tests and contributions... OPen an issue on github and I am sure we can solve this.. On Fri, Feb 8, 2013 at 5:38 PM, Derek wrote: > It shouldn't be the default because it doesn't work for everyone (at > least, it doesn't work for me) > > ('42000', "[42000] [Microsoft][ODBC SQL >

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread Derek
It shouldn't be the default because it doesn't work for everyone (at least, it doesn't work for me) ('42000', "[42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Introducing FOREIGN KEY constraint 'plugin_web2admin_history_modified_by__constraint' on table 'plugin_web2admin_history' may c

[web2py] Re: Routing to different web2py apps in pythonanywhere

2013-02-08 Thread Jim S
Thanks Massimo. Since I'm wsgi illiterate I'll try it with routes.py. My skills aren't much in this area but I'll give it a try and see what I can come up with. -Jim On Friday, February 8, 2013 12:54:08 PM UTC-6, Massimo Di Pierro wrote: > > I just talked to them about this. If you have multi

[web2py] Re: SQLite tables not recognised in web2py; even when web2py created them?

2013-02-08 Thread Niphlod
dal has no introspection (i.e. it doesn't ask any "schema" information, nor it tries to "calculate" it). until you define your tables (or do DAL(, auto_import=True)) DAL will never know that a table exists. On Friday, February 8, 2013 5:14:22 PM UTC+1, Alec Taylor wrote: > > Fully self con

Re: [web2py] python petl connect directly with postgres througth psycopg2

2013-02-08 Thread Richard Vézina
Forget about that, I can just do : table1 = fromdicts(db.executesql('select * from table1', as_dict=True)) look(table1) Bingo! The only drawback I think is that the column with never be in the same order, but it is a detail since I can reorder easilly with petl... Richard On Fri, Feb 8, 2013 a

[web2py] Re: Login page Optimizations - barest form of web2py

2013-02-08 Thread Niphlod
if auth.user_id . On Friday, February 8, 2013 6:52:13 PM UTC+1, Abhishek Gupta wrote: > > Hi, > > I have a website running on web2py. I want to optimize the login page, and > strip all the web2py functional but to see if the user is logged in or not. > To explain more, I want to do following: >

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread Bruno Rocha
I already suggested in a ticket => https://code.google.com/p/web2py/issues/detail?id=1103 -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr..

Re: [web2py] python petl connect directly with postgres througth psycopg2

2013-02-08 Thread Richard Vézina
Let petl fromdb() do it works as formatting raw SQL output for petl process and avoid writting a custom parser for that. I thought I could just wrote a new fromdb() that use db.executesql() as input. Richard On Fri, Feb 8, 2013 at 1:55 PM, Ovidio Marinho wrote: > the reason to use it and not u

[web2py] Re: How can I extend DAL for MySQL REGEXP?

2013-02-08 Thread Massimo Di Pierro
I just added it. Please give it a try. On Friday, 8 February 2013 09:45:39 UTC-6, Alexander Z. wrote: > > Hello. > > I need to use REGEXP conditions in MySQL. Is any way, how can I > override/extend DAL's MySQLAdapter to use REGEXP? > -- --- You received this message because you are subscribe

[web2py] Re: Include odbc and mssql support with pypyodbc.py

2013-02-08 Thread Massimo Di Pierro
Thank you very much for your work. We plan to include pypyodbc.py (only this file) in web2py under contrib. Would that be ok? Is the license mentioned in the file itself sufficient or should we ship a separate license file? Massimo On Friday, 8 February 2013 08:03:06 UTC-6, 江文 wrote: > > Massi

Re: [web2py] python petl connect directly with postgres througth psycopg2

2013-02-08 Thread Ovidio Marinho
the reason to use it and not use the default connection? Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi 83 9336 3782 - Cla

[web2py] Re: Routing to different web2py apps in pythonanywhere

2013-02-08 Thread Massimo Di Pierro
I just talked to them about this. If you have multiple web2py instances you can have multiple wsgi config files pointing different domains to the different apps. I do not like this solution very much. You can indeed use routes. Perhaps we can add a feature to web2py so that instead of using rou

[web2py] Re: 2.2.1 auth.wiki() automatically adds users to wiki_editor group. Bug or feature?

2013-02-08 Thread Massimo Di Pierro
All apps are separate and they do not talk to each other by default, except that the wiki asks admin if the current user is the administrator. On Friday, 8 February 2013 06:28:44 UTC-6, Michael Beller wrote: > > Thank you! That was it. > > I was testing using multiple tabs within one browser. I

[web2py] Re: Image store with open does not work on GAE

2013-02-08 Thread Massimo Di Pierro
Definitively it will be fixed. It is in the todo list. I opened a ticket about it. :-) On Friday, 8 February 2013 05:18:38 UTC-6, Sebastian Cambeo wrote: > > So is there any hope that this can be fixed? Maybe you can rely on my > workaround as posted above: > > file = open('test.jpg', 'rb') >> t

[web2py] Re: Еrror opening tabs Errors when in browser lenguage is russian

2013-02-08 Thread Massimo Di Pierro
This has laready been fixed in trunk. in you applications/admin/languages/ru.py there is a %(app)" that should be %(app)s" On Friday, 8 February 2013 00:54:17 UTC-6, Emilius Omeen wrote: > > I wanna inform about errors which occur then try to see errors report pagein > attachment full error pag

[web2py] Re: negative ID values in the ID field break use of format in SQLFORM.grid

2013-02-08 Thread Massimo Di Pierro
Just pushed a change in trunk that may fix it. Can you check? On Friday, 8 February 2013 00:41:35 UTC-6, Tim Richardson wrote: > > Using 2.3.2 with MSQL, I have a table T1 where the primary key is ID > (migrate=false) > Most values have ID > 0 but I have two special cases where the ID is < 0 > T

Re: [web2py] Re: how to support video in an app

2013-02-08 Thread Massimo Di Pierro
You don't. If the video is embedded automatically, than you can only control width and size using CSS. On Thursday, 7 February 2013 14:04:13 UTC-6, Tito Garrido wrote: > > How to set the width and height of the embed video using expand_one? > > > On Sat, Feb 2, 2013 at 12:00 AM, Massimo Di Pierr

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread António Ramos
Also why is this not the default admin? 2013/2/8 António Ramos > Why isn't this refered in web2py.com > > > > > 2013/2/8 Bruno Rocha > >> Use this one => https://github.com/rif/web2admin >> >> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "web

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread António Ramos
Why isn't this refered in web2py.com 2013/2/8 Bruno Rocha > Use this one => https://github.com/rif/web2admin > > -- > > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread Bruno Rocha
Use this one => https://github.com/rif/web2admin -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, vis

[web2py] web2py admin2 is DEAD?

2013-02-08 Thread António Ramos
is this dead? http://sramana.in/web2py-appadmin2/ The demo is not working and the code is 2 years old. Thank you -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an em

[web2py] Login page Optimizations - barest form of web2py

2013-02-08 Thread Abhishek Gupta
Hi, I have a website running on web2py. I want to optimize the login page, and strip all the web2py functional but to see if the user is logged in or not. To explain more, I want to do following: if user.is_logged_in_custom(): return my_html else: redirect to_some_other_page The idea is t

Re: [web2py] Re: Editing problem with current admin app

2013-02-08 Thread Alec Taylor
Nico: Try with the latest web2py (from github); I had that same problem you mentioned 'till I upgraded On Sat, Feb 9, 2013 at 3:11 AM, Nico Zanferrari wrote: > I wish I could, but unfortunately I don't have any CSS knowledge ;-(( But > I'll be happy to help with testing and debugging, if needed

[web2py] Re: SQLite tables not recognised in web2py; even when web2py created them?

2013-02-08 Thread Alec Taylor
Fully self contained example: >web2py.py -p 80 -S myapp2 web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2013 Version 2.4.1-alpha.2+timestamp.2013.02.07.05.36.19 Database drivers available: SQLite(sqlite3), MySQL(pymysql), PostgreSQL(pg8000), Oracle(cx_Oracle), MongoDB(pymongo),

Re: [web2py] Re: Editing problem with current admin app

2013-02-08 Thread Nico Zanferrari
I wish I could, but unfortunately I don't have any CSS knowledge ;-(( But I'll be happy to help with testing and debugging, if needed. Nico 2013/2/7 Massimo Di Pierro > Can you help us fix the css? > > > On Wednesday, 6 February 2013 15:14:40 UTC-6, Nico Zanferrari wrote: >> >> Hi, >> >> I r

[web2py] Re: .delete()

2013-02-08 Thread Annet
Hi Anthony, Thanks for your reply. It should just return 0 (indicating that 0 records were deleted). In that case I don't have to check db(db.eventList.nodeID==id) on emptyness before calling .delete() Best regards, Annet -- --- You received this message because you are subscribed to the

[web2py] SQLite tables not recognised in web2py; even when web2py created them?

2013-02-08 Thread Alec Taylor
Experiencing some very strange errors on the latest web2py (2.4.1-alpha.2+timestamp.2013.02.07.05.36.19). In my 'myapp2' application I have created a database, defined as follows: db = DAL('sqlite://mydb2.sqlite', pool_size=1, check_reserved=['all']) Now I defined some tables and inserted some d

[web2py] How can I extend DAL for MySQL REGEXP?

2013-02-08 Thread Alexander Z.
Hello. I need to use REGEXP conditions in MySQL. Is any way, how can I override/extend DAL's MySQLAdapter to use REGEXP? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, se

[web2py] Re: How to dont show seconds in a time field

2013-02-08 Thread Annet
Hi Denes, to make the widget safer we could do: > > timewidget=lambda field,value: TAG[''](SQLFORM.widgets.time.widget(field, > value.strftime('%H:%M') if hasattr(value,'strftime') else '', > _class='mytime'),script) > Thanks, this solves the problem of getting an error ticket when the user en

[web2py] Re: 'Morsel' object has no attribute 'split' ?

2013-02-08 Thread Leonel Câmara
Hey web2py_tn, I don't know if you still need this but I recently battled this problem myself and here is a solution I'd like to leave here so others don't need to battle with this too. If you're using the web2py_multiauth first apply this patch: http://code.google.com/p/cfhowes/issues/detail?

[web2py] python petl connect directly with postgres througth psycopg2

2013-02-08 Thread Richard
Hello, I would know if there is any issue that could happen if I connect directly to the database with psycopg2... Something like this in modules : import psycopg2 from petl import * connection = psycopg2.connect("dbname='db' user='user' password='pwd' host='localhost'") table1 = fromdb(connec

[web2py] Re: Include odbc and mssql support with pypyodbc.py

2013-02-08 Thread 江文
Massimo Di Pierro writes: > > > What you are telling me is that pypyodbc does not require additional python packages but it requires odbc. > > Hi, I'm the maintainer of pypyodbc. I noticed you meet the library loading problem and I re-looked at the code, and I uploaded a patch that will

[web2py] Re: uploading a picture through SQLFORM.factory?

2013-02-08 Thread Anthony
The download() function calls response.download() to find and serve the file, and response.download() gets the database table and field names from the filename in the URL. SQLFORM.factory works by creating a dummy DAL instance with a dummy DAL Table, and by default it names that table "no_table

[web2py] Routing to different web2py apps in pythonanywhere

2013-02-08 Thread Jim S
Hi Just got started with PythonAnywhere. I have multiple web2py apps I'd like to host there under the same web2py instance. However, I want different domain names to point to them. Can I use the web2py routes.py to do that, or is there a better way to handle it with pythonanywhere. Their su

Re: [web2py] Re: Auth with Wordpress

2013-02-08 Thread Kenneth Lundström
Yes, that could be the solution. Atleast as this only a temporary (I really, really hope so) way of doing this. Thank you. Kenneth I guess you could have wordpress set a cookie of some sort if they have access, and then use that cookie in web2py to control access. On Thursday, February 7,

[web2py] Re: 2.2.1 auth.wiki() automatically adds users to wiki_editor group. Bug or feature?

2013-02-08 Thread Michael Beller
Thank you! That was it. I was testing using multiple tabs within one browser. I was logged into admin on one tab and was testing using another tab (using multiple accounts with different group memberships). I assumed that since they were different applications that would be ok. This raises

[web2py] uploading a picture through SQLFORM.factory?

2013-02-08 Thread Dragan Matic
Here is a model table for holding picture names: db.define_table('mypictures', Field('description', 'string'), Field('mypicture', 'upload')) If I try to upload a picture through simple SQLFORM everything works ok, picture is renamed to something like 'mypictures.mypicture.be0ff92956b81

[web2py] Re: Image store with open does not work on GAE

2013-02-08 Thread Sebastian Cambeo
So is there any hope that this can be fixed? Maybe you can rely on my workaround as posted above: file = open('test.jpg', 'rb') > tmpId = db.table1.insert(image = file) > if request.env.web2py_runtime_gae: > db(db.table1.id==tmpId).update(image_blob = file.read()) > > -- --- You received

[web2py] Re: Minimum period in web2py Scheduler

2013-02-08 Thread Niphlod
scheduler is not meant to run a periodic task every second. That being said, if you want it more reactive you should lower the heartbeat (default=3 seconds) . Mind that tasks gets assigned every 5 loops, so if heartbeat=1 sec you'll get ~5 seconds period. If you need to run something every second