[web2py] Model-less approach should be standadized in web2py in future releases ...

2012-08-15 Thread David Marko
Something like this https://snipt.net/rochacbruno/again-an-approach-to-model-less-in-web2py/ should be standardized in web2py in future releases. There are a few concepts described in this forum but web2py needs some standardized approach integrated into core ... is there any discussion on

[web2py] [ANNOUNCE] FPDF for python v1.7: unicode ttf support, png alpha channel and more!

2012-08-15 Thread Mariano Reingart
I'm pleased to announce the 1.7 release of FPDF for python (pyfpdf) library, a port of the Free-PDF generator originally developed in PHP: https://code.google.com/p/pyfpdf/ Changelog: * added UTF-8 TTF font subset embedding * experimental Py3K compilance * added PNG alpha channel support *

[web2py] Adding hyperlink to response.subtitle?

2012-08-15 Thread Alec Taylor
In menu.db I tried with: response.subtitle = T('Aggregator for')+A('Company', _href='http://company.org/') And response.subtitle = T('Aggregator for')+'a href=http://company.org/;Company/a') But neither rendered the hyperlink, both left me with a subtitle displaying a href… How do I add a

Re: [web2py] Adding hyperlink to response.subtitle?

2012-08-15 Thread Bruno Rocha
response.subtitle = *XML*(T('Aggregator for')+A('Company', _href=' http://company.org/')) *Bruno Cezar Rocha** - @rochacbruno* rochacbr...@gmail.com | Mobile: +55 (11) 99210-8821 www.CursoDePython.com.br | www.rochacbruno.com.br Blog: Open links which points outside your own site in a new

[web2py] Re: editing modules in modules folder

2012-08-15 Thread lyn2py
Modules will persist. Use this code in your controller in development mode :) from gluon.custom_import import track_changes; track_changes(True) On Wednesday, August 15, 2012 1:55:16 PM UTC+8, Janath wrote: Hi, I have kept some subroutines in modules folder of a web2py application. I

[web2py] Re: custom built login form

2012-08-15 Thread lyn2py
Maybe you can show us the controller code? The controller needs to have code that looks something like: form=SQLFORM(db.table) if form.process().accepted: response.flash = 'form accepted' elif form.errors: response.flash = 'form has errors' return dict(form=form)

[web2py] Re: custom built login form

2012-08-15 Thread shartha
This is the form I am using in my layout file -- thus no controller involved. I am using the {{=auth.login()}} form which comes with the framework. I define the form in the first line of the snippet I posted in my original post. Is that not the right way to go? On Tuesday, August 14, 2012

[web2py] Delete EXPORT button from SQLFORM.grid

2012-08-15 Thread Jan Rozhon
Hi all, did someone solve how to remove the export button from the SQLform.grid? Additionally, what is the proper way to display JSON string in the field? Thanks for any hints, Jan --

Re: [web2py] Delete EXPORT button from SQLFORM.grid

2012-08-15 Thread Johann Spies
On 15 August 2012 11:31, Jan Rozhon jan.roz...@gmail.com wrote: did someone solve how to remove the export button from the SQLform.grid? Use the option: csv = False when you define the grid. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will

Re: [web2py] Grahs

2012-08-15 Thread Andrew
You may also want to look at : http://nvd3.com/ghpages/cumulativeLine.html based on the d3js.org library. Very Cool ! I've started using d3 visualizations fed from web2py json (or csv) uris. On Wednesday, August 15, 2012 11:34:19 AM UTC+12, rochacbruno wrote: If it is a webapp you can

[web2py] cascading drop down list

2012-08-15 Thread lucas
ok, trying to do the ajax drop down list as well-written under: http://www.web2pyslices.com/slice/show/1526/cascading-drop-down-lists-with-ajax-2 but i am using SQLFORM and i am doing everything under the controller, like: assignform = SQLFORM(cla, record=clai)

[web2py] Re: custom built login form

2012-08-15 Thread Yarin
You may need to include the form's hidden fields in your view. Does {{=form.hidden_fields()}} work? See here: https://groups.google.com/d/msg/web2py/k5D19CHB2TU/9Ll7ly5ZOK4J On Wednesday, August 15, 2012 1:51:12 AM UTC-4, shartha wrote: Hello, Quick question: Instead of {{=auth.login()}},

