[web2py] web2py code generating its templates to that of an MVC JavaScript framework?

2013-09-14 Thread Alec Taylor
[though their devs may start providing patches] Thanks for your consideration, Alec Taylor -- 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

Re: [web2py] Login with ID rather than email?

2013-05-27 Thread Alec Taylor
(username=True) On Sunday, 26 May 2013 22:41:09 UTC-5, marco mansilla wrote: El Mon, 27 May 2013 13:00:11 +1000 Alec Taylor alec.t...@gmail.com escribió: Is it possible to login to web2py by ID rather than by email? Thanks for all information, Alec Taylor if you mean something

[web2py] How to mark the 'id' field as readable and writable?

2013-05-27 Thread Alec Taylor
Here is what I've tried on my auth_user table: Field('id', 'id', readable=True, writable=True, unique=True), But it makes not difference to what is displayed on screen. How do I get this to work? Thanks for all suggestions -- --- You received this message because you are subscribed to

Re: [web2py] Login with ID rather than email?

2013-05-27 Thread Alec Taylor
) a username field is added. BTW: by id we all understood you want to login using the username in the registration rather than the email. If instead you meant by the serial id associated with the auth_user row then forget about username On Monday, May 27, 2013 8:38:30 PM UTC+2, Alec Taylor

Re: [web2py] Login with ID rather than email?

2013-05-27 Thread Alec Taylor
(I have tried the `auth.settings.login_userfield = 'olduserid'` option; but all it did was change the input label, the validator (for email) remained) On Tue, May 28, 2013 at 11:24 AM, Alec Taylor alec.tayl...@gmail.com wrote: I have actually migrated some data, and have a second userid type

[web2py] Autocomplete widget on SQLFORM.grid search?

2013-05-27 Thread Alec Taylor
(db.product) }} How do I bind the search input box to the autocomplete widget? Thanks for all suggestions, Alec Taylor -- --- 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

Re: [web2py] Re: Autocomplete widget on SQLFORM.grid search?

2013-05-27 Thread Alec Taylor
. Anthony On Monday, May 27, 2013 10:43:11 PM UTC-4, Alec Taylor wrote: I haven't been able to get this to work: # Models db.define_table('category',Field('name')) db.define_table('product',Field('name'),Field('category')) db.product.category.widget = SQLFORM.widgets.autocomplete(request

[web2py] Login with ID rather than email?

2013-05-26 Thread Alec Taylor
Is it possible to login to web2py by ID rather than by email? Thanks for all information, Alec Taylor -- --- 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

Re: [web2py] Re: Converting SQLite to DAL?

2013-04-20 Thread Alec Taylor
about table joins so you still don't have to dig into DAL syntax. On Friday, April 19, 2013 1:42:45 AM UTC-4, Alec Taylor wrote: I finally completed a successful conversion of my Microsoft Access database to SQLite 3; after trying numerous scripts on a couple of platforms. I used the `.dump

[web2py] Need help getting cgihandler.py to work

2013-04-19 Thread Alec Taylor
I have a server which only supports talking to Python using CGI. It also requires a custom shebang line. I was able to get the sample one working, from: http://wiki.python.org/moin/CgiScripts But I can't figure out how to make the cgihandler.py version work. Thanks for all suggestions, Alec

[web2py] No `Field`s generated by 'extract_sqlite_models.py'

2013-04-19 Thread Alec Taylor
properly? Thanks for all suggestions, Alec Taylor -- --- 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, visit

[web2py] Converting SQLite to DAL?

2013-04-18 Thread Alec Taylor
from web2py; as there is data there) Thanks for all suggestions, Alec Taylor -- --- 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] Re: EmberJS is the web2py of the client! :)

2013-04-17 Thread Alec Taylor
FYI: The presenter/author has published his examples using metawidget and AngularJS to generate forms: http://files.meetup.com/4966012/Metawidget%20AngularJS%20Examples.zip On Wed, Apr 17, 2013 at 7:12 AM, Niphlod niph...@gmail.com wrote: On Tuesday, April 16, 2013 10:38:11 PM UTC+2, Magnitus

Re: [web2py] bootstrap interface builder

