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

2013-09-14 Thread Alec Taylor
the development time for web2py [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

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',F

[web2py] Autocomplete widget on SQLFORM.grid search?

2013-05-27 Thread Alec Taylor
limitby=(0,10), min_length=2) # View {{= SQLFORM.grid(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 un

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 wrote: > I have actually migrated some data, and have a second userid type > fiel

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

2013-05-27 Thread Alec Taylor
gt;> password CHAR(512), >> registration_key CHAR(512), >> reset_password_key CHAR(512), >> registration_id CHAR(512) >> ); >> >> On Mon, May 27, 2013 at 3:13 PM, Massimo Di Pierro >> wrote: >> > auth.define_tables(username=True)

[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
e) > > > > On Sunday, 26 May 2013 22:41:09 UTC-5, marco mansilla wrote: >> >> El Mon, 27 May 2013 13:00:11 +1000 >> Alec Taylor escribió: >> >> > Is it possible to login to web2py by ID rather than by email? >> > >> > Thanks for

[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

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

2013-04-20 Thread Alec Taylor
te good. You > can use SQLFORM.grid and SQLFORM.smartgrid to manage the data in these > tables. The great thing about smartgrid especially is that it knows 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 wro

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

2013-04-19 Thread Alec Taylor
table('OeTy', migrate=False) How do I get this to work 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 fr

[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 sug

[web2py] "Converting" SQLite to DAL?

2013-04-18 Thread Alec Taylor
uld like to access the current .db 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 fr

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 wrote: > http://www.layoutit.com/ > > -- > > --- > You received this message because you are subscribed to the Google Groups > "web

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 wrote: > > > On Tuesday, April 16, 2013 10:38:11 PM UTC+2, Magnitus wrote: >> >> We

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 wrote: > We will not do the mistake Python made: break backward compatibility and not > make it worthwhile. > > We are already working on web3py. It is on g

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 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. > > But I wouldn't

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 AngularJ

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 testing

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 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 JSON coomunicatio

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

2013-04-02 Thread Alec Taylor
uture of web2py client-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

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 wrote: > I am trying to solve a similar problem, and am considering Bootstrap's class="some-icon"> in a custom widget ... > > > > > > > > http://twitter.github.com/bootstrap/base-css.html#icons > > Annet >

[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 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

[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-use

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

2013-03-19 Thread Alec Taylor
do I refresh the page 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 web2p

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

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

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

2013-03-19 Thread Alec Taylor
r_id))).select() > > > Richard > > > > On Tue, Mar 19, 2013 at 4:06 PM, Alec Taylor wrote: >> >> # Model [appname/models/far.py] >> >> db.define_table('far_members', >> Field('far_id', db.far, requires=IS_IN_DB

[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'),

[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 htt

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

2013-03-13 Thread Alec Taylor
#x27;input[type=submit]')[0]["_value"] = "Signup" signup_form.elements('input[type=submit]')[0]["_class"] = "btn btn-large btn-primary" if signup_form.process().accepted: response.flash = "foo" return signup_form -

[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 Gr

[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 wrote: > Why isn't the content-type inherited from response.headers in the HTTP > object construction? > > def test(): > response.headers['Content-Type'] = 'applicati

[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: text/html;

[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 wrote: > My attempt: > > msg = (403, json.dumps({"state": "", "error_message": None, "error": > "unauthorized_cl

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

2013-03-06 Thread Alec Taylor
so note that I get that same header content-type back when I access the URL with .json when the controllers are decorated with `@service.json`. How do I include headers in gluon.http.HTTP exceptions? Thanks for all suggestions, Alec Taylor -- --- You received this message because you are subs

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

2013-03-06 Thread Alec Taylor
.dumps(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

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-06 Thread Alec Taylor
ibrary for the graph? >> This way you dont have problems with with windows/linux >> >> >> >> 2013/3/6 Alec Taylor >>> >>> For Windows PyDot is the native Python solution; which unlike >>> PyGraphViz; doesn't require C extensions buil

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

2013-03-06 Thread Alec Taylor
arg I get: 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 wrote: > 401 was actually the error code that would be relevant there. > > Sur

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

2013-03-06 Thread Alec Taylor
Mar 6, 2013 at 9:57 PM, Ricardo Pedroso wrote: > On Wed, Mar 6, 2013 at 9:43 AM, Alec Taylor 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 /ar

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 wrote: > Eh, I'

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

2013-03-06 Thread Alec Taylor
timestamp.2013.02.21.10.15.58 On Wed, Mar 6, 2013 at 8:15 PM, Niphlod wrote: > what did you expect ? > > On Wednesday, March 6, 2013 9:37:26 AM UTC+1, Alec Taylor wrote: >> >> How do I raise HTTP errors as JSON? >> >> My attempt: >> >> In [1]: i

[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 Trace

[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 th

Re: [web2py] Re: on social auth

2013-03-04 Thread Alec Taylor
On Tue, Mar 5, 2013 at 1:24 AM, Niphlod 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 > interested).

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 wrote: > First of al I like a library that claims web2py compatibility that's a > very good sign! > Does social-auth support a common API (aka jan

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 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: > > - 2D GEO API: geoPoint,

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 wrote: > Confirmed that the alternat

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

2013-03-03 Thread Alec Taylor
? > > PS: check 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: >>

[web2py] Unable to import from modules folder?

2013-03-03 Thread Alec Taylor
How do I import 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, sen

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

2013-03-02 Thread Alec Taylor
concat,minify,inline' 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

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 wrote: > JSONRPC is a method to invoke functions that is standardized. REST is a > standardized method to represent something. > > Stand

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

2013-02-28 Thread Alec Taylor
I do this with one callback? On Fri, Mar 1, 2013 at 2:59 AM, DenesL 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

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

2013-02-28 Thread Alec Taylor
th 2 columns involved. > > > 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',

[web2py] Unique combination of fields in DAL?

2013-02-28 Thread Alec Taylor
le=False, requires=IS_IN_DB(db, '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, sen

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

2013-02-25 Thread Alec Taylor
errors are only shown for '.json'; and normal text 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

[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 supporte

[web2py] Keyed tables and str references?

2013-02-20 Thread Alec Taylor
d format: a number is required, not NoneType How am I supposed to reference string keys 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 becau

[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 su

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

2013-02-19 Thread Alec Taylor
, it assumes it is the function name (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, Fe

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 wrote: > Is 'profile' a custom profile function? otherwise, what about: > > auth.settings.login_next=URL('user',args='profile') > > > Annet > > -- > > --- > You received this message beca

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

2013-02-19 Thread Alec Taylor
ble (so, just leave '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? >> >>

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 wrote: > Cool! but it does not allow the transformation. > > class CUSTOM(object): > """ > you can use a function or a lambda >

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 wrote: > Didn't know that. Okay, modified my routes.py: > routers = dict( >BASE = dict( >default_application = 'studentstartups', >a

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

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

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

2013-02-19 Thread Alec Taylor
Also tried `import hi` # fail Should mention that I also need this to work in my models. On Wed, Feb 20, 2013 at 12:30 AM, Alec Taylor wrote: > How do I import variables, functions and classes from my > \modules folder? > > Following: http://rochacbruno.com.br/more-web2py-custo

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

2013-02-19 Thread Alec Taylor
uot; Now in 'web2py\applications\\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 \modules folder? Thank

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

2013-02-19 Thread Alec Taylor
//localhost/fruit/salad/index/f ['f'] And with this output from server log: 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, Jonatha

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 wrote: > Thanks, what's the routes syntax to specific functions? > > This didn't work: > > fruit = dict( > default_function = 'index', > controllers = ['salad'

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, Feb

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 wrote: > did you try turn

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 = [

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

2013-02-17 Thread Alec Taylor
onsole output: [] How 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

[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.

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

2013-02-17 Thread Alec Taylor
7;default/register.html') > response.view = 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

[web2py] Replace default /register and /login views

2013-02-17 Thread Alec Taylor
b2py//views/default folder also has 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 &

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

2013-02-15 Thread Alec Taylor
On Fri, Feb 15, 2013 at 8:00 PM, Niphlod 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 > https://github.com

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 6:3

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

2013-02-14 Thread Alec Taylor
n 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 &q

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 wrote: > this stores dates in UTC but displays date in alternate timezone. You can > set the represent property

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

2013-02-12 Thread Alec Taylor
the login case we merge the activity of the user > from before login. > > now if the business would allow us to require login before 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

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 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 account, and w

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
'd like it to be. On Sun, Feb 10, 2013 at 12:42 AM, Alec Taylor wrote: > On Sat, Feb 9, 2013 at 11:53 PM, Niphlod wrote: >> wait a second . you may be missing an important bit. >> DAL has no introspection whatsoever for retrieving existing tables if you >> have not

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 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 > easy, but l

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

2013-02-09 Thread Alec Taylor
llowing your documentation developers should use you module api > as: > > models/db.py > > db = DAL(.....) > > from myawesomemodule import MyAwesomeClass > > something = MyAwesomeClass(db) > something.define_tables() > > auth.settings.login_methods = something &g

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

2013-02-08 Thread Alec Taylor
"object" for you 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 wrote: >> >> Hold up; you mean to t

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

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

2013-02-08 Thread Alec Taylor
ems"]) 7231 7232 @property TypeError: 'NoneType' 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 >

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
D64)] Type "copyright", "credits" or "license" for more information. 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 wrote: > Experiencing s

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

2013-02-08 Thread Alec Taylor
odules folder couldn't find 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? Than

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
must '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

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

2013-02-01 Thread Alec Taylor
erably from command-line; currently do this with >sublime_text - Linux and Windows Thanks for all suggestions, Alec Taylor On Sat, Feb 2, 2013 at 3:13 AM, select wrote: > On Thursday, January 31, 2013 1:26:45 PM UTC+1, Johann Spies wrote: >> On 31 January 2013 13:03, Jason Brower wrote:

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 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 porting it to DAL f

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

2013-01-31 Thread Alec Taylor
ata in DAL? - 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

Re: [web2py] Re: Autoincrement field

2013-01-30 Thread Alec Taylor
On Wed, Jan 30, 2013 at 1:15 AM, Massimo Di Pierro 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 from this group and stop re

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 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. --

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 i

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 wrote: > import sys > sys.path.append('/home/www-data/web2py') > from gluon import DAL, Field > > -- > > > --

  1   2   3   4   5   >