Re: [web2py] standalone we-app example

2012-07-02 Thread orsomannaro
>> web-app example? wxPython solution thank you anyway :)

[web2py] How to update UI and DB in web2py?

2012-07-02 Thread Amit
I have to implement one application in web2py where my app will have Restful web service which will collect the request data and insert or update to the database and after updating to db it will display all update data to the UI. Lets take an example of employee: I have employee table(employe

[web2py] IS_IN_SET() and IS_NOTIN_DB()

2012-07-02 Thread Annet
In a table definition I have the following validators: db.PromoUnit.promoPositionID.requires=IS_IN_DB(db,'PromoPosition.id','%(name)s',orderby='PromoPosition.id',zero='select a value') db.PromoUnit.sequenceNumber.requires=IS_IN_SET(['1','2','3'],zero='select a value') db.PromoUnit.sequenceNumbe

[web2py] Re: IS_IN_SET() and IS_NOTIN_DB()

2012-07-02 Thread Niphlod
this is pretty basic for web2py models Every Field() "requires" attribute can be a single or a list of validators. If you need to check against multiple validator, append them, as db.table.field = [validator1, validator2] There is one caveat: when there is more than one validator no select w

[web2py] how to update a digitally signed component via response.js

2012-07-02 Thread Miguel Lopes
I have a view index.html with two components - myform and namelist. The index action requires_login() and both myform and namelist actions requires_signature() This works as expected. The problem is that the update of namelist via response.js set in the myform action fails. I figure that since in

[web2py] Best way to combine superfish and SEO?

2012-07-02 Thread Jarrod Wilcox
Starting with the Welcome template, what is the cleanest way to combine superfish menuing with crawlability for SEO?

[web2py] Re: Server side rendering requiring js library. Svg to png. D3.js

2012-07-02 Thread Martin Felder
Hi Andrew, I'm currently looking for a good data vis toolkit for web2py. Currently we are plotting things with matplotlib in the background and display the generated PNGs, but that feels rather awkward and is not interactive (ok, I could generate SVGs and fiddle with them using StringIO and XML

Re: [web2py] Re: Multi_tenant

2012-07-02 Thread Ovidio Marinho
How to save the id as it does the automatic ip? 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

[web2py] Re: Multi_tenant

2012-07-02 Thread Fabiano Faver
It can be associated with auth groups? I want to limit content access for some users groups. Using the scenario given by Ovidio, every hospital user could see it own content, managers would see content from many hospital of a region and administrators, directors would see all hospitals. Preferab

[web2py] DAL : fill with zeroes a specific field before insert / update

2012-07-02 Thread Santiago
Hello, I have a field defined as below : Field('id_indra', length=5, label=T('ID Indra'), notnull=False, requires=[REQUIRED, MAX_5, IS_MATCH(r'^[a-zA-Z0-9]{5}$')]) Is it is possible to intercept all inserts / updates over this field and do a zfill() before the accion takes place? So, if the f

[web2py] Nothing is selected in select box on user's profile page

2012-07-02 Thread Alexei Vinidiktov
Hello, I'm developing an educational RIA for foreign language learners with web2py. I need users to submit their native language and the languages they are learning when registering at the site. For that I've added extra fields to the db.auth_user table. The user's native language should be

Re: [web2py] DAL : fill with zeroes a specific field before insert / update

2012-07-02 Thread Miguel Lopes
On Mon, Jul 2, 2012 at 2:08 PM, Santiago wrote: > Hello, > > I have a field defined as below : > > Field('id_indra', length=5, label=T('ID Indra'), notnull=False, > requires=[REQUIRED, MAX_5, IS_MATCH(r'^[a-zA-Z0-9]{5}$')]) > > Is it is possible to intercept all inserts / updates over this field

Re: [web2py] Re: using deck.js with web2py?

2012-07-02 Thread Doug Philips
On Sun, Jul 1, 2012 at 11:14 PM, Massimo Di Pierro wrote: > In the end I preferred reveal.js to deck.js > > This integrates reveal.js with markmin. > https://github.com/mdipierro/markmin-reveal-slides ... > Hope this is useful. It would be nice to make a web app for it where the > source is stored

[web2py] Re: DAL : fill with zeroes a specific field before insert / update

2012-07-02 Thread Anthony
> > Field('id_indra', length=5, label=T('ID Indra'), notnull=False, > requires=[REQUIRED, MAX_5, IS_MATCH(r'^[a-zA-Z0-9]{5}$')]) > What is REQUIRED and MAX_5 -- are those custom validators you created? > Is it is possible to intercept all inserts / updates over this field and > do a zfill()

[web2py] smartgrid look & feel with last trunk

2012-07-02 Thread szimszon
Hi! I noticed the following if you create a new app from welcome with smartgrid then the linked table names aren't looking like buttons anymore. And the acural table names are just a link it looks a bit odd... <><>

[web2py] Re: smartgrid look & feel with last trunk

2012-07-02 Thread szimszon
http://code.google.com/p/web2py/issues/detail?id=870 2012. július 2., hétfő 15:45:13 UTC+2 időpontban szimszon a következőt írta: > > Hi! > > I noticed the following if you create a new app from welcome with > smartgrid then the linked table names aren't looking like buttons anymore. > And the a

[web2py] Re: IS_IN_SET() and IS_NOTIN_DB()

2012-07-02 Thread Massimo Di Pierro
Try replace: db.PromoUnit.sequenceNumber.requires=IS_IN_SET(['1','2','3'],zero='select a value') db.PromoUnit.sequenceNumber.requires=IS_NOT_IN_DB(db(db.PromoUnit.sequenceNumber==request.vars.sequenceNumber), with: db.PromoUnit.sequenceNumber.requires= (IS_IN_SET(['1','2','3'],zero='select a v

[web2py] Re: Is this a bug? Restrictions in model file names

2012-07-02 Thread Chris
You're right, this is true throughout web2py. On Wednesday, January 18, 2012 7:28:50 AM UTC-5, Chris wrote: > > Just had a little surprise -- feels like a bug to me but let's hear > from the experts. > > Having read in the web2py book that models are executed in name-sort > order, I changed th

[web2py] Re: Strange value for HTTP_HOST when using ssh tunneling

2012-07-02 Thread Chris
Opened as issue #820 on 25-May-2012, see http://code.google.com/p/web2py/issues/detail?id=820 On Wednesday, May 23, 2012 10:03:04 PM UTC-4, Chris wrote: > > This seems like a problem in web2py or mod_wsgi -- or else I am confused. > Would appreciate any pointers from the experts. > > I'm runn

Re: [web2py] Re: Getting auth.settings.register_next to work...

2012-07-02 Thread Doug Philips
On Mon, Jul 2, 2012 at 1:03 AM, Anthony wrote: > Here's what the book says: > These must point to the URL you want to redirect your users to after the > various possible auth actions (in case there is no referrer): > > Notice the highlighted text. The _next URLs are default redirect URLs when > th

[web2py] Selecting one Option of presorted database entries

2012-07-02 Thread BlueShadow
Hi I got a table called Articles which contain the nuber of views and the date when they where written. I Sorted them in the default.py by the views and by the date. I Show them Sorted by Date on my index page. Now I like to add a button to switch from the one to the other. By default it should

[web2py] Re: {{=LOAD()}} and JavaScript function

2012-07-02 Thread Anthony
Looks like the ID of the outer div is "equalize", but earlier you referenced "equalize1" (which is what I used in my example). Anthony On Monday, July 2, 2012 2:45:00 AM UTC-4, Annet wrote: > > Hi Anthony, > > I read the jQuery API doc and tried your solution, for some reason it > doesn't work.

Re: [web2py] Re: Strange value for HTTP_HOST when using ssh tunneling

2012-07-02 Thread Jonathan Lundell
On Jul 2, 2012, at 7:05 AM, Chris wrote: > Opened as issue #820 on 25-May-2012, see > http://code.google.com/p/web2py/issues/detail?id=820 There are two things going on here. I think. One is web2py's practice of storing per-port admin passwords. This is arguably a security measure, though in m

Re: [web2py] Re: Getting auth.settings.register_next to work...

2012-07-02 Thread Anthony
> > I searched the book (free PDF) for "referrer". > The term "referrer" only occurs once, where you quoted above. No > explanation given, no mention of a "_next" var in the URL. > Then I searched for "referer" thinking, OK, maybe the explanation I'm > looking for just has a typo, but found on

[web2py] Re: Routes - simple requirement, but how??

2012-07-02 Thread Wikus van de Merwe
I might be missing something but it looks to me that there is a very simple solution to your problem. Rename the controller from "plugin_wiki" to "pretty_url". Then use the following routes.py: routers = dict( app1 = dict( domain = "domain1.com", default_controller = "default

[web2py] The new Instant Press CMS

2012-07-02 Thread netcode
Has anyone tried the new Instant Press 2.1.2 ? To me, its cool and has new features like the up and down votes on comments but also the 'share links' were removed. However, it says you can adjust the DAL config in the file "00config.py" but i dont even see any such file on the list. The present

[web2py] web2py slices: cascading drop down lists with ajax 2

2012-07-02 Thread Omi Chiba
Just posted on web2pyslices. http://www.web2pyslices.com/slice/show/1526/cascading-drop-down-lists-with-ajax-2 This is one of the solution for you If you're struggling with drop down lists using two tables which

Re: [web2py] Re: Routes - simple requirement, but how??

2012-07-02 Thread Jonathan Lundell
On Jul 2, 2012, at 8:43 AM, Wikus van de Merwe wrote: > I might be missing something but it looks to me that there is a very simple > solution to your problem. I think (not certain) that the "plugin_" prefix is magic for the plugin manager. If that's the case, one fix would be to invent a way to

[web2py] Re: new feature in trunk: better markmin

2012-07-02 Thread Alan
would it be possible to have css ID as well as class in markmin? : for class :: for id? so in a table - **A** | **B** | **C** 0 | 0 | X 0 | X | 0 X | 0 | 0 -:abc::idfortable

[web2py] grid search behaviour with foreign keys

2012-07-02 Thread simon
When you have a grid with a reference field then the search functionality does not work as expected. For example grid shows: Owner Dog John Basil However any search for John shows no records because the owner field is an integer in the database but has format set to displa

[web2py] Re: A page served by two different backends

2012-07-02 Thread Wikus van de Merwe
Your description is very confusing. Static content are the files that are not dynamically generated but simply served over the network, e.g. images, javascript, css. If you generate an HTML page using a view (template) and filling it with data from DB, that is a dynamic page generation. Now, yo

Re: [web2py] new feature in trunk, redirects via routes

2012-07-02 Thread Ovidio Marinho
Ok I'll make tests in production. 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

Re: [web2py] Re: uWSGI + Cherokee + web2py - a howto.

2012-07-02 Thread Leopold
listing of directory: % list /etc/alternatives/uwsgi* lrwxrwxrwx 1 root root 19 Jun 28 09:22 /etc/alternatives/uwsgi -> /usr/bin/uwsgi-core lrwxrwxrwx 1 root root 35 Jun 28 09:22 /etc/alternatives/uwsgi.1.gz -> /usr/share/man/man1/uwsgi-core.1.gz lrwxrwxrwx 1 root root 19 Jun 28 09:22 /etc/alter

Re: [web2py] The new Instant Press CMS

2012-07-02 Thread Chibuzo Ottih
alright, this is solved. the DAL settings are in appsettings.py under modules On Mon, Jul 2, 2012 at 4:49 PM, netcode wrote: > Has anyone tried the new Instant Press 2.1.2 ? To me, its cool and has new > features like the up and down votes on comments but also the 'share links' > were removed. H

Re: [web2py] The new Instant Press CMS

2012-07-02 Thread Alec Taylor
Also, you probably want to get the newer version (a couple of weeks newer) from the repository, that one has support for DISQUS :D On Tue, Jul 3, 2012 at 3:18 AM, Chibuzo Ottih wrote: > alright, this is solved. the DAL settings are in appsettings.py under > modules > > > On Mon, Jul 2, 2012 at 4

Re: [web2py] The new Instant Press CMS

2012-07-02 Thread Massimo Di Pierro
I do not see the attached images. :-( On Monday, 2 July 2012 12:18:46 UTC-5, netcode wrote: > > alright, this is solved. the DAL settings are in appsettings.py under > modules > > On Mon, Jul 2, 2012 at 4:49 PM, netcode wrote: > >> Has anyone tried the new Instant Press 2.1.2 ? To me, its cool a

Re: [web2py] DAL : fill with zeroes a specific field before insert / update

2012-07-02 Thread vinicius...@gmail.com
Remember "requires" property is not used when you just insert(), update() or update_record(). So, in Web2py you don't have anything like a db trigger. You could do it using a custom validator like CLEANUP() and using validate_and_insert() or validate_and_update() in substitution of regular ins

Re: [web2py] DAL : fill with zeroes a specific field before insert / update

2012-07-02 Thread Santiago Gilabert
Thanks all, I going to use a custom validator then. Best Regards, Santiago On Mon, Jul 2, 2012 at 3:00 PM, vinicius...@gmail.com wrote: > Remember "requires" property is not used when you just insert(), update() > or update_record(). > > So, in Web2py you don't have anything like a db trigger.

Re: [web2py] Re: Getting auth.settings.register_next to work...

2012-07-02 Thread Doug Philips
On Mon, Jul 2, 2012 at 11:03 AM, Anthony wrote: > Seems to me this has precisely the same meaning (though in a different > context). In the context of Auth, register_next is the URL after you > register, and in the context of Crud, create_next is the URL after > submission of a create form. What's

[web2py] How to import modules in “app/modules/” when using web2py_utils.test_runner

2012-07-02 Thread Kemaru
Folks, I have a module “myapp/modules/ a.py” and a controller “myapp/controllers/b.py”. b imports a using “import a” and everything works perfect. Now I am trying to run some unit tests using web2py_utils.test_runner ( http://packages.python.org/web2py_utils/test_runner.html). All of a sudde

[web2py] Re: How to update UI and DB in web2py?

2012-07-02 Thread pbreit
I'd suggest starting here: http://web2py.com/books/default/chapter/29/10#Restful-Web-Services

[web2py] Index call with variable

2012-07-02 Thread BlueShadow
I like to call the indexfunktion with a variable. preferably with a default value. Is there any way to do that?

[web2py] Re: smartgrid look & feel with last trunk

2012-07-02 Thread Jim S
I personally like it the new way. Just my 2 cents. -Jim On Monday, July 2, 2012 8:45:13 AM UTC-5, szimszon wrote: > > Hi! > > I noticed the following if you create a new app from welcome with > smartgrid then the linked table names aren't looking like buttons anymore. > And the acural table na

Re: [web2py] Re: Getting auth.settings.register_next to work...

2012-07-02 Thread Anthony
> > > Seems to me this has precisely the same meaning (though in a different > > context). In the context of Auth, register_next is the URL after you > > register, and in the context of Crud, create_next is the URL after > > submission of a create form. What's the problem? > > By "precisely th

[web2py] Re: smartgrid look & feel with last trunk

2012-07-02 Thread Anthony
I agree -- I think it's good to make a visual distinction between the references (links) and the actions (buttons). Anthony On Monday, July 2, 2012 5:40:17 PM UTC-4, Jim S wrote: > > I personally like it the new way. Just my 2 cents. > > -Jim > > On Monday, July 2, 2012 8:45:13 AM UTC-5, szimsz

[web2py] Re: Server side rendering requiring js library. Svg to png. D3.js

2012-07-02 Thread Derek
OP said he was interested in doing it on the server, but doing it on the client can reduce server load and perhaps that will work for you. You could take the SVG and render it to a canvas and then export the canvas to PNG. Here is a javascript library which does such a thing. http://www.nihilog

[web2py] Re: Index call with variable

2012-07-02 Thread Anthony
The function itself cannot take any arguments, but you can use request.args or request.vars. Can you explain exactly what you are trying to do? Anthony On Monday, July 2, 2012 5:19:12 PM UTC-4, BlueShadow wrote: > > I like to call the indexfunktion with a variable. preferably with a > default v

[web2py] Re: GAE supports SSL for custom domains now

2012-07-02 Thread howesc
i suspect it's purely a config option. i use https on my appspot.com domains on GAE with web2py all the time. web2py just handles the https requests with no further config. cfh On Sunday, July 1, 2012 8:36:15 PM UTC-7, chinakr wrote: > > GAE supports SSL for custom domains now. We can choose

[web2py] Re: How much python is needed to learn web2py

2012-07-02 Thread howesc
there are several similar questions on the forum. the consensus seems to be, read the intro to python in the web2py manual and that is enough to get you going. for complex problems you may need to learn some more about python, but you can get your app started working with the knowledge in the

[web2py] Re: How to import modules in “app/modules/” when using web2py_utils.test_runner

2012-07-02 Thread Kemaru
Found a workable solution: Make the following change in "myapp/controllers/b.py": if TEST_APP: import os import inspect import sys currentPath = os.path.dirname(os.path.abspath( inspect.getframeinfo(inspect.currentframe

Re: [web2py] Re: 3-table many-to-many with IS_IN_DB

2012-07-02 Thread Ovidio Marinho
You mean that this routine makes your administrators register users so their instances. How this works can explain? Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br

[web2py] Re: Specify pdf name in appreport plugin

2012-07-02 Thread Lucas D'avila
Hello Jarrod! Please pull the last changes of branch v0.1.x or download the packed plugin for it branch here [1], so just add "response_filename" arg to REPORTPISA call, e.g: return plugin_appreport.REPORTPISA(html = html, response_filename = 'change_my_name.pdf') {} [1] https://github.com

Re: [web2py] The new Instant Press CMS

2012-07-02 Thread Alec Taylor
The seem to be images probably of the python icon, so dw about it (I can't seem them either) Massimo: On a different note, can you take a look at: https://groups.google.com/forum/#!topic/web2py/zbND_Y9WBBE On Tue, Jul 3, 2012 at 3:43 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > I

[web2py] Re: ANN: ide2py: editor, shell and debugger for web2py (experimental)

2012-07-02 Thread xcobary
> > I have rad2py configure but when i run it from comand prompt, the ide > opens with this error: > > Traceback (most recent call last): > File "C:\rad2py\ide2py\web2py.py", line 119, in OnIdleServeWeb2py > if self.web2py_httpd in r and not self.debugging: > AttributeError: 'PyAUIFrame' obj

[web2py] Re: How to install web2py on webfaction

2012-07-02 Thread Annet
Hi, This post might answer your question: https://groups.google.com/forum/?fromgroups#!searchin/web2py/annet$20webfaction/web2py/o9We_wV3eNc/0dS3ci6nFOAJ Kind regards, Annet

[web2py] Re: {{=LOAD()}} and JavaScript function

2012-07-02 Thread Annet
Hi Anthony, Looks like the ID of the outer div is "equalize", but earlier you > referenced "equalize1" (which is what I used in my example). I apologize for being not sufficiently clear. I am using bootstrap's grid system, I thought this line would give sufficient information: The problem is

[web2py] Re: {{=LOAD()}} and JavaScript function

2012-07-02 Thread Anthony
Sorry, now I'm confused. In your first post, the code included an "equalize1" div, but in your second post, it includes an "equalize" div. Can you post your exact code as it is now? Anthony On Tuesday, July 3, 2012 12:55:43 AM UTC-4, Annet wrote: > > Hi Anthony, > > Looks like the ID of the out

[web2py] Re: IS_IN_SET() and IS_NOTIN_DB()

2012-07-02 Thread Annet
Massimo, Thanks for your reply. This code: db.PromoUnit.sequenceNumber.requires= (IS_IN_SET(['1','2','3'],zero='select > a value'), > > IS_NOT_IN_DB(db(db.PromoUnit.sequenceNumber==request.vars.sequenceNumber)) > db.PromoUnit.sequenceNumber.widget = SQLFORM.widgets.options.widget( >db.P

[web2py] Re: smartgrid look & feel with last trunk

2012-07-02 Thread szimszon
Okay. If it was intended then is should stay so... :) 2012. július 3., kedd 0:12:30 UTC+2 időpontban Anthony a következőt írta: > > I agree -- I think it's good to make a visual distinction between the > references (links) and the actions (buttons). > > Anthony > > On Monday, July 2, 2012 5:40:17