2013-04-17 Thread Alec Taylor
Not bad! Also I should mention that there are quite a few players in this market; using Twitter Bootstrap as base. On Thu, Apr 18, 2013 at 3:37 AM, Massimo DiPierro massimo.dipie...@gmail.com wrote: http://www.layoutit.com/ -- --- You received this message because you are subscribed to the

Re: [web2py] Re: Python 3 compatibility?

2013-04-13 Thread Alec Taylor
Looks like it hasn't been updated for 4 months… I will bump up the feature thread of it. On Sun, Apr 14, 2013 at 3:11 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: We will not do the mistake Python made: break backward compatibility and not make it worthwhile. We are already

[web2py] Form generator from web2py JSON to AngularJS made easier

2013-04-03 Thread Alec Taylor
-side will encompass a JavaScript framework such as Backbone, Ember or AngularJS. Maybe this will assist? :) All the best, Alec Taylor -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails

Re: [web2py] Re: EmberJS is the web2py of the client! :)

2013-04-03 Thread Alec Taylor
Another vote for AngularJS On Wed, Apr 3, 2013 at 8:58 PM, David Marko dma...@tiscali.cz wrote: This scenario of one-page application is quite important for mobile hybrid applications. In this case you need standalone app running in device and consuming data from server. The server provides

Re: [web2py] Re: EmberJS is the web2py of the client! :)

2013-04-03 Thread Alec Taylor
Just went through a couple of the examples with Meteor It's certainly interesting; but is quite verbose to write and manage. Most impressive was how completely self-contained those examples are. Other frameworks documentation definitely need to pickup their game. For example, when I was

Re: [web2py] Re: EmberJS is the web2py of the client! :)

2013-04-03 Thread Alec Taylor
I hear what you're saying, but ember/data seems far too young to be a feature point; and everything else you mentioned was mere speculation. Not to discount you entirely, what you mentioned about prerendering templates server-side is a very good point. This has been a feature request with

Re: [web2py] Re: EmberJS is the web2py of the client! :)

2013-04-03 Thread Alec Taylor
On Thu, Apr 4, 2013 at 7:05 AM, Arnon Marcus a.m.mar...@gmail.com wrote: I agree that it does seem right now, that the current trend in the web-development world, in general, is moving in the direction of transferring more and more tasks to the client, as those become more and more capable.

Re: [web2py] Re: IMG in A tag of SQLFORM `submit_button`?

2013-03-31 Thread Alec Taylor
Thanks, using BUTTON fixed the problem. On Sun, Mar 31, 2013 at 12:18 AM, Annet anneve...@googlemail.com wrote: I am trying to solve a similar problem, and am considering Bootstrap's i class=some-icon/i in a custom widget ... div class=input-prepend span class=somethingi

[web2py] Re: IMG in A tag of SQLFORM `submit_button`?

