Re: [web2py] Re: Postgres : created new database, but tables not being create when I access the app

2013-01-15 Thread Johann Spies
On 6 January 2013 22:00, Anthony wrote: > See http://web2py.com/books/default/chapter/29/06#Migrations: > > The value of migrate is the filename (in the "databases" folder for the > application) where web2py stores internal migration information for this > table. These files are very important an

Re: [web2py] Re: Beware auth.enable_record_versioning

2013-01-16 Thread Johann Spies
On 3 January 2013 05:42, rh wrote: > I tried again in a fresh install and it failed again. So I created a new > app called "book" then unzip'd the contents of the git master into the > "book" app dir. And that seems to be working. > > I am also using this method, but I have observed that the book

[web2py] Book in epub format?

2013-01-17 Thread Johann Spies
Is there any chance to get the book in epub-format? I think it should be possible using markmin -> xhtml > epub (via calibre)? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) --

Re: [web2py] Re: Postgres : created new database, but tables not being create when I access the app

2013-01-17 Thread Johann Spies
On 16 January 2013 17:28, Massimo Di Pierro wrote: > Can you suggest how to make the advice better? > > On Wednesday, 16 January 2013 01:05:14 UTC-6, Johann Spies wrote: > >> On 6 January 2013 22:00, Anthony wrote: >> >>> See >>> http://web2py.com/books

Re: [web2py] How to update web app on server without change the data already in database

2013-01-21 Thread Johann Spies
On 21 January 2013 04:46, animnook wrote: > I have a web app on server and I use web2py web interface to update the > project file. > But the users wants to add data in db while I am still working on other > part of the app. > as right now I just copy and paste everything in controller file local

Re: [web2py] Problem: SQLFORM.grid and setting a value for a field when a new dataset is created

2013-01-21 Thread Johann Spies
On 18 January 2013 15:05, Sverre wrote: > I have a contact table that includes our employees too. To make a > difference I have a cclass field to make the difference. When I want to > create an employee the user should not have a choice to set the cclass > field, but when he is creating a custome

Re: [web2py] Re: Book in epub format?

2013-01-21 Thread Johann Spies
On 18 January 2013 17:38, Massimo Di Pierro wrote: > Can you help us make the epub? > > On Thursday, 17 January 2013 04:59:59 UTC-6, Johann Spies wrote: >> >> Is there any chance to get the book in epub-format? >> >> I think it should be possible using mar

Re: [web2py] Re: Book in epub format?

2013-01-21 Thread Johann Spies
On 21 January 2013 22:49, Niphlod wrote: > rotfl. always available, but I don't know a single thing about the epub > format. > did anyone tried just converting the pdf to epub using calibre ? > The success of converting pdf to epub using calibre depends on how the pdf was created. I had some su

Re: [web2py] Re: temporary tables to easily use native smartgrid with session-specific data?

2013-01-21 Thread Johann Spies
I use the following method which is not session dependent (and therefore not as as complicated as your requirement): Define a model for the query Drop the table before the query is executed Use Postgresql's 'SELECT INTO' or 'CREATE TABLE AS XXX FROM' in the query to populate the table. Maybe in y

Re: [web2py] Re: Book in epub format?