Re: [web2py] Delete EXPORT button from SQLFORM.grid

2012-08-15 Thread Jan Rozhon
Silly me didnt notice this option. Thx Dne středa, 15. srpna 2012 11:43:46 UTC+2 Johann Spies napsal(a): On 15 August 2012 11:31, Jan Rozhon jan.r...@gmail.com javascript:wrote: did someone solve how to remove the export button from the SQLform.grid? Use the option: csv = False when

Re: [web2py] [ANNOUNCE] FPDF for python v1.7: unicode ttf support, png alpha channel and more!

2012-08-15 Thread Ovidio Marinho
good! Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi 83 9334 0266 - Claro Brasil 2012/8/15

Re: [web2py] client-side validation plugin

2012-08-15 Thread Anthony
I would like to see it built in in SQLFORM(..., clientvalidation=True) +1 --

[web2py] Re: editing modules in modules folder

2012-08-15 Thread Anthony
Note that web2py models, controllers, and views are executed by the framework on every request -- therefore, any changes to those files are reflected immediately upon the next request. Modules, however, are imported -- in Python, once a module is imported, changes to the module file are not

[web2py] Re: Adding hyperlink to response.subtitle?

2012-08-15 Thread Anthony
response.subtitle = T('Aggregator for')+A('Company', _href=' http://company.org/') In the views, all strings are automatically escaped (unless wrapped in XML()). web2py HTML helpers are not escaped. However, the above concatenates a T() object with a helper -- the result of that

[web2py] minify javascript

2012-08-15 Thread joyfortoys
Hi, Apologies if this is a silly question, but it's something that Google nor I could find. How do I have web2py automatically serve up minified versions of my JS and CSS files? I assumed it was built in (just couldn't find it), but if not, I'll roll my own. Thanks! - W --

[web2py] Re: Book clarification regarding verify_email reset_password

2012-08-15 Thread JoeCodeswell
Dear Anthony, Thanks for the clarifications and the bug fix. Love and peace, Joe On Monday, August 13, 2012 6:09:46 PM UTC-7, JoeCodeswell wrote: Dear web2py folks, In the book it says in /chapter/29/9#Authentication: In Auth, by default, email verification is disabled. To enable

[web2py] Book - Overview Typo

2012-08-15 Thread Frank Cheong
Just spotted one typo in the middle of the Overview Chapter inside the xmlrpc section, ) is missing at the end of code. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. service = Service() @service.xmlrpc def find_by(keyword): finds pages that contain keyword for XML-RPC return

[web2py] Re: Book - Overview Typo

2012-08-15 Thread Anthony
Thanks for pointing this out. Note, the ) should actually go after (keyword): db(db.page.title.contains(keyword)).select().as_list() Anthony On Wednesday, August 15, 2012 5:52:53 AM UTC-4, Frank Cheong wrote: Just spotted one typo in the middle of the Overview Chapter inside the xmlrpc

[web2py] Re: custom built login form

2012-08-15 Thread Anthony
Hmm, that exact code works for me. What do you mean the form doesn't work -- just that you get the invalid login message, or is there something else wrong with the appearance or processing of the form? If you replace the code shown below with just {{=auth.login()}}, everything works fine?

[web2py] Re: custom built login form

2012-08-15 Thread Anthony
You may need to include the form's hidden fields in your view. Does {{=form.hidden_fields()}} work? See here: https://groups.google.com/d/msg/web2py/k5D19CHB2TU/9Ll7ly5ZOK4J Not necessary in this case -- form.custom.end already includes the hidden fields. Anthony --

[web2py] Re: LinkedIn Integration - my step by step tutorial

2012-08-15 Thread Carl
Found this code very useful! Udi's time has saved me so much time. One minor change I made was to user() function in default.py. The redirect() calls parameters: change redirect(URL('user', 'login')) to redirect(URL(f='user', args=['login',])) On Wednesday, 4 April 2012 06:49:46 UTC+1, Udi

[web2py] Re: [ANNOUNCE] FPDF for python v1.7: unicode ttf support, png alpha channel and more!

2012-08-15 Thread Massimo Di Pierro
Will merge today. Excellent Mariano. On Wednesday, 15 August 2012 01:21:20 UTC-5, Mariano Reingart wrote: I'm pleased to announce the 1.7 release of FPDF for python (pyfpdf) library, a port of the Free-PDF generator originally developed in PHP: https://code.google.com/p/pyfpdf/

