Re: [web2py] Dynamic Model

2011-09-30 Thread Vasile Ermicioi
> > doesn't seem to much memmory > > >

Re: [web2py] Dynamic Model

2011-09-30 Thread Vasile Ermicioi
I have success using the embedded (core, common + persistence jars) version via jpype (Java API), I will try to prototype an adapter, if I will have success I will inform you It has all in one: - key value store - document database - graph database - object database http://code.google.com/p/orie

[web2py] Re: Dynamic Model

2011-09-30 Thread Lazarof
Hi! You should consider this http://asktom.oracle.com/pls/asktom/f?p=100:11:0P11_QUESTION_ID:10678084117056 On Sep 30, 5:48 am, TheSweetlink wrote: > I have recently found OrientDBhttp://orientechnologies.com > > It is a document-graph db that will allow you to evolve yourschema > over time

Re: [web2py] Re: Dynamic Model

2011-09-30 Thread Vasile Ermicioi
it is easy to solve using orientdb sql syntax

Re: [web2py] spinejs with Web2py

2011-09-30 Thread Sebastian E. Ovide
Hi Carl, I've never used spine.js, but for what I read in http://maccman.github.com/spine/ it is a JS framework. Therefore I cannot imagine any reason why it would not work with web2py. With web2py you have json/xml responses by defaul for free !!! (just use the right url)... so I would imagine th

[web2py] Re: Dynamic Model

2011-09-30 Thread Lazarof
Hi! I am using this model: In tables (say model_table_catalogs and model_table_fields) we keep (change) the model and based on these tables we create the real database. Create or change the real database we do when we summit the configuration. With this always in mind ... http://asktom.oracle

Re: [web2py] Re: Dynamic Model

2011-09-30 Thread Vasile Ermicioi
with orientdb schema less you don't need 'model_table_fields'

Re: [web2py] Dynamic Model

2011-09-30 Thread Massimiliano
I'm very interested on dynamic model and I'm investigating a little bit. I've had some results with this model. The user can define compound models. Types are ancestor types (string, integer etc) useful for representation db.define_table( 'types', Field('type', 'string'), format='%

[web2py] Admin-ticket: cannot access errors

2011-09-30 Thread Johann Spies
Although I can successfully login as admin on an app using a uwsgi-setup on Webfaction I cannot access the errors: web2py™(1, 99, 1, datetime.datetime(2011, 9, 22, 16, 59, 24), 'stable') PythonPython 2.7.1:TRACEBACK 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Traceback (most recent call last): File "/home

[web2py] Re: Dynamic Model

2011-09-30 Thread Lazarof
Orientdb is good, it's in the new NOSQL wave but it's NEW. and we always are looking for all inclusive. This is why we use web2py. On Sep 30, 2:02 pm, Vasile Ermicioi wrote: > with orientdb schema less you don't need 'model_table_fields'

[web2py] Re: can i "import" db into module?

2011-09-30 Thread Lazarof
On Sep 29, 11:56 pm, apple wrote: > I also want to know the answer to this. I have followed an example but > could not get it to work. > > In model I have: > > from globals import current > from gluon.storage import * > current.app=Storage() > current.app.db=db > > If I put in my module X: >    

[web2py] help needed for a query for one to many relation

2011-09-30 Thread arutti
Hello, I'm trying to make this simple query SELECT a.*, s.* FROM account a, statement s WHERE a.nb = '2110' AND (a.id = s.debit OR a.id = s.credit) with query, set, rows objects the tables are defined as follow: . db.define_table('account', Field('id','id', represent=lambda id

[web2py] Re: can i "import" db into module?

2011-09-30 Thread Lazarof
http://groups.google.com/group/web2py/browse_thread/thread/b254eae320294f2f/975926ef07c06db4?lnk=gst&q=solution#975926ef07c06db4 On Sep 29, 11:56 pm, apple wrote: > I also want to know the answer to this. I have followed an example but > could not get it to work. > > In model I have: > > from glo

Re: [web2py] Re: Dynamic Model

2011-09-30 Thread Vasile Ermicioi
what you want to implement is a graph database read concepts of orientdb and you will see that this is very clear from Massimo's models the time spent to write sql queries for that models could be spent to write an adapter for orientdb and adding some new API I am spending now some time, if I am s