2013-01-22 Thread Johann Spies
On 22 January 2013 16:42, Massimo Di Pierro wrote: > my process is > > markmin -> html > markmin -> latex -> pdf -> print > > There is a latex -> epub (http://johnmacfarlane.net/pandoc/) > > Pandoc is a great tool, but it's success in converting latex to anything else is limited to a subset lf LaT

Re: [web2py] Edit button behavior with sqlform.grid and multiple joins

2013-01-24 Thread Johann Spies
On 23 January 2013 20:27, Jason Martens wrote: > Hello All, >I have a SQLFORM.grid with multiple joins that looks something like > this: > > query = (db.locations.id == 10) & (db.rooms.id == db.locations.room_id) & > (db.other.id == db.rooms.other_id) > SQLFORM.grid(query) > > The problem is

[web2py] Appadmin does not play nicely when I use postgresql schemas

2013-01-28 Thread Johann Spies
I am working on a very complex multilevel database and I am using postgresql schemas to organise different aspects of the database. Using conditional models I do something like this: models/isl/isi.py: db.executesql("set search_path to isi;") db.define_table('rjoernaal', ... db.executesql("s

Re: [web2py] Appadmin does not play nicely when I use postgresql schemas

2013-01-28 Thread Johann Spies
Problem solved by workaround: add db.executesql("set search_path to nrf, isi, public") to appadmin.py just after the imports. I still think that appadmin should respect the search path set in the model without making it necessary to add it in the appadmin controller too. Regards Johann -- B

[web2py] Using the web2py online debugger

2013-01-30 Thread Johann Spies
I have used other methods of debugging in the past including pdb. Today I have tried out for the first time the web2py online debugger and there is something that I do not understand. I have set two temporary breakpoints in a controller. When that breakpoint is reached, the debugger shows me the

Re: [web2py] Coding of the future?

2013-01-31 Thread Johann Spies
On 31 January 2013 13:03, Jason Brower wrote: > Interesting that we have coding tools built into our framework. > http://www.webdesignerdepot.com/2013/01/web-ides-the-future-of-coding/ > > When webeditors become as good as emacs, vim, bluefish, I will consider it. For now I did not find any edit

Re: [web2py] Modules not detecting functions

2013-02-04 Thread Johann Spies
But if I do this in default.py: > import mymodule > def index(): > value = mymodule.attribute > return value > > it works and return 'goobye world', so default detects the attribute but > not the function, why is this? Maybe I'm not building the module correctly? > > I've tried to put the

Re: [web2py] Using the web2py online debugger

2013-02-04 Thread Johann Spies
Hallo Mariano, > Can you send us a minimal example to reproduce this issue? > I have tried to get a minimal example but when I create a new app and test it there it works and I could not reproduce the problem. However I cannot get it to work on my other app which is not that minimal. I get in

Re: [web2py] smartgrid custom layout

2013-02-04 Thread Johann Spies
On 5 February 2013 01:06, Jack wrote: > Hi All, > > Just a question regarding the smartgrid. > I was wondering is there anyway to change the layout and format of the > smartgrid. > For example if I wanted to change the spacing I have for each row or add > verticle lines to separate the columns. I

Re: [web2py] Using the web2py online debugger

2013-02-04 Thread Johann Spies
I am a bit pressed for time right now, but will try and help you debug this when I can. I have marked your email on my to-do-list. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- --- You received this message becau

[web2py] length of a uuid-field

2013-02-12 Thread Johann Spies
In the book the examples for using uuid as a unique field in a table shows: Field('uuid', length=64, default=lambda:str(uuid.uuid4())), I have been using this for a long time without really thinking about it. The uuid-strings generated has the length of 36. So why the 'length=64'? Regards Joha

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

2013-02-19 Thread Johann Spies
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.modulefile import * Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm

Re: [web2py] Re: How to use orderby with two or more fields

2013-03-05 Thread Johann Spies
On 6 March 2013 08:10, at wrote: > > Pl consider following select statement: > rows=db().select(db.persons.ALL, db.books.ALL, > left=db.persons.on(db.persons.id==db.books.owner)) > > Want to order by persons.dob, then books.purchased, where both are of type > date/time. > Did you search the book

[web2py] Case sensitivity in book searches

2013-03-05 Thread Johann Spies
I have observed that the searches in the Book app is case sensitive. Can I request that searches are made case insensitive please. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- --- You received this message becau

Re: [web2py] Formatting radio widgets (or radio buttons)

2013-03-12 Thread Johann Spies
On 11 March 2013 18:36, Richard Vézina wrote: > An other option could be customize widget and you add the bootstrap > class... > > > On Mon, Mar 11, 2013 at 12:35 PM, Richard Vézina < > ml.richard.vez...@gmail.com> wrote: > >> Form custom maybe?? >> >> >> http://web2py.com/books/default/chapter/2

Re: [web2py] Formatting radio widgets (or radio buttons)

2013-03-13 Thread Johann Spies
On Tuesday, 12 March 2013 14:34:20 UTC+2, Richard wrote: > > Just don't pickup the label, remove these entry from your custom form : > form.custom.label[fieldname] > > It is not that easy: form.custom.label[fieldname] refers to the label of the field. Each option in IS_IN_SET has it's own la

[web2py] .sum() and .count() in grid?

2013-04-04 Thread Johann Spies
How would I be able to use a query like this (or the DAL equivalent) to show the result in a grid? select so as Journal, SUM(aantal) as Articles from isi.nr_arts_per_journal group by Journal order by Journal Regars Johann -- Because experiencing your loyal love is better than life itself, my li

Re: [web2py] Re: .sum() and .count() in grid?

2013-04-08 Thread Johann Spies
ere's a LOT of logic inside it for more things > that needs to be considered. > > On Thursday, April 4, 2013 12:23:58 PM UTC+2, Johann Spies wrote: >> >> How would I be able to use a query like this (or the DAL equivalent) to >> show the result in a grid? >> >&

Re: [web2py] Re: .sum() and .count() in grid?

2013-04-08 Thread Johann Spies
Thanks for the explanation of using views Niphod. I have used Postgresql's select into... in the past for similar situations, but using views seems to be a better option. Regards Johann On 6 April 2013 00:04, Niphlod wrote: > often referred as "materialized views" for the ones who can spare m

[web2py] Re: .sum() and .count() in grid?

2013-04-09 Thread Johann Spies
On Saturday, 6 April 2013 00:04:24 UTC+2, Niphlod wrote: > > You just need to: > - include a pkey, better if resembles a sequence, and have a Field of > type 'id' matching it > > This is not very usable. Here is an example: In postgresql: CREATE OR REPLACE VIEW sabinet.sabinet_records_per_jo

Re: [web2py] Re: .sum() and .count() in grid?

2013-04-09 Thread Johann Spies
That causes an error: ERROR: syntax error at or near "ORDER" LINE 2:SELECT row_number(ORDER BY records DESC) as id, a... ^ Regards Johann On 9 April 2013 15:11, Niphlod wrote: > try with > > SELECT row_number(ORDER BY records DESC) as id, a.* >

Re: [web2py] Re: How to implement PostgreSQL "ts_rank" function for full text search?

2013-04-10 Thread Johann Spies
I am also using Postgresql's full text search. Any development in Web2py to accommodate that will we very much appreciated. Regards Johann On 9 April 2013 16:02, Massimo Di Pierro wrote: > This is an interest example. Let me think if we can add an API like we did > for PostGIS > > > On Monday

[web2py] Markmin: How to align text?

2013-04-10 Thread Johann Spies
In Markdown I can do this (found on http://bywordapp.com/markdown/guide.html ): Alignment To align the data cells on the table, you need to introduce a special row right after the headers, that will determine how the following rows – the data rows – will be aligned. | Header One | Header Two | H

Re: [web2py] Re: Markmin: How to align text?

2013-04-15 Thread Johann Spies
I have seen that. I could not find any indication in the documentation on how to align text. The word 'align' appears only in a section which explains how to align an image. Regards Johann On 10 April 2013 15:20, Massimo Di Pierro wrote: > Also here: > > http://web2py.com/init/static/markmin.

Re: [web2py] Check upload file size before actual file data uploading

2012-10-01 Thread Johann Spies
On 2 October 2012 04:20, Exeption wrote: > Hi, > > Already have asked > here, > but no reply. > > I will duplicate my question here: > > In my web2py controller I'm accessing file data like: > >

Re: [web2py] Need help... testing new DAL

2012-10-02 Thread Johann Spies
On 2 October 2012 04:32, Massimo Di Pierro wrote: > > This is a big change in the source and the internal logic is complex. > It may have some unforeseen side effects. > PLEASE TEST THAT TRUNK DOES NOT BREAK YOUR CODE before this makes it into > stable. > I am using postgresql as backend. On an

Re: [web2py] How to implement multiple filter for grid?

2012-10-30 Thread Johann Spies
You can do that by building a complex query using the search box. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) --

Re: [web2py] Reading a text file after uploading in a form

2012-10-31 Thread Johann Spies
On 31 October 2012 17:45, praveen krishna wrote: > Hi, >For my task I have to upload a text file in form with out zipping it ,I > have prepared the form as: > form = FORM(TABLE(TR(TD('Upload File:', INPUT(_type='file', name='myfile', > id='myfile', > requires=IS_NOT_EMPTY(,TR(TD(INPUT(_typ

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Johann Spies
On 6 November 2012 12:50, Aurelijus Useckas wrote: > I want to export a certain query in SQLFORM.grid to a CSV, but once I > press on the (any) export option bellow the SQLFORM.grid, it exports the > whole table and not just the ones meeting the certain criteria. This must be viewed as a bug in

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-06 Thread Johann Spies
On 6 November 2012 15:57, Niphlod wrote: > one sec. > export is meant to give the user the full resultset he can access (let's > say, offline consultation). > Currently, only the "with hidden cols" exports honour the current query. > Before calling it a bug we should agree on what functionalities

[web2py] Re: DAL insert dictionary fails

2012-11-07 Thread Johann Spies
On Saturday, 1 October 2011 09:40:26 UTC+2, seongjoo wrote: > > I figured out what the problem was but forgot to come back to the > forum. > > The problem was that the keys of the dictionary was encoded as > unicode, for example u'keyname'. It was in unicode because the dict is > loaded from js

Re: [web2py] Re: DAL insert dictionary fails

2012-11-07 Thread Johann Spies
On 7 November 2012 12:16, Johann Spies wrote: > The result: > > {'ui': '0002851186', 'py': '2010', 'vl': '24', 'ris': '4', 'pd': 'NOV'} > Traceback (most recent call last): > F

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Johann Spies
On 7 November 2012 14:05, Niphlod wrote: > if your set doesn't fit into memory, saving it to a temp file won't get > you out of troubles. One of DAL problems is that a Rows object does not > return an iterator from the cursor, it's fetched all into memory first. > > In that case I would be inclin

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-07 Thread Johann Spies
On 7 November 2012 15:01, Johann Spies wrote: > > In that case I would be inclined to use bypass DAL and db.executesql and > use the backend to export to a file. That should be more efficient. > Sorry. That should read ... inclined to bypass DAL and use db.executesql ...

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Johann Spies
On 7 November 2012 17:38, Niphlod wrote: > patch to apply to trunk. Please test it extensively with all the possible > combinations. > I applied the patch but did not see any different behaviour. A view with two records in the grid exported the whole table of more than 1 records. And yes,

[web2py] Re: Shortcut not working: del db.mytable[id]

2012-11-08 Thread Johann Spies
On Thursday, 8 November 2012 05:58:50 UTC+2, Cliff Kachinske wrote: > > Version 2.0.9, Postgres 9.X, Psycopg2 > > I don't know what else to tell you, except I know the record was there > after the failed delete attempt. > > Did you do a db.commit() ? Regards Johann --

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Johann Spies
On 8 November 2012 15:32, Niphlod wrote: > ehm missing something here. jids is not a standard var for the grid, > are you using that var to filter the query passed to the grid ? > > One thing is taking care of the default filtering (keywords variable), > another is to accomplish the same thin

[web2py] -N option

2012-11-12 Thread Johann Spies
I suspect the book has to be adapted or otherwise there is a bug in the trunk code: python web2py.py -S akb_2013 -M -N Usage: python web2py.py web2py.py: error: no such option: -N Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psal

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-12 Thread Johann Spies
On 12 November 2012 11:13, Niphlod wrote: With the jids= notation the current grid won't have any functional > pagination,ordering, export, etc. That's because vars are not propagated. I > sent a patch to Massimo for that a few days ago. > > Thanks. I have used session variables to do that in th

Re: [web2py] -N option

2012-11-12 Thread Johann Spies
On Monday, 12 November 2012 16:28:58 UTC+2, Nico Zanferrari wrote: > > Well, on the 2.1.0 changelog : > > >- change in cron (it is now disabled by default). removed -N option >and introduced -Y. > > > I have sen something like that, yes. > Also, in the current online book on > htt

[web2py] Virtual Field and the grid

2012-11-13 Thread Johann Spies
How do I use a Virtual Field in a grid? I am getting the error: Query Not Supported: 'Row' object has no attribute 'ut when I use the following code: def art_skrywers(ut): return '\n'.join([x.au for x in db(db.rauthors.rart_id == ut).select(db. rauthors.au)]) @auth.re

[web2py] SQLTABLE(query) produces different SQL than SQLFORM.grid(query)

2012-11-13 Thread Johann Spies
The following code: fields = [db.rjoernaal.so, db.rpublisher.pu, db.rpublisher.pi] query = ((db.rjoernaal.uuid == db.rpub_rj.rj_id) & (db.rpub_rj.rpub_id == db.rpublisher.id)) data = SQLTABLE(db(query).select(db.rjoernaal.so, db.rpublisher.pu, db. rpublisher.pi,

Re: [web2py] postgres problem with crud.update

2012-11-14 Thread Johann Spies
Hallo Andreij, On 14 November 2012 11:50, andrej burja wrote: > i've made app using wizzard > i addes tags > db.define_table('t_tag', > Field('f_game_id', type='reference t_game', > label=T('Game Id')), > Field('f_name', type='string', > label=T('Name')), > auth.si

[web2py] Some Scheduler questions

2012-11-14 Thread Johann Spies
I am for the first time trying to use the scheduler and so far it was unsuccessful :( I have watched the video on vimeo on the scheduler and I suspect that is a bit old. I have read what was written in the book as well as the docstrings in gluon/scheduler.py. I have entered two functions in /

Re: [web2py] How to get a filter subset?

2012-11-14 Thread Johann Spies
On 13 November 2012 19:04, John Ho wrote: > For a school admin database, different roles for logged in users: admin, > teachers and staff. I can use using auth_group and auth_membership to > define these roles. > > I have the following table: > > db.define_table( "class", Field("teacher_id", db

Re: [web2py] Some Scheduler questions

2012-11-14 Thread Johann Spies
On 14 November 2012 12:55, Johann Spies wrote: > 3. In the video, the command 'python web2py.py -K ' showd some info > about the runs. I have started the worker and nothing is showing but: > 'starting single-scheduler for "akb"...' > > How d

Re: [web2py] Some Scheduler questions

2012-11-14 Thread Johann Spies
On 14 November 2012 13:58, villas wrote: > Hi Johann, > > IMO the best way forward is to study the app on github ( > https://github.com/niphlod/**w2p_scheduler_tests > ). > After looking at that you should be able to achieve what you want. > > Thank

[web2py] Re: Some Scheduler questions

2012-11-14 Thread Johann Spies
Hallo Niphlod, Thanks for your answers which cleared up some of the muddy areas in my mind. Post all the fields, this is far too little to tell what's wrong. I have recreated those records. Here they are: scheduler_task.id scheduler_task.application_name scheduler_task.task_name

Re: [web2py] Re: Migrating with postgres

2012-11-14 Thread Johann Spies
I am using the trunk code updated daily on my development computer and recently have had to kill web2py processes manually because of migration issues. I am also using postgresql and this happened regularly while experimenting with temporary tables. Example: I use 'create table x as select ... f

Re: [web2py] Re: SQLTABLE(query) produces different SQL than SQLFORM.grid(query)

2012-11-14 Thread Johann Spies
On 15 November 2012 04:04, howesc wrote: > isn't there an option on grid to not show the ID? i know that grid uses > the ID for allowing you to click links to edit and such... > > Yes. It will show only the fields listed in 'fields' if that argument is present. The problem is that it adds the

Re: [web2py] Re: Some Scheduler questions

2012-11-15 Thread Johann Spies
On 15 November 2012 10:49, Niphlod wrote: > as you wish .( this is the line of thoughs that will never improve things. > > True. I am working for a salary and have to get the job done. I would like to see web2py improving and from time to time I am trying to give feedback, but when I am busy at

Re: [web2py] Form question

2012-11-18 Thread Johann Spies
On 15 November 2012 23:50, Paul Rykiel wrote: > I am new to Web2py and I have to do something very basic, but I am not > certain how to do it, can someone explain. > > I want to create an empty form to be used to enter parameters that will > perform a function, print an "n" number of tags. . > >

Re: [web2py] global name 'T' / 'auth' / 'request' is not defined, but i'm in a model file...

2012-11-19 Thread Johann Spies
On 19 November 2012 15:53, Cédric Mayer wrote: > > File > "C:/Users/cedric/projets/LACT/eclipse/Lactw221/web2py/applications/lact/models/a34_lact_running_modes.py" > > , > line 43, in on_end > session.flash

Re: [web2py] Re: Extracting row id from url using request.args

2012-11-19 Thread Johann Spies
On 19 November 2012 14:58, Michael Hall wrote: > Hi Villas > > I like the idea of using a var instead of args but I am still uncertain of > how I get the ID of the current record I am viewing/editing in smartgrid. > > Here is an example of code I am using where 'auid' represents the id of the aut

Re: [web2py] SQLFORM.grid + Linked page with SQLFORM.grid

2012-11-20 Thread Johann Spies
On 20 November 2012 13:05, vivek wrote: > Hi , > I have a grid , with links to pages which has another grid. > > constraints = {'db.lead':qcomm} > form = SQLFORM.smartgrid(db.lead,constraints = constraints,deletable= > False,details=False, links = [lambda row: A(SPAN(_class='icol-commen

Re: [web2py] SQLFORM.grid in LOAD

2012-11-20 Thread Johann Spies
On 20 November 2012 15:02, vivek wrote: > > Hi , > > I have a grid as a LOAD component , everything works fine , except > for delete. If i was to click on delete , and then cancel it (d

[web2py]

2012-11-22 Thread Johann Spies
I cannot open http://www.web2pyslices.com. I have tried in Firefox, Opera and Chrome and get the following error: This webpage has a redirect loop Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) --

[web2py] web2pyslices: redirect problem

2012-11-22 Thread Johann Spies
On 22 November 2012 11:42, Johann Spies wrote: > I cannot open http://www.web2pyslices.com. I have tried in Firefox, Opera > and Chrome and get the following error: > > This webpage has a redirect loop > Apologies for sending the first email with an empty subject line. Johann --

Re: [web2py] Re: nginx+uwsgi and ubuntu 12.10

2012-11-29 Thread Johann Spies
On 28 November 2012 22:16, Richard Vézina wrote: > BUMP! > >> >> >> I have tried uwsgi/nginx several times on different Debian computers. Although I had some success, it just happened that somtimes errors occured. I found it very difficult to debug and gave up on it. I am back using Apache now whi

Re: [web2py] Re: Multiple submit buttons using selectable in SQLFORM.grid

2012-11-30 Thread Johann Spies
On 30 November 2012 03:59, Wes Hall wrote: What I have done was to make the function the button redirects to one that gives the user a choice what to do with the selected records. That is a sort of workaround. Regards Johann. -- Because experiencing your loyal love is better than life itself,

Re: [web2py] python web2py.py -S welcome doesn't work

2012-12-03 Thread Johann Spies
On 4 December 2012 03:24, Michael Feingold wrote: > When I type: > python web2py.py -S welcome > > It just says: > python: can't open file 'web2py.py': [Errno 2] No such file or directory > > I have python 2.7.3 and I have web2py 1.99.7. > Where is the file web2py.py located? I was in the web2py d

[web2py] Grid documentation

2012-12-04 Thread Johann Spies
Can somebody please update the book's documentation about the grid. All the arguments for using the grid are not covered in the book. There is no documentation in the code for the grid options either. e.g. What is the content of the dicts createargs, viewargs, editargs supposed to be? Regards J

Re: [web2py] Re: SQLFORM.grid joins and view/edit

2012-12-18 Thread Johann Spies
On 17 December 2012 14:58, Michael Hall wrote: > Just bumping this as I am still struggling with view and edit for joined > SQLFORM.grid's > > On Wednesday, 28 November 2012 11:17:36 UTC, Michael Hall wrote: >> >> I have a SQLFORM.grid with a join, however when I insert, edit or update >> a recor

Re: [web2py] Re: Unable to create/Insert-in tables in potgre database

2012-12-18 Thread Johann Spies
> > Then I've define following statement in db.py: > *db = DAL('postgres://testuser:12345@localhost/testdb')* > I do not use Windows but maybe you can try using the port number on which the postgresql-server is listening in your connection string eg.: *db = DAL('postgres://testuse

Re: [web2py] SQLFORM.grid

2012-12-18 Thread Johann Spies
On 13 December 2012 23:08, Drew wrote: > Greetings, > > I'd like to use the sql 'distinct' in a SQLFORM.grid 'query', but it is > only valid as parameter in the 'select' method. > I guess the 'group' parameter to SQLFORM.grid would work, but then I have > to build the columns to group by, which s

[web2py] fadeOut response.flash

2012-12-20 Thread Johann Spies
When I log in the flash telling me that I am logged in does not timeout until I close it. I want it to fade out after a period - say two seconds. I have no clarity on how to change this behaviour in web2py.js. How do get the flash to fade out and set the timeout? Regards Johann -- Because exp

Re: [web2py] Re: The book updates and status

2012-12-20 Thread Johann Spies
On 19 December 2012 19:11, Massimo Di Pierro wrote: > It would help me if people could add to this thread some comments about: > - what needs clarification? > The request I mentioned in an earlier message ( https://groups.google.com/forum/?fromgroups=#!searchin/web2py/johann$20spies/web2py/s2tn5

[web2py] Two questions: 1. empty SQLFORM.grid 2. Represent question

2011-12-13 Thread Johann Spies
Please help me to understand the behaviour of the following controller. It receives a name of a table and that table's title-field from a form. def lys_vermiste_titels(): """ tt = title-field tabel = tabelname """ tabel = request.vars.tabel tt = request.vars.tt db[tabe

Re: [web2py] Re: Two questions: 1. empty SQLFORM.grid 2. Represent question

2011-12-13 Thread Johann Spies
Thanks Anthony, db[tabel].id.represents > > should be: > > db[tabel].id.represent > > Maybe I am becoming tired. I should have seen that. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: Two questions: 1. empty SQLFORM.grid 2. Represent question

2011-12-13 Thread Johann Spies
On 13 December 2011 16:05, Cliff wrote: > Johann, > > Does grid work if you comment out that left join? > It is not possible with that query. It is the essence of the query. I do not have a problem with the grid using more general queries. Regards Johann -- Because experiencing your loyal l

Re: [web2py] Re: Two questions: 1. empty SQLFORM.grid 2. Represent question

2011-12-14 Thread Johann Spies
On 14 December 2011 14:07, Cliff wrote: > > > It is not possible with that query. It is the essence of the query. > > I don't think grid processes left joins. > > You might try smartgrid. It knows about left joins and gives you a > link to the foreign table, but it doesn't display any informatio

Re: [web2py] bulk_insert

2011-12-14 Thread Johann Spies
On 15 December 2011 00:40, lyn2py wrote: > There's bulk_insert and update_or_insert, but is there a function for > bulk_update_or_insert for DAL? > > If the code has to decide on a per-record basis whether it should be an update or insert then it is no longer bulk_*. Or do I misunderstand you?

[web2py] Solidform: key-error

2011-12-15 Thread Johann Spies
I get table = self.createform(xfields) File "applications/init/modules/plugin_solidform.py", line 96, in createform n = len(self.flat_fields) KeyError: 'article_eq' when I use the following code: fields = ['id', 'title', 'primaryauthor', 'author

Re: [web2py] problem with mod_wsgi deployment

2011-12-18 Thread Johann Spies
Dear Hassan, On 15 December 2011 12:32, Web2Py Freak wrote: > Dear All, > i am trying to use mod_wsgi with apache on fedora i installed web2py > in var/www/ and i unzipped it , and i edited the httpd.conf and added > the virtual host script but it keeps giving me this error with i do "$ > serv

Re: [web2py] Re: Solidform: key-error

2011-12-19 Thread Johann Spies
Dear Kenji, Apologies for the late reply. I was away for a few days. Do you use virtual fields for computing the article_eq and ltitle? > > No. Here is my model: akb_signature_uuid = db.Table(db, 'akb_signature_uuid', Field('uuid', length = 64, default = lambda:str(uuid.u

Re: [web2py] Re: SQLForm.grid - How do I use it properly?

2011-12-19 Thread Johann Spies
On 19 December 2011 13:41, Rahul wrote: > Also, to add to above questions - How can we hide the query > button on the search area in sqlform.grid. And if its possible to hide > clear button as well!! > > Use the argument 'searchable=False' in your grid definition. See http://www.web2py.com/

Re: [web2py] Re: SQLForm.grid - How do I use it properly?

2011-12-19 Thread Johann Spies
On 19 December 2011 12:06, Rahul wrote: > Hi All, > I was just wondering if I can use the row.id or any information > with sqlform.grid - > Below is the link I have defined to show a button called Send Request. > I have re-directed it to use a custom function "regstatus" that passes > a row.

Re: [web2py] Re: Solidform: key-error

2011-12-19 Thread Johann Spies
Thanks. I will try it out and let you know. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: Solidform: key-error

2011-12-20 Thread Johann Spies
Dear Kenji, The form is working now without the previous problems. Thank you very much for making life easier for us! Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] production site hosting

2011-12-20 Thread Johann Spies
On 20 December 2011 07:55, chandrakant kumar wrote: > what are the good options(web hosts) for hosting the production sites? I'm > located in India. > Webfaction.com is a good option especially now that they have increased the available memory resources. Regards Johann -- Because experiencin

Re: [web2py] Re: SQLForm.grid - How do I use it properly?

2011-12-20 Thread Johann Spies
On 20 December 2011 07:30, Rahul wrote: Is there a way to hide just the query button as for a public site, > Unfortunately I don't know. You might find some clues inspecting the source code of gluon/sqlhtml.py. Regards Johann -- Because experiencing your loyal love is better than life itself,

Re: [web2py] Re: SQLForm.grid - How do I use it properly?

2011-12-20 Thread Johann Spies
On 20 December 2011 14:25, Rahul wrote: > @Johann, below code does not work for me. :( > links = [lambda row: A('Edit' , _href = URL('default', > 'edit_journal', args = [row.id]))] > > I used details='False' and it does not show the buttons to me, but > shows my custom button only which is w

Re: [web2py] Re: SQLForm.grid - How do I use it properly?

2011-12-21 Thread Johann Spies
Show me the code of regstatus Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: new book now available in HTML (english, japanese, italian)

2011-12-21 Thread Johann Spies
It is working for me. Perhaps you should try again. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Web-page freezes on db.define_table

2011-12-21 Thread Johann Spies
Hallo Axel, On 21 December 2011 12:23, Axel wrote: > But when accessing the app I get an error ticket: > Ticket ID > 127.0.0.1.2011-12-21.11-11-59.27d5caca-b9cf-4f73-b3e7-4a7a61318e19 > (1060, u"Duplicate > column name > 'nyckel'") > > Shouldn't define_table create or just use the table which i

Re: [web2py] Re: Web-page freezes on db.define_table

2011-12-21 Thread Johann Spies
On 21 December 2011 12:42, Axel wrote: > I can't see that I have duplicate column names in the statement: > > db.define_table('testdata',Field('idtestdata'),Field('nyckel'),Field('data')) > > Obviously, there are no duplicate column names in the database. > > Or am I missing something obvious? >

Re: [web2py] Re: Web-page freezes on db.define_table

2011-12-21 Thread Johann Spies
On 21 December 2011 14:15, Axel wrote: > Johann Spies writes: > > > Use the ticket interface to go to the line of code that caused the > problem. > Maybe there is something in the controller that causes this.RegardsJohann > > The ticket interface says: > > Tr

[web2py] From csv to web2py-model

2011-12-21 Thread Johann Spies
I have to build new models from csv-data files regularly and have written a small, primitive script to assist me in this. I have attached it. Maybe someone finds it useful. Usage: python model_from_csv.py It will print out a dictionary with a as keys the fields and values the maximum length of

Re: [web2py] Re: Web-page freezes on db.define_table

2011-12-21 Thread Johann Spies
On 21 December 2011 15:04, Axel wrote: > It must have been the files in web2py/applications//database/. I > will > remember to try this if the problem occurs again. > > Dropping the table might not be an option in the future... > > Be careful with those files. If you delete the wrong ones you ma

Re: [web2py] Re: From csv to web2py-model

2011-12-21 Thread Johann Spies
On 21 December 2011 17:38, Anthony wrote: > You might also find this useful (perhaps could incorporate with > model_from_csv to identify more field types automatically): > http://code.google.com/p/csvstudio/ > > > Thanks. Johann -- Because experiencing your loyal love is better than life itself

Re: [web2py] Re: What is the best way to migrate a production server to 1.99.4?

2011-12-21 Thread Johann Spies
On 22 December 2011 06:16, Massimo Di Pierro wrote: > Just unzip new web2py over old one and restart the web server. Make > sure you backup. ; If the apps in production were developed with a version of Web2py before the existence of smartgrid you might have to update your static/js and static/c

<    1   2   3   4   5   6   7   8   9   10   >