2013-03-28 Thread Alec Taylor
*bump* On Tue, Mar 26, 2013 at 6:18 PM, Alec Taylor alec.tayl...@gmail.com wrote: {{=SQLFORM.factory(submit_button=XML(SPAN('hello', IMG(_src=URL('static', 'img/bg.png')}} How do I get this to work? Thanks for all suggestions, Alec Taylor -- --- You received this message

[web2py] IMG in A tag of SQLFORM `submit_button`?

2013-03-26 Thread Alec Taylor
{{=SQLFORM.factory(submit_button=XML(SPAN('hello', IMG(_src=URL('static', 'img/bg.png')}} How do I get this to work? Thanks for all suggestions, Alec Taylor -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from

[web2py] Refresh page on successful form submission; and response.flash?

2013-03-20 Thread Alec Taylor
on successful form submission? Thanks for all suggestions, Alec Taylor -- --- 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

[web2py] Joining the relation result of a join with another relation?

2013-03-19 Thread Alec Taylor
# Model [appname/models/far.py] db.define_table('far_members', Field('far_id', db.far, requires=IS_IN_DB(db, 'far.id')), Field('user_id', db.auth_user, default=auth.user_id, writable=False, requires=IS_IN_DB(db, 'auth_user.id')) ) db.define_table('far', Field('cool_title'),

Re: [web2py] Joining the relation result of a join with another relation?

2013-03-19 Thread Alec Taylor
On Tue, Mar 19, 2013 at 4:06 PM, Alec Taylor alec.tayl...@gmail.com wrote: # Model [appname/models/far.py] db.define_table('far_members', Field('far_id', db.far, requires=IS_IN_DB(db, 'far.id')), Field('user_id', db.auth_user, default=auth.user_id, writable=False, requires

Re: [web2py] Joining the relation result of a join with another relation?

2013-03-19 Thread Alec Taylor
to appear there; even though it's hashed) On Wed, Mar 20, 2013 at 1:30 PM, Ricardo Pedroso rmdpedr...@gmail.com wrote: On Tue, Mar 19, 2013 at 8:06 PM, Alec Taylor alec.tayl...@gmail.com wrote: # Model [appname/models/far.py] db.define_table('far_members', Field('far_id', db.far, requires

[web2py] Sites Powereb by web2py = Sites *Powered* by web2py

2013-03-15 Thread Alec Taylor
Suggest making the change on the homepage! -- --- 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, visit

[web2py] Replace all forms to use the HTML5 `placeholder` rather than `label`?

2013-03-14 Thread Alec Taylor
signup_form -- But maybe this could be done at the schema level; e.g.: utilising the label attribute of the Field tuple? Thanks for all suggestions, Alec Taylor -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from

[web2py] My hack to add JSON support to `request.vars`

2013-03-10 Thread Alec Taylor
Might be helpful to someone, also maybe we should implement it as `request.vars.json`, like Python-Requests does? vars = request.vars vars = str(vars) vars = json.loads(vars[vars.find({)+2 : vars.rfind(\': \'\')]) -- --- You received this message because you are subscribed to the Google

[web2py] gluon.http.HTTP default headers aren't `**response.headers`?

2013-03-08 Thread Alec Taylor
Why isn't the content-type inherited from response.headers in the HTTP object construction? def test(): response.headers['Content-Type'] = 'application/json' raise HTTP(500, json.dumps(dict(test=True)), **response.headers) HTTP/1.1 500 INTERNAL SERVER ERROR Path=/ Content-Type:

[web2py] Re: gluon.http.HTTP default headers aren't `**response.headers`?

2013-03-08 Thread Alec Taylor
(pasted output was in reverse order .) On Sat, Mar 9, 2013 at 4:08 PM, Alec Taylor alec.tayl...@gmail.com wrote: Why isn't the content-type inherited from response.headers in the HTTP object construction? def test(): response.headers['Content-Type'] = 'application/json' raise HTTP

[web2py] Raising HTTP errors as JSON?

2013-03-06 Thread Alec Taylor
How do I raise HTTP errors as JSON? My attempt: In [1]: import json In [2]: from gluon.http import HTTP In [3]: raise HTTP(412, json.dumps({'error': 'must accept terms'})) --- HTTP

Re: [web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Alec Taylor
, 2013 9:37:26 AM UTC+1, Alec Taylor wrote: How do I raise HTTP errors as JSON? My attempt: In [1]: import json In [2]: from gluon.http import HTTP In [3]: raise HTTP(412, json.dumps({'error': 'must accept terms

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Alec Taylor
For Windows PyDot is the native Python solution; which unlike PyGraphViz; doesn't require C extensions built. Will have a go at abstracting the implementation so either can be used first chance I get (probably not starting for another 7 days) On Wed, Mar 6, 2013 at 6:16 AM, Derek

Re: [web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Alec Taylor
, 2013 at 9:57 PM, Ricardo Pedroso rmdpedr...@gmail.com wrote: On Wed, Mar 6, 2013 at 9:43 AM, Alec Taylor alec.tayl...@gmail.com wrote: Oh, looks like it works on an endpoint level; not sure how to get rid of the XML style comment though !-- -- Output from curl: GET /arbg/error HTTP/1.1 Host

Re: [web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Alec Taylor
: Content-Type: application/x-www-form-urlencoded With reply (same reply whether containing .json in URL or not): Content-Type: text/html; charset=UTF-8 On Wed, Mar 6, 2013 at 10:15 PM, Alec Taylor alec.tayl...@gmail.com wrote: 401 was actually the error code that would be relevant

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Alec Taylor
a javascript library for the graph? This way you dont have problems with with windows/linux 2013/3/6 Alec Taylor alec.tayl...@gmail.com For Windows PyDot is the native Python solution; which unlike PyGraphViz; doesn't require C extensions built. Will have a go at abstracting the implementation so

Re: [web2py] Re: Raising HTTP errors as JSON?

2013-03-06 Thread Alec Taylor
(whatever)) On Wednesday, March 6, 2013 12:15:07 PM UTC+1, Alec Taylor wrote: 401 was actually the error code that would be relevant there. Surprised that the XML comments were removed in 2.4.2; had been tracing the commits. Just checked and noticed I am on 02.21.10.15.58 and it was fixed

[web2py] How to include headers in gluon.http.HTTP exceptions?

2013-03-06 Thread Alec Taylor
headers in gluon.http.HTTP exceptions? Thanks for all suggestions, Alec Taylor -- --- 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

[web2py] Re: How to include headers in gluon.http.HTTP exceptions?

2013-03-06 Thread Alec Taylor
Okay, got it to work; but it's rather messy: raise HTTP(*msg[0:2], **msg[3]) On Thu, Mar 7, 2013 at 1:47 PM, Alec Taylor alec.tayl...@gmail.com wrote: My attempt: msg = (403, json.dumps({state: , error_message: None, error: unauthorized_client}), None, {'Content-Type': 'application/json

[web2py] compute unique hash for each tuple/row?

2013-03-05 Thread Alec Taylor
What's the DAL syntax for computing a unique hash for each tuple/row? (so that no other tuple/row has that same hash) What I have tried: Field('my_field_name', unique=True, compute=lambda q: CRYPT(digest_alg='sha1',key='my_field_name',salt=True)(str(q)).split('$')[0]), -- --- You received

Re: [web2py] Re: on social auth

2013-03-04 Thread Alec Taylor
It doesn't claim *web2py* compatibility it claims *webpy* compatibility I'm guessing it means web.py On Tue, Mar 5, 2013 at 1:10 AM, Michele Comitini michele.comit...@gmail.com wrote: First of al I like a library that claims web2py compatibility that's a very good sign! Does social-auth

Re: [web2py] Re: on social auth

2013-03-04 Thread Alec Taylor
On Tue, Mar 5, 2013 at 1:24 AM, Niphlod niph...@gmail.com wrote: On Monday, March 4, 2013 3:10:33 PM UTC+1, Michele Comitini wrote: First of al I like a library that claims web2py compatibility that's a very good sign! ? web2py is out (part of the reason why I asked if someone was

[web2py] Unable to import from modules folder?

2013-03-03 Thread Alec Taylor
functions and/or classes from /modules to my controllers? Thanks for all suggestions, Alec Taylor -- --- 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

Re: [web2py] Re: Unable to import from modules folder?

2013-03-03 Thread Alec Taylor
that there's an __init__.y in the modules folder. If you want to use appname.modules.foo_module path, you need to check for the __init__.py also in the applications directory. On Sunday, March 3, 2013 6:03:19 PM UTC+1, Alec Taylor wrote: My app has default routes; so I can't figure out why I can't

Re: [web2py] Re: Unable to import from modules folder?

2013-03-03 Thread Alec Taylor
YAY! - Just figured out the problem. Looks like there was no '__init__.py' file in my application root directory (web2py/applications/mynewapp). Now that I've put one there; importing works :D On Mon, Mar 4, 2013 at 4:25 AM, Alec Taylor alec.tayl...@gmail.com wrote: Confirmed

Re: [web2py] web2py 2.4.2 is OUT

2013-03-03 Thread Alec Taylor
Looking good, especially the new serialisation and 2d geospatial On Mon, Mar 4, 2013 at 2:38 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: The book will be out shortly describing this version. I am sure there are some corners to iron but I could not wait any longer. Changelog: -

Re: [web2py] Re: RESTful vs JSONRPC

2013-03-02 Thread Alec Taylor
Can you expand a little on features? Would be interested in a more concrete example of when to use JSONRPC over REST On Sat, Mar 2, 2013 at 11:53 PM, Niphlod niph...@gmail.com wrote: JSONRPC is a method to invoke functions that is standardized. REST is a standardized method to represent

[web2py] Optimising caching and enabling gzip for web2py on heroku?

2013-03-02 Thread Alec Taylor
' How do I optimize these High priority metrics PageSpeed found? Thanks for all suggestions, Alec Taylor -- --- 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

[web2py] Unique combination of fields in DAL?

2013-02-28 Thread Alec Taylor
, 'auth_user.id')), ) Thanks for all suggestions, Alec Taylor -- --- 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

Re: [web2py] Re: Unique combination of fields in DAL?

2013-02-28 Thread Alec Taylor
. On Thursday, February 28, 2013 12:38:13 PM UTC+1, Alec Taylor wrote: How do I have unique field combinations in DAL? So only one of each of these 2-tuples should be allowed: db.define_table('foo', Field('bar_id', db.bar, requires=IS_IN_DB(db, 'bar.id')), Field('user_id', db.auth_user

Re: [web2py] Re: Unique combination of fields in DAL?

2013-02-28 Thread Alec Taylor
this with one callback? On Fri, Mar 1, 2013 at 2:59 AM, DenesL denes1...@yahoo.ca wrote: http://web2py.com/books/default/chapter/29/06#before-and-after-callbacks On Thursday, February 28, 2013 10:43:12 AM UTC-5, Alec Taylor wrote: Thanks, at the moment form validation is fine to do without. What

[web2py] Exposing `gluon.http.HTTP` as JSON?

2013-02-25 Thread Alec Taylor
messages are shown for HTML? Thanks for all suggestions, Alec Taylor -- --- 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

[web2py] Re: Keyed tables and str references?

2013-02-21 Thread Alec Taylor
Whoops, I'm actually using SQLite (for dev) and Postgres [with PostGIS] (for prod). :\ Guess the requires=IS_IN_DB is the only syntax remaining for me to enforce referential integrity… On Friday, February 22, 2013 5:57:24 AM UTC+11, DenesL wrote: Hi Alec, is your db one of the supported

[web2py] Need for '/index/args' following controller to grab 'args'?

2013-02-20 Thread Alec Taylor
Is there some method—e.g.: rewriting/specifying-in the routes—that will allow me to grab 'args' from '/controller_name/args' rather than having to use '/controller_name/index/args'? (this will result in much cleaner URLs for my users/clients) Thanks for all suggestions, Alec Taylor PS: I

[web2py] Keyed tables and str references?

2013-02-20 Thread Alec Taylor
between tables? E.g.: is there an `IS_IN_DB` syntax I should be using? Thanks for all suggestions, Alec Taylor PS: The keys on my actual dataset are MD5 hashes -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from

Re: [web2py] Re: How to get request.args from an index() function?

2013-02-19 Thread Alec Taylor
: request.args = ['f'] It has become obvious that only with /index/ between salad and `args` can I get anything out of request.args… =( Bug? On Tue, Feb 19, 2013 at 4:12 AM, Jonathan Lundell jlund...@pobox.com wrote: On 18 Feb 2013, at 9:04 AM, Alec Taylor alec.tayl...@gmail.com wrote: Thanks, what's

[web2py] Unable to import function from the appname\modules folder to my controllers

2013-02-19 Thread Alec Taylor
in 'web2py\applications\appname\controllers\default.py' I write: from validators import hi # fail import validators.hi #fail local_import('hi') # fail local_import('validators.hi') #fail How do I import variables, functions and classes from my appname\modules folder? Thanks for all suggestions, Alec

Re: [web2py] Unable to import function from the appname\modules folder to my controllers

2013-02-19 Thread Alec Taylor
Perfect, thanks. On Wed, Feb 20, 2013 at 12:48 AM, Johann Spies johann.sp...@gmail.com wrote: On 19 February 2013 15:30, Alec Taylor alec.tayl...@gmail.com wrote: How do I import variables, functions and classes from my appname\modules folder? from

Re: [web2py] Re: How to get request.args from an index() function?

2013-02-19 Thread Alec Taylor
Bug reported: http://code.google.com/p/web2py/issues/detail?id=1346 On Tue, Feb 19, 2013 at 10:34 PM, Alec Taylor alec.tayl...@gmail.com wrote: Didn't know that. Okay, modified my routes.py: routers = dict( BASE = dict( default_application = 'studentstartups', applications

Re: [web2py] Validator: {Validator1 OR validator2} - Can I get that requires on a Field?

2013-02-19 Thread Alec Taylor
Thanks Bruno, works like a charm. Only caveat is that the error_message is always grabbed from the first validator… On Sat, Feb 16, 2013 at 6:21 AM, Bruno Rocha rochacbr...@gmail.com wrote: Cool! but it does not allow the transformation. class CUSTOM(object): you can use a function

Re: [web2py] Re: auth.settings.login_next has no functionality?

2013-02-19 Thread Alec Taylor
'login' out of that list, or set it to None if you never want the _next variable). Anthony On Monday, February 18, 2013 1:39:30 AM UTC-5, Alec Taylor wrote: How do I redirect to a different page on login? Here's what I've tried: auth.settings.login_next = URL('profile') Thanks for all

Re: [web2py] Re: auth.settings.login_next has no functionality?

2013-02-19 Thread Alec Taylor
It's a custom profile function. I have a controllers\profile.py file. On Wed, Feb 20, 2013 at 4:12 AM, Annet anneve...@googlemail.com wrote: Is 'profile' a custom profile function? otherwise, what about: auth.settings.login_next=URL('user',args='profile') Annet -- --- You received

Re: [web2py] Re: auth.settings.login_next has no functionality?

2013-02-19 Thread Alec Taylor
(and defaults to the application and controller of the current request). Anthony On Tuesday, February 19, 2013 11:01:58 AM UTC-5, Alec Taylor wrote: I'm not using auth.navbar(). On Wed, Feb 20, 2013 at 1:46 AM, Anthony abas...@gmail.com wrote: If you are using auth.navbar(), by default it adds

Re: [web2py] Re: How to get request.args from an index() function?

2013-02-18 Thread Alec Taylor
routers = dict( BASE = dict( default_application = 'fruit', applications = ['fruit', 'admin'], default_controller = 'default', controllers = 'DEFAULT', default_function = 'index', ), fruit = dict( default_function = 'index', functions =

Re: [web2py] Re: How to get request.args from an index() function?

2013-02-18 Thread Alec Taylor
I have created a tiny test-case which proves that I can't properly acquire request.args: https://gist.github.com/anonymous/4978457 What am I doing wrong; how am I supposed to acquire request.args? (I want URL per uid of record) On Tue, Feb 19, 2013 at 12:48 AM, Niphlod niph...@gmail.com wrote:

Re: [web2py] Re: How to get request.args from an index() function?

2013-02-18 Thread Alec Taylor
Thanks, what's the routes syntax to specific functions? This didn't work: fruit = dict( default_function = 'index', controllers = ['salad'], functions = ['index','user','download','call', 'data','error','profile',] ) Am I meant to specify the list in BASE? On Tue,

Re: [web2py] Re: How to get request.args from an index() function?

2013-02-18 Thread Alec Taylor
*controllers that is On Tue, Feb 19, 2013 at 4:04 AM, Alec Taylor alec.tayl...@gmail.com wrote: Thanks, what's the routes syntax to specific functions? This didn't work: fruit = dict( default_function = 'index', controllers = ['salad'], functions = ['index','user

[web2py] Replace default /register and /login views

2013-02-17 Thread Alec Taylor
no affect. How do I use custom views for my auth.* stuff in web2py? (e.g.: so @auth.requires_login() redirects to the modified views) Thanks for all suggestions, Alec Taylor -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from

Re: [web2py] Re: Replace default /register and /login views

2013-02-17 Thread Alec Taylor
= auth_views.get(request.args(0), response.view) return dict(form=auth()) You could also create completely separate functions for login and registration. Anthony On Sunday, February 17, 2013 10:34:11 AM UTC-5, Alec Taylor wrote: I am trying to replace these views with custom ones I've

[web2py] auth.settings.login_next has no functionality?

2013-02-17 Thread Alec Taylor
How do I redirect to a different page on login? Here's what I've tried: auth.settings.login_next = URL('profile') Thanks for all suggestions, Alec Taylor -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group

[web2py] How to get request.args from an index() function?

2013-02-17 Thread Alec Taylor
to get request.args from an index() function? Thanks for all suggestions, Alec Taylor -- --- 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] Re: web2py + exceptions(tickets) service?

2013-02-15 Thread Alec Taylor
On Fri, Feb 15, 2013 at 8:00 PM, Niphlod niph...@gmail.com wrote: Thanks for the answer Niphlod, but didn't understand the last part about being alerted(besides taking a look at the admin app). Cheers! http://web2py.com/books/default/chapter/29/13#Collecting-tickets and

[web2py] Validator: {Validator1 OR validator2} - Can I get that requires on a Field?

2013-02-14 Thread Alec Taylor
in the Table; one for email, the other for this outside uid. Is there another solution; utilising multiple validators in the requires, much like `IS_NONE_OR()` validator? Thanks for all suggestions, Alec Taylor -- --- You received this message because you are subscribed to the Google Groups web2py

Re: [web2py] Re: web2py + exceptions(tickets) service?

2013-02-14 Thread Alec Taylor
Cool website; however web2py has those features built-in :) As for setting up email alerts for tickets—e.g.: that have been reported a certain number of times—I think that's a strong feature-request to add into the issue queue (or build yourself and pull-request back). On Fri, Feb 15, 2013 at

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

2013-02-12 Thread Alec Taylor
the user started the app, problem is solved.but we would lose 50-70% of our new users daily. On Monday, February 11, 2013 9:01:40 PM UTC-8, Alec Taylor wrote: On Tue, Feb 12, 2013 at 4:29 AM, howesc how...@umich.edu wrote: Thanks Alec, that will be a nice contribution. re my special odd

Re: [web2py] Re: Converting Field of a SQLFORM.grid to local timezone of a user.....

2013-02-12 Thread Alec Taylor
To keep things simple on the database side; how about making all times UTC? Then use JavaScript to impose timezone on the client-side. On Wed, Feb 13, 2013 at 2:20 PM, Michael Beller mjbel...@gmail.com wrote: this stores dates in UTC but displays date in alternate timezone. You can set the

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

2013-02-11 Thread Alec Taylor
On Tue, Feb 12, 2013 at 4:29 AM, howesc how...@umich.edu wrote: Thanks Alec, that will be a nice contribution. re my special odd pain in the rear-end login flow.well we (the engineers) failed to sell that to the business. users can make purchases via apple without a proper logged in

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

2013-02-10 Thread Alec Taylor
Not to worry, I'm releasing a generalised open-source OAuth2 Library for web2py. As for your current mechanism of anonymous tokens… how about just storing a cookie (or some other client-side storage) and when the user logs-in or registers all their customisations (e.g.: if e-commerce, their cart)

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

2013-02-09 Thread Alec Taylor
() auth.settings.login_methods = something On Sat, Feb 9, 2013 at 5:34 AM, Alec Taylor alec.tayl...@gmail.com wrote: 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

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

2013-02-09 Thread Alec Taylor
On Sat, Feb 9, 2013 at 11:53 PM, Niphlod niph...@gmail.com wrote: wait a second . you may be missing an important bit. DAL has no introspection whatsoever for retrieving existing tables if you have not defined them. That doesn't mean that you have to define tables at every connection (it's

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

2013-02-09 Thread Alec Taylor
, Feb 10, 2013 at 12:42 AM, Alec Taylor alec.tayl...@gmail.com wrote: On Sat, Feb 9, 2013 at 11:53 PM, Niphlod niph...@gmail.com wrote: wait a second . you may be missing an important bit. DAL has no introspection whatsoever for retrieving existing tables if you have not defined them

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

2013-02-08 Thread Alec Taylor
an entry in the db (the db DAL object was sent from \controllers though). So from my code (and subsequent from $web2py.py -S myapp2) I ran db.tables and got []. The exact same connection string is used throughout my code; so why isn't this working? Thanks for all suggestions, Alec Taylor PS

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

2013-02-08 Thread Alec Taylor
. In [1]: db = DAL('sqlite://myapp2.sqlite', pool_size=1, check_reserved=['all']) In [2]: db.tables() Out[2]: [] On Sat, Feb 9, 2013 at 3:07 AM, Alec Taylor alec.tayl...@gmail.com wrote: Experiencing some very strange errors on the latest web2py (2.4.1-alpha.2+timestamp.2013.02.07.05.36.19

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 nicoz...@gmail.com wrote: I wish I could, but unfortunately I don't have any CSS knowledge ;-(( But I'll be happy to help with testing and

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

2013-02-08 Thread Alec Taylor
' object has no attribute '__getitem__' On Friday, February 8, 2013 5:14:22 PM UTC+1, Alec Taylor wrote: 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

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

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 chrisgu...@gmail.com 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

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

2013-02-08 Thread Alec Taylor
to access. Every framework works in this way. Optionally, you can use db.executesql(PUT YOUR SQL HERE) and do it by your own... On Sat, Feb 9, 2013 at 4:13 AM, Alec Taylor alec.tayl...@gmail.com wrote: Hold up; you mean to tell me I need to redefine the schema each time a new db (DAL object

Re: [web2py] Re: Autoincrement field

2013-02-07 Thread Alec Taylor
Optionally you can define a field of `type='id'` and web2py will use this field as auto-increment id field. This is not recommended except when accessing legacy database tables. With some limitation, you can also use different primary keys and this is discussed in the section on Legacy databases

[web2py] Why must 'id' primary-key Field in DAL be an integer?

2013-02-06 Thread Alec Taylor
'id' primary-key Field in DAL be an integer? Thanks for all information, Alec Taylor -- --- 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

[web2py] web2py IDEs; maintain a wiki with plugins?

2013-02-01 Thread Alec Taylor
this with sublime_text folder_location - Linux and Windows Thanks for all suggestions, Alec Taylor On Sat, Feb 2, 2013 at 3:13 AM, select gr...@delarue-berlin.de wrote: On Thursday, January 31, 2013 1:26:45 PM UTC+1, Johann Spies wrote: On 31 January 2013 13:03, Jason Brower enco...@gmail.com wrote

[web2py] Unstructured table creation in DAL; akin to NoSQL?

2013-01-31 Thread Alec Taylor
? - Specifically generalised key-value pair type things? Thanks for your consideration, Alec Taylor -- --- 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

Re: [web2py] Re: Unstructured table creation in DAL; akin to NoSQL?

2013-01-31 Thread Alec Taylor
On Fri, Feb 1, 2013 at 4:23 AM, Alan Etkin spame...@gmail.com wrote: I am porting a library to web2py's DAL from pymongo; and looking Sorry, may I ask what library? dal already has experimental support for mymongo trough the MongoDBAdapter. Have you considered using/extending it? I am

Re: [web2py] Re: Autoincrement field

2013-01-30 Thread Alec Taylor
On Wed, Jan 30, 2013 at 1:15 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Please open a ticket about this. http://code.google.com/p/web2py/issues/detail?id=1311 -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe

Re: [web2py] How to implement web2py password encryption in php

2013-01-28 Thread Alec Taylor
, 2013 at 10:29 AM, Alec Taylor alec.tayl...@gmail.com wrote: Use the same hash function that you use in web2py; in php. For further discussion on how to write this in; go onto a PHP mailing-list. On Mon, Jan 28, 2013 at 6:08 PM, hasan alnator halna...@gardeniatelco.com wrote: Dear Alec

Re: [web2py] Re: How do I import `gluon.dal` from Python shell?

2013-01-28 Thread Alec Taylor
Thanks, but is there a non-hacky solution? On Mon, Jan 28, 2013 at 6:55 PM, Emilius Omeen om...@bk.ru wrote: import sys sys.path.append('/home/www-data/web2py') from gluon import DAL, Field -- --

Re: [web2py] Re: Autoincrement field

2013-01-28 Thread Alec Taylor
Which DB are you using BTW? Because if you're using something like MySQL; they have inbuilt autoincrement fields which would be much better to utilise than what we provide in the DAL. Maybe we should have an 'autoincrement' field, like we have a 'datetime' field? Gracefully degrade to a lambda

Re: [web2py] Re: How do I import `gluon.dal` from Python shell?

2013-01-28 Thread Alec Taylor
On Tue, Jan 29, 2013 at 12:07 AM, Bruno Rocha rochacbr...@gmail.com wrote: Is there the option to put the gluon folder on your site-packages or dist-packages folder Or maybe, start web2py in shell mode? -- Perfect, thanks. Had forgotten about the shell option. --

  1   2   3   4   5   >