[web2py] Re: Modal form window

2011-09-30 Thread Vineet
@juanduke, Thanks, your idea worked. Just one more thing. pl. notice the form's "action=". [CODE] Department [/CODE] 'dept_save' controller saves data to DB and redirects the user to main page. Since this is a custom-designed Form (i.e. not rendered by web2py helpers), I can't use somethi

[web2py] Re: can i "import" db into module?

2011-09-30 Thread DenesL
The good book says: http://web2py.com/book/default/chapter/04?search=current#Accessing-the-API-from-Python-modules

Re: [web2py] Re: Dynamic Model

2011-09-30 Thread Phyo Arkar
It will be good if orient is written in C, i dont like java base DBs. I am looking into Mongo. On 9/30/11, Vasile Ermicioi wrote: > what you want to implement is a graph database > read concepts of orientdb and you will see that > this is very clear from Massimo's models > > the time spent to wr

[web2py] Re: Modal form window

2011-09-30 Thread juanduke
Hi Vineet: I use to get args and form's field whit *request.args(N)* (N integer >= 0) and *request.vars.fieldname* (where fieldname, is a name of an input in form submited) http://www.web2py.com/book/default/docstring/request.args http://www.web2py.com/book/default/docstring/request.vars HTH!

Re: [web2py] Dynamic Model

2011-09-30 Thread Phyo Arkar
Thanks Massimilliano! This is very interesting , i will test it out. On 9/30/11, Massimiliano wrote: > I'm very interested on dynamic model and I'm investigating a little bit. > > I've had some results with this model. > > The user can define compound models. Types are ancestor types (string, >

[web2py] Initial database setup with import csv

2011-09-30 Thread Alan Etkin
I would like to make an initial multi table record insert in order to produce a manual/setup-like db initialization. I know that the administrative app lets you import table records by importing csv(s). Now, is there a featured method in web2py to make a one click multi table csv import? If there i

Re: [web2py] help needed for a query for one to many relation

2011-09-30 Thread Marin Pranjić
On Fri, Sep 30, 2011 at 9:10 AM, arutti wrote: > Hello, > > I'm trying to make this simple query > > SELECT a.*, s.* FROM account a, statement s WHERE a.nb = '2110' AND > (a.id = s.debit OR a.id = s.credit) > > Hi arutti, this should work: rows = db((db.account.nb == 2110) & ((db.account.id == d

[web2py] Re: Initial database setup with import csv

2011-09-30 Thread Alan Etkin
The answer is in the Web2py Book (3rd edition) 6.25.2 . I should have read the book first. Sorry On 30 sep, 09:47, Alan Etkin wrote: > I would like to make an initial multi table record insert in order to > produce a manual/setup-like db initialization. I know that the > administrative app lets y

[web2py] Re: Help: multiple=True with requires = IS_IN_SET()

2011-09-30 Thread DenesL
Hi jkral, http://web2py.com/book/default/chapter/07#Validators under IS_IN_SET and Tagging "Note that when multiple=True, IS_IN_SET will accept zero or more values, i.e. it will accept the field when nothing has been selected." so you have to check for an empty selection and error out. Example:

Re: [web2py] Browser unable to connect over secure SSH tunnel

2011-09-30 Thread Johann Spies
On 29 September 2011 15:57, Cliff wrote: > set up shows this error: > > cjk@littlecliffsite:~$ channel 3: open failed: connect failed: > Connection refused > channel 3: open failed: connect failed: Connection refused > > Any suggestions? > > I am having the same problem to a webfaction server. D