[web2py] Re: bad image and word Validator

2012-08-15 Thread Rob_McC
I have badwords.py working. I want to use as a badwords filter for username, so (lower case, no spaces), just as google accounts do. Just a couple questions: * Q1*- I placed this code in db.py - Is that where it is suppose to go? *Q2*- I thought the python *.match* would work the way I want,

[web2py] Re: bad image and word Validator

2012-08-15 Thread Anthony
*Q1*- I placed this code in db.py - Is that where it is suppose to go? If it's only needed for registration, maybe put it in a module and import in the user() function when request.args(0)=='registration' (assuming you're using the standard user() function). *Q2*- I thought the python

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-15 Thread villas
+1 This customisation seems like an excellent idea to include in Welcome not least because it really demonstrates how to customise auth. For public websites it is important to have strong defaults built-in. For intranets, it would be trivial to weaken this (e.g. comment out IS_STRONG or

[web2py] Supporting multiple authentication routes/methods

2012-08-15 Thread Carl
Q: How do I handle the setting of the equivalent auth.settings.actions_disabled for a 2nd authentication method? i.e. I won't have a registration form or options to reset password or request a password reset for LinkedIn-authenticated users but still need that functionality for a subset of

Re: [web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-15 Thread Rob_McC
villas: *because it really demonstrates how to customise auth.* . thanks for comment... . I wonder, would it be a* good idea *for me to upload an EXAMPLE .w2p that summarized this thread? which would just be the Welcome app, with the customized auth etc.? . I also wonder, that the

Re: [web2py] Re: Adding hyperlink to response.subtitle?

2012-08-15 Thread Alec Taylor
Thanks, the `CAT` solution was rather neat. On Wed, Aug 15, 2012 at 11:28 PM, Anthony abasta...@gmail.com wrote: response.subtitle = T('Aggregator for')+A('Company', _href='http://company.org/') In the views, all strings are automatically escaped (unless wrapped in XML()). web2py HTML

[web2py] Re: bad image and word Validator

2012-08-15 Thread Rob_McC
thanks once again. -1- I'll move to a module as you suggested. -2- The code is just the .py file (below), To test out, I just through it in *layout.html* {{=IS_BAD()('badass')}} /hr Here is badword.py, from post above import base64, re BADWORDS=re.compile(base64.b64decode(

[web2py] Re: bad image and word Validator

2012-08-15 Thread Anthony
In that case, you'd want: BADWORDS = re.compile(r'ass|jerk|otherbadword|etc') or if you already have a list or want to use the list in other places: badlist = ['ass', 'jerk', 'etc'] BADWORDS = re.compile(r'|'.join(badlist)) Anthony On Wednesday, August 15, 2012 11:22:21 AM UTC-4, Rob_McC

[web2py] Re: Monitoring scheduler with supervisord

2012-08-15 Thread Niphlod
Because web2py let you launch multiple schedulers with web2py.py -K myapp,myapp or web2py.py -K myapp1,myapp2 the actual scheduler process is a subprocess of the main one you launch with web2py.py. If you launch with the external method, as python gluon/scheduler.py -t tasks.py -f etc no

[web2py] Ajax cascading selects/drop down lists - passing javascript variabeles

2012-08-15 Thread Mathias
{{extend 'layout.html'}} select id=list1 optionoption 1/option optionoption 2/option /select select id=list2 ... /select script var selectedOption='' function returnSelectedOption() { selectedOption = $(#list1).val(); * AJAX Call * }

[web2py] Re: custom built login form

2012-08-15 Thread shartha
I get the *invalid login *alert. Appearance changes but that's due to the CSS (Not my concern at this moment). I should also mention that I am not suing the css files that come with the framework (web2py.css). Could that be the reason. --

[web2py] Re: Model-less approach should be standadized in web2py in future releases ...

2012-08-15 Thread Anthony
What are you suggesting? The various approaches are already possible, so what needs to be integrated? Are you just suggesting that the documentation recommend a particular standard approach (if so, which one)? Or do you have in mind some additional functionality being built that is not yet

Re: [web2py] Re: bad image and word Validator

2012-08-15 Thread Jonathan Lundell
On 15 Aug 2012, at 8:39 AM, Anthony abasta...@gmail.com wrote: In that case, you'd want: BADWORDS = re.compile(r'ass|jerk|otherbadword|etc') or if you already have a list or want to use the list in other places: badlist = ['ass', 'jerk', 'etc'] BADWORDS = re.compile(r'|'.join(badlist))

[web2py] Re: custom built login form

2012-08-15 Thread Anthony
CSS shouldn't matter. Again, to confirm, replacing your code with {{=auth.login()}} works? Where are you placing that form -- in the layout or a particular view? If the layout, do you have the same problem regardless of the page (i.e., URL) from which you log in? If a specific view, can we see

[web2py] Re: Supporting multiple authentication routes/methods

2012-08-15 Thread Carl
Clarification... having looked at extended_login_form() I can see it's not the solution I'm looking for (instead, it does what it says on the tin!) I'll repost a new question. On Wednesday, 15 August 2012 16:05:24 UTC+1, Carl wrote: Q: How do I handle the setting of the equivalent

[web2py] Adding authentication without manual user registration to an app

2012-08-15 Thread Carl
My app will let users register and login using username and password. For a subset of users I'd like them to be able to skip manual registration and instead use their LinkedIn account to authenticate from which I can then retrieve their LinkedIn profile data. I can switch out one method for

[web2py] Re: LinkedIn Integration - my step by step tutorial

2012-08-15 Thread Massimo Di Pierro
or to redirect(URL('user', args='login')) or to redirect(URL('user/ogin')) On Wednesday, 15 August 2012 08:57:20 UTC-5, Carl wrote: Found this code very useful! Udi's time has saved me so much time. One minor change I made was to user() function in default.py. The redirect() calls

[web2py] Re: MARKMIN change of behavior

2012-08-15 Thread villas
1. I still don't understand why you departed from the behaviour of markdown to now create a single header line from multi-line text. The behaviour does not seem natural to me, especially as it introduces a new incompatibility with markdown. 2. I tested the change with regards the space

[web2py] Re: MARKMIN change of behavior

2012-08-15 Thread Massimo Di Pierro
I did not. markmin2html.py was rewritten to add new functionality and that was an epiphenomenon. I guess we can revert it. I will talk to Vladyslav and see what it involves. On Wednesday, 15 August 2012 11:31:05 UTC-5, villas wrote: 1. I still don't understand why you departed from the

Re: [web2py] Re: bad image and word Validator

2012-08-15 Thread Rob_McC
Thanks guys! I appreciate it Here is my code, which works, *but.. *as noted in my comments, if * asdf* is a racial slur, then *youasdf* should NOT be allowed as a username, even if *youasdf *is somehow taken in another context, in a real name or word. User will have to pick another

[web2py] Re: Enforcing - like gmail: first character of your username should be a letter (a-z) or number.

2012-08-15 Thread Anthony
I did assume that the old validator *would still fire,* and not be replaced with just my validator.- but used WITH my validator. db.auth_user.username.requires = [list, of, validators] db.auth_user.username.requires = IS_MATCH(...) FYI, I just submitted a patch that will force an

Re: [web2py] Re: bad image and word Validator

2012-08-15 Thread Anthony
*but.. *as noted in my comments, if * asdf* is a racial slur, then *youasdf* should NOT be allowed as a username, even if *youasdf *is somehow taken in another context, in a real name or word. User will have to pick another username. What do I need to do the the reg ex to flag

Re: [web2py] Re: bad image and word Validator

2012-08-15 Thread Anthony
You'd also want to add word boundaries r'\b' to the RE, to avoid false positives on eg 'assert'. Though he said he explicitly did not want to do that. Anthony --

[web2py] Access app directly after deploy

2012-08-15 Thread AdrianPop
Hello, I am new to web2py after a short research on web2py, django and pylons. I create a new app which is accessible trough http://localhost/app1/ . How can I deploy it for a production environment, of course, using web2py built-in webserver and access the application only by:

[web2py] url validator

2012-08-15 Thread Hojat Taheri
in a shorten-er built by web2by i want to validate url's first, if it's not valid goes back to the first page with an error message. this is my code in controller (mvc arch.) but i don't get what's wrong..!! import urllib def index(): return dict() def random_maker(): url =

[web2py] How to access app directly without subfolder ?

2012-08-15 Thread AdrianPop
I want to access my application directly like http://domain.com , not http://domain.com/app1 . How can I do this with web2py built-in webserver ? --

Re: [web2py] Re: bad image and word Validator

2012-08-15 Thread Jonathan Lundell
On 15 Aug 2012, at 10:02 AM, Anthony abasta...@gmail.com wrote: You'd also want to add word boundaries r'\b' to the RE, to avoid false positives on eg 'assert'. Though he said he explicitly did not want to do that. Ah, well. --

[web2py] modules folder and pythonpath in web2py

2012-08-15 Thread Kevin Miller
Hi all, I have decided to start using eclipse for python development. I did all the import stuff and added the modules folder in my pythonpath. Everything works find except I keep getting the red X when I am using files from the modules folder. It works without problems with web2py. I am using

Re: [web2py] How to access app directly without subfolder ?

2012-08-15 Thread Bruno Rocha
Maybe it can help you: http://rochacbruno.com.br/web2py-routes/ --

Re: [web2py] url validator

2012-08-15 Thread Bruno Rocha
I would use something like this: *import requests* class IS_VERIFIED_URL(object): def __init__(self, error_message=url does not exist!): self.error_message = error_message def __call__(self, url): error = None *response = requests.get(url)* if

Re: [web2py] Re: bad image and word Validator

2012-08-15 Thread Rob_McC
Anthony: *As I mentioned earlier, replace BADWORDS.match(value) with BADWORDS.search(value). *. Sorry I missed that, you made it perfectly clear... * add word boundaries r'\b' to the RE, .. Though he said he explicitly did not want to do that. *. Sorry I wasn't clear on that but the word

[web2py] Re: [ANNOUNCE] FPDF for python v1.7: unicode ttf support, png alpha channel and more!

2012-08-15 Thread Andrew
Excellent. Haven't used it yet but looking forward to it. One question The book mentions this package in the core section, but in services it says: ...web2py can also generate PDF documents, with an additional library called ReportLab... Is it either pyfpdf or report lab, or do I need both ?

Re: [web2py] url validator

2012-08-15 Thread Anthony
Also, note that requests is a third-party library, so you'll have to install it first. Also, keep in mind that when a URL is submitted for validation, there will be some delay, because your server will then have to make a request for the URL. If you've got lots of traffic, this could make it

[web2py] Re: Install in hostgator

2012-08-15 Thread Rob_McC
Hi: I have several separate hosting accounts on hostgator, for last 6 years, been happy, good support, php runs well, wordpress, joomla, drupal etc. *But, for web2py, I now have an account on: *https://www.webfaction.com/ I have hosting on GAE, but many issues there I wasn't happy with...

[web2py] Re: Adding authentication without manual user registration to an app

2012-08-15 Thread Pystar
Try janrain but with some caveats able to skip manual registration and instead use their LinkedIn account to authenticate from which I can then retrieve their LinkedIn profile data. I can switch out one method for the other. But how to I support both in one app? --

Re: [web2py] Re: [ANNOUNCE] FPDF for python v1.7: unicode ttf support, png alpha channel and more!

2012-08-15 Thread José Luis Redrejo
You don't need reportlab to use pyfpdf, so as you said, the wording is not correct in the book. Regards José L. 2012/8/15 Andrew awillima...@gmail.com: Excellent. Haven't used it yet but looking forward to it. One question The book mentions this package in the core section, but in services

[web2py] Back-and-forth between DAL SQLAlchemy

2012-08-15 Thread Larry Wapnitsky
I have a project in which I've just written the database functions using SQLAlchemy. It was much simpler than my original, hand-written SQL queries, especially once I got the hang of creating relationships with SA's ORM. Now, I would like to create a front-end for this using web2py, but, from

[web2py] Re: webgrid Id key error

2012-08-15 Thread Andre Kozaczka
Found this on Mr. Freeze's site: * * **UPDATE** I recommend using PowerGrid instead of this module as it has more features and is better maintained:http://labs.blouweb.com/PowerGrid/ I tried using PowerGrid and I'm not having the same problem as before. On Tuesday, August 14, 2012 4:00:37 PM

[web2py] Re: How to access app directly without subfolder ?

2012-08-15 Thread pbreit
This works for me in web2py/routes.py: routers = dict( # base router BASE = dict( default_application = 'myapp', ) ) --

[web2py] Re: Model-less approach should be standadized in web2py in future releases ...

2012-08-15 Thread pbreit
I disagree. Current model definition works fine for vast majority of projects and the alternatives are still much too confusing IMO. --

[web2py] Re: Monitoring scheduler with supervisord

2012-08-15 Thread Yarin
The embed-mode script works great and allows us to use Supervisord- Thanks-- On Wednesday, August 15, 2012 11:44:18 AM UTC-4, Niphlod wrote: Because web2py lets you launch multiple schedulers with web2py.py -K myapp,myapp or web2py.py -K myapp1,myapp2 the actual scheduler process is a

Re: [web2py] Ajax cascading selects/drop down lists - passing javascript variabeles

2012-08-15 Thread Mathias Van Daele
Hi, Suppose you have a table REACTION with 2 fields : type, and value. If you have a Create form for REACTION, the options you can choose for value, depends on your type selection. Therefore you need ajax. I guess this is quite standard. None of the slices I think can be used in this

[web2py] Complex query in DAL?

2012-08-15 Thread pbreit
Should I even attempt a complex query like this in DAL? Where do I begin? $q = SELECT u.user_id, u.fname, u.lname, u.telephone1, u.email, u.is_active, u.company, u.is_landlord, u.last_login, u.last_login_ip, u.login_times, count(DISTINCT p.prop_id) as properties, count(uu.unit_id) as units,

[web2py] Is powergrid considered dead ?

2012-08-15 Thread Nomad
I had been looking to use powergrid for a project that requires consuming json data from a remote source at an interval. The standard project link goes no where. A quick google search show me a bitbucket but it doesnt look very update to date. Is this something i can do in web2py now without

Re: [web2py] Complex query in DAL?

2012-08-15 Thread Bruno Rocha
Thats evil! I would create a view or a procedure in database. On Wed, Aug 15, 2012 at 6:41 PM, pbreit pbreitenb...@gmail.com wrote: Should I even attempt a complex query like this in DAL? Where do I begin? $q = SELECT u.user_id, u.fname, u.lname, u.telephone1, u.email, u.is_active,

Re: [web2py] Is powergrid considered dead ?

2012-08-15 Thread Bruno Rocha
HI, I am not updating this project since web2py gets the SQLFORM.grid feature, But, I am using this on some websites and its working very well for Json datasources. Bur you can go and use datatables.net or Jqgrid, or sencha, or wijmo grid ( http://wijmo.com/widgets/wijmo-complete/grid/) this

Re: [web2py] Re: bad image and word Validator

2012-08-15 Thread Rob_McC
*Note:* I didn't know what *.compile* was used. *Now I do:* http://docs.python.org/library/re.html re.compile(*pattern*, *flags=0*) Compile a regular expression pattern into a regular expression object, which can be used for matching using its

Re: [web2py] Re: Model-less approach should be standadized in web2py in future releases ...

2012-08-15 Thread Bruno Rocha
On Wed, Aug 15, 2012 at 5:52 PM, pbreit pbreitenb...@gmail.com wrote: I disagree. Current model definition works fine for vast majority of projects and the alternatives are still much too confusing IMO. I just proposed a solution for testing: http://rochacbruno.com.br/lazy-dal-beta-working/

[web2py] Re: modules folder and pythonpath in web2py

2012-08-15 Thread Massimo Di Pierro
+1 On Wednesday, 15 August 2012 12:09:15 UTC-5, dundee wrote: Hi all, I have decided to start using eclipse for python development. I did all the import stuff and added the modules folder in my pythonpath. Everything works find except I keep getting the red X when I am using files from

[web2py] Re: [ANNOUNCE] FPDF for python v1.7: unicode ttf support, png alpha channel and more!

2012-08-15 Thread Massimo Di Pierro
Where is this? It may be out of context. On Wednesday, 15 August 2012 12:38:30 UTC-5, Andrew wrote: Excellent. Haven't used it yet but looking forward to it. One question The book mentions this package in the core section, but in services it says: ...web2py can also generate PDF

[web2py] Re: Back-and-forth between DAL SQLAlchemy

2012-08-15 Thread Massimo Di Pierro
Perhaps this may be useful? On Wednesday, 15 August 2012 14:22:36 UTC-5, Larry Wapnitsky wrote: I have a project in which I've just written the database functions using SQLAlchemy. It was much simpler than my original, hand-written SQL queries, especially once I got the hang of creating

[web2py] Re: Back-and-forth between DAL SQLAlchemy

2012-08-15 Thread Massimo Di Pierro
I meant this: http://web2py.com/AlterEgo/default/show/189 On Wednesday, 15 August 2012 14:22:36 UTC-5, Larry Wapnitsky wrote: I have a project in which I've just written the database functions using SQLAlchemy. It was much simpler than my original, hand-written SQL queries, especially

Re: [web2py] Re: Appengine CPU cycles

2012-08-15 Thread Derek
Yes, I tried it on the model, it is true on every request. I don't understand why. On Tuesday, August 14, 2012 3:07:43 PM UTC-7, Anthony wrote: Where would you put that? If in a model or controller, won't the condition be true on every request? Anthony On Tuesday, August 14, 2012 4:44:24

[web2py] Re: bad image and word Validator

2012-08-15 Thread Derek
As far as image filtering is concerned, these are commonly implemented as 'MTurk' tasks. Take a look at Amazon Mechanical Turk if you want this feature. You generally want to have a photo viewed 3x and get at least 2 agreements that it is a prohibited type of image. Those that disagree get a

Re: [web2py] Ajax cascading selects/drop down lists - passing javascript variabeles

2012-08-15 Thread Derek
Couldn't you precalculate and put them in your javascript in the page itself? script var nissancars = {{=XML(nissancars)}} var toyotacars = {{=XML(toyotacars)}} object.onchange=changeMake(this) function changeMake(carmaker){ if(carmaker.value == nissan) { updateOptions(nissancars); }

Re: [web2py] Re: Model-less approach should be standadized in web2py in future releases ...

2012-08-15 Thread spiffytech
Well done, sir! I think this is an excellent way to solve the problem. Model-less is still there for anyone who wants it, but with LazyDAL web2py fixes the performance hit it takes from models while retaining the simplicity, lack of boilerplate code, and fast implementation times that set it

[web2py] nginx: uploading files with size 1 mb

2012-08-15 Thread Alan Etkin
If you're using nginx + uwsgi, it's possible that the server refuse to upload files larger than 1 Megabyte. This can be a problem if you try to upload an application with the admin interface. http://www.nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size Adding an explicit

Re: [web2py] Is powergrid considered dead ?

2012-08-15 Thread Derek
I love working with Adobe Spry Framework. It's great, and supports XML as well as JSON for datasets. On Wednesday, August 15, 2012 3:00:49 PM UTC-7, rochacbruno wrote: HI, I am not updating this project since web2py gets the SQLFORM.grid feature, But, I am using this on some websites and

Re: [web2py] Re: Appengine CPU cycles

2012-08-15 Thread Massimo Di Pierro
That is by design. model is not a module. this of db.define_table('whetever',Field('ts','datetime',default=request.now)) request.now is the date of the request. For this default to be properly set this MUST run at every request. This is the price you pay for the simple web2py syntax. If you

Re: [web2py] Ajax cascading selects/drop down lists - passing javascript variabeles

2012-08-15 Thread Mathias Van Daele
Thanks for your reply Derek ! This could be interesting for me. I will try to implement it like that. Mathias 2012/8/16 Derek sp1d...@gmail.com: Couldn't you precalculate and put them in your javascript in the page itself? script var nissancars = {{=XML(nissancars)}} var toyotacars =

[web2py] Re: MARKMIN change of behavior

2012-08-15 Thread villas
Well some epiphenomena may be serendipitous, but probably not this one. Let's face it, a change which breaks page content would always be unwelcome, unless delivering some other benefit. On Wednesday, August 15, 2012 5:48:56 PM UTC+1, Massimo Di Pierro wrote: I did not. markmin2html.py

[web2py] Re: Can't import external modules

2012-08-15 Thread Matt
Is there any way around this? This seems to have broken only with the upgrade to Mountain Lion. We develop this app primarily on (and for) linux, however I do most of my development on my laptop, so it's quite inconvenient to have to use a separate install just on this computer. Do you have

[web2py] Re: MARKMIN change of behavior

2012-08-15 Thread Massimo Di Pierro
You make a good point. We will investigate. technically markmin in in contrib. We do not fully guarantee backward compatibility of stuff in contrib, even if it is written us. Anyway, because it is written by us and because this change was not intentional we'll look into reverting it. massimo

Re: [web2py] Graphs

2012-08-15 Thread FERNANDO VILLARROEL
Thank you everyone for you help. Where i can see some how to for i can use d3 visualizations fed from web2py or Charts? Regards. --- On Wed, 8/15/12, Andrew awillima...@gmail.com wrote: From: Andrew awillima...@gmail.com Subject: Re: [web2py] Grahs To: web2py@googlegroups.com Date: Wednesday,

[web2py] Re: custom built login form

2012-08-15 Thread shartha
Thanks Anthony for trying to help. Lol, I don't know I even mentioned CSS. Just to clarify, yes, I get the invalid login flash alert. I put the code as posted here in my layout.html file. I have the issue regardless of the page I am on. On Tuesday, August 14, 2012 10:51:12 PM UTC-7, shartha

[web2py] Re: custom built login form

2012-08-15 Thread Massimo Di Pierro
{{=form.hidden_fields()}} {{=form.custom.end}} should just be {{=form.custom.end}} it includes the hidden fields. On Wednesday, 15 August 2012 20:38:35 UTC-5, shartha wrote: Thanks Anthony for trying to help. Lol, I don't know I even mentioned CSS. Just to clarify, yes, I get the

[web2py] need help testing memcache

2012-08-15 Thread Massimo Di Pierro
the logic has been rewritten. If you have code that uses web2py+memcache, can you check it still works for you? --

[web2py] Re: Can't import external modules

2012-08-15 Thread Anthony
Is there any way around this? This seems to have broken only with the upgrade to Mountain Lion. We develop this app primarily on (and for) linux, however I do most of my development on my laptop, so it's quite inconvenient to have to use a separate install just on this computer. Do you

[web2py] Re: Access app directly after deploy

2012-08-15 Thread Massimo Di Pierro
You can call your app init or user the router/routes mechanism. http://www.web2py.com/books/default/chapter/29/4?search=router#Parameter-based-system Not sure what you mean by reliable. The built-in web server is very fast and supports https. I do not have benchmarks handy and some more

[web2py] Re: custom built login form

2012-08-15 Thread shartha
Thanks Massimo, that solved the problem! :-) On Tuesday, August 14, 2012 10:51:12 PM UTC-7, shartha wrote: Hello, Quick question: Instead of {{=auth.login()}}, I am using the following to be able to customize my login form. However the resulting form does not work and I cannot login with

[web2py] Re: custom built login form

2012-08-15 Thread Anthony
Aside from removing the unnecessary form.hidden_fields(), what changed in your code? Isn't it otherwise the same code that wasn't working before? Anthony On Wednesday, August 15, 2012 10:18:38 PM UTC-4, shartha wrote: Thanks Massimo, that solved the problem! :-) On Tuesday, August 14, 2012

[web2py] Re: Electronic voting anybody?

2012-08-15 Thread Rob_McC
Hey Massimo Looks much better... OK, I tried again. IN Safari on my Mac I created an election. The https: error never came up, I was redirected to http:// Email was sent, inviting to vote. Big ELECTION by Rob Link to vote:

Re: [web2py] Re: Functions in Views

2012-08-15 Thread Pystar
still doesnt work On Wednesday, August 15, 2012 1:45:47 AM UTC+1, Pystar wrote: OK, After doing type(item.now). I discovered that web2py is escaping my retrieved data from the database and converting everything into strings. And since prettydate() doesnt work on strings but datetime

[web2py] LinkedIn integration working, but not logging in on web2py side?

2012-08-15 Thread Alec Taylor
After modifying the `LinkedInAccount.py` from contrib\login_methods with PEP8 function names and switching from the Google Code python-linkedinhttp://code.google.com/p/python-linkedin/library to its updated fork on Github, on login I was presented with

Re: [web2py] Re: modules folder and pythonpath in web2py

2012-08-15 Thread Kevin Miller
I realize that I had to add the modules folder as an external library. :-) Everything seems to be ok now. On Wed, Aug 15, 2012 at 5:31 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: +1 On Wednesday, 15 August 2012 12:09:15 UTC-5, dundee wrote: Hi all, I have decided to start

  1   2   >