[web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Johann Spies
Further information: I get the no ticket number when running the app through https logged in as normal user: Internal errorTicket issued: unknown While I am also logged in as admin in another tab. How do I solve this? I need to help

[web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread pbreit
The raw files are hard to read but you can view them in myapp/errors.

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Richard Vézina
If you can browse the directory, go in web2py/applications/YOURAPP/errors/ They will be all there, but more difficult to read... When I get this ticket generally I need to restart Apache from the command line to make sure web2py and wsgi restart and init correctly and it fixs everythings... I mea

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Johann Spies
On 30 September 2011 15:48, Richard Vézina wrote: > If you can browse the directory, go in web2py/applications/YOURAPP/errors/ > > They will be all there, but more difficult to read... > > When I get this ticket generally I need to restart Apache from the command > line to make sure web2py and wsg

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Richard Vézina
Oh! Also, I think I am wrong with the restart web server... I think finally that it is a permissions issue what the web server user? www-data ?! If not find your web server user and try this command (adapt for your exact conf) : sudo chown -R www-data.www-data /home/www-data/ Try also to restart

[web2py] csv backup/restore fails

2011-09-30 Thread Johann Spies
Following the advice in the book: In web2py, you can backup/restore an entire database with two commands: To export: 1. >>> db.export_to_csv_file(open('somefile.csv', 'wb')) To import: 1. >>> db.import_from_csv_file(open('somefile.csv', 'rb')) I found the following when restoring: db.impo

Re: [web2py] csv backup/restore fails

2011-09-30 Thread Richard Vézina
pg_dump and pg_restore shouldn't cause any problem... I don't understand why it should... Maybe you should pg_dump with inserts command and when transfering your data they will be not re-indexed... Try this with pg_dump command : pg_dump --attribute-inserts > filename Richard On Fri, Sep 30, 20

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Johann Spies
On 30 September 2011 16:15, Richard Vézina wrote: > > But if you say you have update manually your web2py installation that is > pretty much the permissions that are in cause... > > I can only work as regular user on Webfaction and all the files belongs to that user. The only exception was the fi

[web2py] Re: help needed for a query for one to many relation

2011-09-30 Thread arutti
After much trial and re-re-..-reading the book, I came to this solution: acc = db.account(nb=2110) # to find the account stats = db((db.statement.debit==acc.id) | (db.statement.credit==acc.id) ).select() # to find the statements Best regards On Sep 30, 9:10 am, arutti wrote: > Hello, > > I'm tr

Re: [web2py] csv backup/restore fails

2011-09-30 Thread Richard Vézina
Maybe your database in your other location is not empty when you import your csv export file and as it says in the book : When importing, the new records will be appended to the database if it is not empty. In general the new imported records will not have the same record id as the original (saved

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Richard Vézina
Ok, so when you update you maybe forget to copy back this file into the /web2py folder?! Richard On Fri, Sep 30, 2011 at 10:51 AM, Johann Spies wrote: > > > On 30 September 2011 16:15, Richard Vézina wrote: > >> >> But if you say you have update manually your web2py installation that is >> prett

[web2py] Re: help needed for a query for one to many relation

2011-09-30 Thread arutti
Hi Martin, It works well, thanks Best regards, Andre On Sep 30, 2:52 pm, Marin Pranjić wrote: > On Fri, Sep 30, 2011 at 9:10 AM, arutti wrote: > > Hello, > > > I'm trying to make this simple query > > > SELECT a.*, s.* FROM account a, statement s WHERE a.nb = '2110' AND > > (a.id = s.debit OR

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Johann Spies
On 30 September 2011 16:59, Richard Vézina wrote: > Ok, so when you update you maybe forget to copy back this file into the > /web2py folder?! > No. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Richard Vézina
So it should be the permissions... Richard On Fri, Sep 30, 2011 at 11:15 AM, Johann Spies wrote: > On 30 September 2011 16:59, Richard Vézina wrote: > >> Ok, so when you update you maybe forget to copy back this file into the >> /web2py folder?! >> > > No. > > > Regards > Johann > > -- > May gr

[web2py] using spicejs with Web2py

2011-09-30 Thread Carl
is anyone using spicejs with Web2py? I've gotten spicejs to call, via ajax (using json data) my Web2py service but no response is turning up at the browser.

Re: [web2py] csv backup/restore fails

2011-09-30 Thread Johann Spies
On 30 September 2011 16:48, Richard Vézina wrote: > > pg_dump --attribute-inserts > filename > Thanks Richard. the --attribute-inserts seems to have made a difference. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His d

Re: [web2py] csv backup/restore fails

2011-09-30 Thread Johann Spies
On 30 September 2011 16:58, Richard Vézina wrote: > Maybe your database in your other location is not empty when you import > your csv export file and as it says in the book : > > ... > > > Try to drop your new DB and recreate it from scratch and leave it empty > before try to import your CSV ex

[web2py] get rid of default function from URL

2011-09-30 Thread Marek Mollin
Hello, I am trying to explicitly define what type of URL I wish to see. Since there are default route mappings I cannot figure why it always bounds index as default function even if I URL(c='something', f='') or URL(c='something', f=None). As I understand second case for there is probably somethin

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Richard Vézina
I really don't have a clue on how webfaction manage web2py, but maybe there is some sort of automated task that need to be done after a update of web2py from the part of their users... I mean when a user reinstall web2py they copy the installation in a other part of the linux box and change permiss

[web2py] Re: really nice credit card processing service

2011-09-30 Thread Dave
This is interesting. They look like they've got their heads in the right places. The security FAQ answers look good as well. One thing to pay particularly close attention to is the "Prohibited Businesses" section in the terms of use contract. I have had several issues with software I maintain f

Re: [web2py] get rid of default function from URL

2011-09-30 Thread Jonathan Lundell
On Sep 30, 2011, at 8:52 AM, Marek Mollin wrote: > I am trying to explicitly define what type of URL I wish to see. > Since there are default route mappings I cannot figure why it always > bounds index as default function even if I URL(c='something', f='') or > URL(c='something', f=None). > > As

[web2py] Merge multiple sqlite databases into one

2011-09-30 Thread clarix
Hello, I am developing a web2py application that is going to run in 4 warehouses. They are not connected to the internet. I need to then generate a second web2py application that gathers the information of the 4 sites into a single database with exactly the same table layout for data analysis. W

[web2py] Re: really nice credit card processing service

2011-09-30 Thread Massimo Di Pierro
No. But they provide Python api and I think will will be better than paypal, google checkout and authorize.net for most users. On Sep 29, 11:01 pm, Ovidio Marinho wrote: > powered web2py , massimo? > >        Ovidio Marinho Falcao Neto >              ovidio...@gmail.com >                83   88

[web2py] Re: Merge multiple sqlite databases into one

2011-09-30 Thread Massimo Di Pierro
Just make sure every record has a Field('uuid',writable=False, default=web2py_uuid()) then you can use db.export_to_csv_file from the warehouses and db.import_from_csv_field and it will update records but not add duplicates. On Sep 30, 11:02 am, clarix wrote: > Hello, > > I am developing a web2py

[web2py] Re: Modal form window

2011-09-30 Thread Vineet
Oops. I overlooked that in web2py book. Thanks for pointing to it. It played the trick & working OK. Now trying to use modal confirmation of jquery-ui. Thank you, :) Vineet On Sep 30, 5:43 pm, juanduke wrote: > Hi Vineet: > > I use to get args and form's field whit *request.args(N)* (N integer

[web2py] {{=URL(...)}} helper in javascript function

2011-09-30 Thread Vineet
I am trying to use jquery-ui for modal form & dialog. In a confirmation dialogue, on click event, i want to call a controller action. Notice the code for Delete button handler. [CODE] $(document).ready(function() { $('.delurl').click(function(e){ $("#deptDel").dialog({ modal: true,

[web2py] Re: spinejs with Web2py

2011-09-30 Thread VP
Just looking very briefly at spinejs, I think it's a bad idea to use it with web2py. Spinejs is supposed to be a framework itself, with its own models, views, etc. Where webp2y might fit in is providing server side storage. Hopefully, one day web2py's default option is to AJAX everything related

Re: [web2py] Re: Dynamic Model

2011-09-30 Thread Richard Vézina
Yes. OrientDB is totally written in Java and can run in any platform without configuration and installation. The full Server distribution is about 1Mb without the demo database. http://code.google.com/p/orient/ Richard On Fri, Sep 30, 2011 at 8:37 AM, Phyo Arkar wrote: > It will be good if orie

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Johann Spies
I think I have found the problem. I did the following: * Replaced the latest version of web2py with an older copy (1.95.x) which I have been using with apache. This helped me to get admin's access to the errors back. And then I could repeat the process one of the users used when she experienc

[web2py] Re: {{=URL(...)}} helper in javascript function

2011-09-30 Thread Massimo Di Pierro
This line "Delete": {{=URL('controller_name', args=[a,b,..])}} should be "Delete": "{{=URL('controller_name', args=[a,b,..])}}" otherwise this fine. Make sure you do not have any {{ in the JS other than for web2py takes. If you do break them with a space. On Sep 30, 11:36 am, Vineet wrote: >

[web2py] Re: really nice credit card processing service

2011-09-30 Thread Dave
Absolutely! :) On Sep 30, 12:23 pm, Massimo Di Pierro wrote: > No. But they provide Python api and I think will will be better than > paypal, google checkout and authorize.net for most users. > > On Sep 29, 11:01 pm, Ovidio Marinho wrote: > > > > > > > > > powered web2py , massimo? > > >      

[web2py] Re: spinejs with Web2py

2011-09-30 Thread Carl
VP... given that Web2py is written in Python it might adopt an existing JavaScript-based MVC framework for client side app development. As you've pointed out, it has already adopted the JavaScript-based library JQuery. JQuery doesn't have a app framework but there's quite a few putting effort in

[web2py] Re: spinejs with Web2py

2011-09-30 Thread Carl
p.s. I'm calling my controller from spinejs thus: http://127.0.0.1:8000/app/default/count.json ie I've added on ".json" in addition to decorating the function. when I call this function from another framework (Pyjamas) all is fine. It's something subtle no doubt! :)

[web2py] Re: really nice credit card processing service

2011-09-30 Thread Gour-Gadadhara Dasa
On Fri, 30 Sep 2011 09:23:05 -0700 (PDT) Massimo Di Pierro wrote: > No. But they provide Python api and I think will will be better than > paypal, google checkout and authorize.net for most users. But it's avaialable only for US merchants. :-/ Sincerely, Gour -- “In the material world, conce

[web2py] Disabling validation/part of form

2011-09-30 Thread Jan Rozhon
Hi all, as a newbie in web2py I have encountered a problem with my web2py application. I want one part of the form to be optional, but the form is created by the SQLFORM.factory and one of its optional fields is a dropdown list, which uses "requires=IS_IN_SET...", thus forcing a user to choose a v

[web2py] Re: Help: multiple=True with requires = IS_IN_SET()

2011-09-30 Thread jkral
form=SQLFORM(db.rfc_info, fields = ['rfc_number', 'environment', 'description', 'notice', 'engineer_name', 'recipient_email',]) On Sep 29, 8:58 pm, Bruno Rocha wrote: > How are you creating the form? > > Crud, form, sqlform, custom or html? > > http://zerp.ly/rochacbruno > Em 29/09/2011 15:23, "j

[web2py] Re: Help: multiple=True with requires = IS_IN_SET()

2011-09-30 Thread jkral
Thanks DenesL, and yes I knew that multiple=True accepted 0 or more, I just wasn't sure if there was another validator that I could use in conjunction with IS_IN_SET(multiple=True) So then I have to create my own check, there's not "quick fix"? Thanks Jon ;) On Sep 30, 8:09 am, DenesL wrote:

[web2py] Re: Help: multiple=True with requires = IS_IN_SET()

2011-09-30 Thread Anthony
It seems like IS_NOT_EMPTY() should be made to work in this case (i.e., validation should fail if no items were selected). Anthony On Friday, September 30, 2011 1:23:35 PM UTC-4, jkral wrote: > > Thanks DenesL, and yes I knew that multiple=True accepted 0 or more, > I just wasn't sure if there

[web2py] Re: Disabling validation/part of form

2011-09-30 Thread Anthony
Have you tried IS_EMPTY_OR(IS_IN_SET(...))? See http://web2py.com/book/default/chapter/07#Validators Anthony On Friday, September 30, 2011 1:13:32 PM UTC-4, Jan Rozhon wrote: > > Hi all, > > as a newbie in web2py I have encountered a problem with my web2py > application. I want one part of the

[web2py] Re: Help: multiple=True with requires = IS_IN_SET()

2011-09-30 Thread jkral
form=SQLFORM(db.info_info, fields = ['info_number', 'environment', 'description', 'notice',]) On Sep 29, 8:58 pm, Bruno Rocha wrote: > How are you creating the form? > > Crud, form, sqlform, custom or html? > > http://zerp.ly/rochacbruno > Em 29/09/2011 15:23, "jkral" escreveu: > > > > > > > > >

[web2py] Re: Help: multiple=True with requires = IS_IN_SET()

2011-09-30 Thread jkral
Unless I am implementing it wrong, and I very well maybe, IS_NOT_EMPTY() does not work: db.info.environment.requires = [ IS_NOT_EMPTY(), IS_IN_SET(ENVIRONMENTS, multiple=True, error_message='Please select appropriate environment(s).') ] or db.info.environment.requires = IS_NOT_EMPTY(IS_IN_SET(ENVI

[web2py] Re: Help: multiple=True with requires = IS_IN_SET()

2011-09-30 Thread Anthony
Yes, I was saying if it doesn't work, it should probably be changed so it does. On Friday, September 30, 2011 2:25:18 PM UTC-4, jkral wrote: > > Unless I am implementing it wrong, and I very well maybe, > IS_NOT_EMPTY() does not work: > > db.info.environment.requires = [ IS_NOT_EMPTY(), > IS_I

[web2py] Re: SQLFORM.grid: Search only startswith

2011-09-30 Thread Niphlod
http://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#1527 maybe a patch with "search_startswith" parameter will improve current search functionality, in case it is useful to someone else. On Sep 29, 3:32 pm, Omi Chiba wrote: > Does anybody know where is the code so I can try customize

[web2py] Re: DAL - Selects

2011-09-30 Thread Peter Etchells
results=db(db.data.belongs([p[1] for p in postcodes).select()

[web2py] Re: can i "import" db into module?

2011-09-30 Thread howesc
Thanks for the help guys! i knew it was in there hiding for reference, here is what i did (i'm running on GAE): in db.py: from gluon.globals import current db = DAL('gae') # connect to Google BigTable current.db=db in my module: from gluon.globals import current

[web2py] Re: wrapping long text lengths in grid/smartgrid

2011-09-30 Thread Stefaan Himpe
A partial reply to my own questions: I was wondering about grid/smartgrid: currently we can use maxtextlength=XXX to indicate the max length of a column. If the real length is longer than XXX, the text is chopped at a suitable length and "..." is added to it. If you configure a long maxtextlengt

Re: [web2py] Re: can i "import" db into module?

2011-09-30 Thread Jonathan Lundell
On Sep 30, 2011, at 12:16 PM, howesc wrote: > Thanks for the help guys! i knew it was in there hiding > > for reference, here is what i did (i'm running on GAE): > > in db.py: > from gluon.globals import current > db = DAL('gae') # connect to Google BigTable > curr

[web2py] Re: Help: multiple=True with requires = IS_IN_SET()

2011-09-30 Thread DenesL
One way would be to add an "_and" option to IS_IN_SET, similar to IS_IN_DB: ...requires=IS_IN_SET(..., _and=IS_NOT_EMPTY()) But instead of adding this option to each validator that might require it we could change the behavior, and build the dropdown on the first validator on the requires list.

[web2py] Re: Help: multiple=True with requires = IS_IN_SET()

2011-09-30 Thread jkral
I appreciate all of the input thanks. I'm pretty new to python and web2py (I really like them!)and pretty much any development in general. And forums are not always filled with kind souls

[web2py] Re: SQLFORM.grid: Search only startswith

2011-09-30 Thread Omi Chiba
Niphlod, Thank you finding the source... yeah it's beyond my knowledge. On Sep 30, 1:55 pm, Niphlod wrote: > http://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#1527 > > maybe a patch with "search_startswith" parameter will improve current > search functionality, in case it is useful

[web2py] Try Flask "in a browser"

2011-09-30 Thread pbreit
https://tryflask.ep.io/

Re: [web2py] Try Flask "in a browser"

2011-09-30 Thread Marco Mansilla
El Fri, 30 Sep 2011 14:14:00 -0700 (PDT) pbreit escribió: > https://tryflask.ep.io/ hmmm login is broken... "internal server error" =(

Re: [web2py] Try Flask "in a browser"

2011-09-30 Thread Bruno Rocha
Would be great a tryweb2pyshell or a simple try dal. http://zerp.ly/rochacbruno Em 30/09/2011 18:30, "Marco Mansilla" escreveu: > El Fri, 30 Sep 2011 14:14:00 -0700 (PDT) > pbreit escribió: > >> https://tryflask.ep.io/ > hmmm login is broken... "internal server error" =(

[web2py] Re: SQLFORM.grid: Search only startswith

2011-09-30 Thread Massimo Di Pierro
type in the search field "part_number starts with ab" On Sep 27, 6:20 pm, Omi Chiba wrote: > For example, I have a field which has 'abcab' and 'bcabc' data. > If I provide 'ab' in the search box, I want to just pull the first one > ('abcab') and exclude second one ('bcabc'). Can we do this ? > >

Re: [web2py] Try Flask "in a browser"

2011-09-30 Thread Anthony
We've already got http://www.web2py.com/demo_admin/default/site. I wonder if we could enable people to create their own apps and have them live for a day or so (the TryFlask apps last for 12 hours, and can be exported). Anthony On Friday, September 30, 2011 6:15:14 PM UTC-4, rochacbruno wrote:

[web2py] Re: Try Flask "in a browser"

2011-09-30 Thread Anthony
On Friday, September 30, 2011 5:14:00 PM UTC-4, pbreit wrote: > > https://tryflask.ep.io/ At least nobody will be complaining about "through-the-web" coding anymore -- if Flask is doing it, it must be OK. ;-)

[web2py] Re: SQLFORM.grid: Search only startswith

2011-09-30 Thread Omi Chiba
Massimo, I was like what are you talking about ? , then I noticed you actually asking to input whole thing between " and "... Yeah, it works !! but I cannot ask my users to do. Like Niphlod said, option flag to switch the search method will be great. On Sep 30, 5:29 pm, Massimo Di Pierro wrote

[web2py] Re: SQLFORM.grid: Search only startswith

2011-09-30 Thread Omi Chiba
And, actually it gives me error ticket if try "model_id starts with 7" this for another field which is int not string. Traceback (most recent call last): File "C:\web2py\gluon\restricted.py", line 194, in restricted exec ccode in environment File "C:/web2py/applications/pricelist/controlle

[web2py] A standard way of including static js files?

2011-09-30 Thread monotasker
>From the documentation in the web2py book it seems like the standard way of including custom js is to place the code within the view files themselves. But I'd rather put all of my js in the static/js folder. In this case, do I need to link to each file in the header (or footer) of layout.py or

[web2py] Re: A standard way of including static js files?

2011-09-30 Thread Anthony
You can append a list of JS files to response.files, and as long as your layout.html includes web2py_ajax.html, the JS files will be loaded in the head. For example, in a controller function that requires a particular JS file: response.files.append(URL('static', 'js/custom.js')) Note, web2py_a

[web2py] Re: A standard way of including static js files?

2011-09-30 Thread monotasker
Great. Thanks.

[web2py] images (uploaded files) not showing correctly after update?

2011-09-30 Thread Carlos
Hi, Not sure if I'm doing something wrong, but uploaded files are not showing correctly immediately after an update submit. For reference (assuming there's already a row with id 1): *model* db.define_table('test', Field('name'), Field('image', 'upload')) *controller* form = SQLFORM(db.

Re: [web2py] Re: can i "import" db into module?

2011-09-30 Thread howesc
thanks for the wise advice. i've updated to create a namespace in current. given that it's up to the developer to follow the convention i think it's ok to make the developer create a storage() or dict() object if they want the namespaceing. thanks, cfh

Re: [web2py] Re: can i "import" db into module?

2011-09-30 Thread Anthony
On Friday, September 30, 2011 3:28:23 PM UTC-4, Jonathan Lundell wrote: > > > We discussed a while back formalizing this, perhaps with a current.apps > dict/Storage predefined (you'd use current.apps.myappname in that case), but > nobody seemed to have the energy for it. > I think there was some

Re: [web2py] can i "import" db into module?

2011-09-30 Thread Jonathan Lundell
On Sep 30, 2011, at 5:34 PM, Anthony wrote: > On Friday, September 30, 2011 3:28:23 PM UTC-4, Jonathan Lundell wrote: > > We discussed a while back formalizing this, perhaps with a current.apps > dict/Storage predefined (you'd use current.apps.myappname in that case), but > nobody seemed to hav

[web2py] Re: Help: multiple=True with requires = IS_IN_SET()

2011-09-30 Thread Anthony
On Friday, September 30, 2011 3:48:53 PM UTC-4, DenesL wrote: > > > ...requires=[IS_IN_SET(...), IS_NOT_EMPTY(), ...] > Are you saying that the above currently works but simply suppresses the widget? In that case, would it be possible to manually add the widget back? ...requires = [IS_NOT_EMPTY

[web2py] Re: Browser unable to connect over secure SSH tunnel

2011-09-30 Thread Cliff
That's a little bit different flavor than I'm having. I was seeing tickets in the user app. I was already logged in to the admin app. If I clicked on the link to open the ticket in the user app, I would get the forbidden page. From there if I changed the protocol to https I could see the ticket

[web2py] Re: Handling errors in dynamic forms

2011-09-30 Thread Cliff
After form.errors, loop through form.vars. If you find a var with a name that matches one of your added fields, use a TR() call to construct a table row for your added field. It should probably look something like TR(TD(LABEL(nameofyourcustomfield)), TD(valuesubmittedontheform)) Then do a form[]

Re: [web2py] images (uploaded files) not showing correctly after update?

2011-09-30 Thread Bruno Rocha
May be it is your browser's cache? On Fri, Sep 30, 2011 at 8:34 PM, Carlos wrote: > Hi, > > Not sure if I'm doing something wrong, but uploaded files are not showing > correctly immediately after an update submit. > > For reference (assuming there's already a row with id 1): > > *model* > db

Re: [web2py] Try Flask "in a browser"

2011-09-30 Thread Bruno Rocha
On Fri, Sep 30, 2011 at 7:35 PM, Anthony wrote: > We've already got http://www.web2py.com/demo_admin/default/site. I wonder > if we could enable people to create their own apps and have them live for a > day or so (the TryFlask apps last for 12 hours, and can be exported). > > Anthony > I mean

Re: [web2py] images (uploaded files) not showing correctly after update?

2011-09-30 Thread Carlos
Hi Bruno, Browser cache is not the problem, I've tested with multiple browsers, and they actually reference the previous image (via the 'file' link). Can you please try it (see my simple model and controller) to see if you get this behavior too or is it just me?. Thanks, Carlos

Re: [web2py] images (uploaded files) not showing correctly after update?

2011-09-30 Thread Bruno Rocha
Send me your MVC and I will take a look. ( I do not use windows so I cannot reproduce the same scenario) On Fri, Sep 30, 2011 at 11:35 PM, Carlos wrote: > Hi Bruno, > > Browser cache is not the problem, I've tested with multiple browsers, and > they actually reference the previous image (via the

Re: [web2py] images (uploaded files) not showing correctly after update?

2011-09-30 Thread Carlos
*model* db.define_table('test', Field('name'), Field('image', 'upload')) *controller* form = SQLFORM(db.test, db.test(1), upload=URL('download')) form.accepts(request) return dict(a=form) *view* (generic) Regards.

Re: [web2py] Re: wrapping long text lengths in grid/smartgrid

2011-09-30 Thread Bruno Rocha
grid should have a truncate parameter.

[web2py] Re: Try Flask "in a browser"

2011-09-30 Thread dlypka
T3 can do that. On Sep 30, 9:09 pm, Bruno Rocha wrote: > On Fri, Sep 30, 2011 at 7:35 PM, Anthony wrote: > > We've already gothttp://www.web2py.com/demo_admin/default/site. I wonder > > if we could enable people to create their own apps and have them live for a > > day or so (the TryFlask apps l

Re: [web2py] images (uploaded files) not showing correctly after update?

2011-09-30 Thread pbreit
This works for me: db.define_table('image', Field('name'), Field('file', 'upload')) def index(): image = db(db.image.id==request.args(0)).select().first() form = SQLFORM(db.image, image, upload=URL('download')) if form.process().accepted: response.flash = 'image saved'

  1   2   >