ts says the following:
>
> USAGE: extract_mssql_models db host port user passwd
> Call with SQL Server database connection parameters,
> web2py model will be printed on standard output.
> EXAMPLE: python extract_mssql_models.py mydb localhost 3306 kflanaga pass
> or
> python ext
and default values
* Supports running from the command line as well as from an IDE's debug menu.
See the COMMAND_LINE_MODE constant below
* for more info.
Requirements:
* Needs pyodbc python connector
Created by Kyle Flanagan. Based on a script by Mariano Reingart which was
ba
Thanks Niphlod, that did the trick. I did the same for createargs as well.
Normally, I would just reorder the fields in the table def and go on with
life, but in this case, I have a set of base fields that a handful of my
tables share. I needed one of these base fields to be first and another t
I know you can specify the order of fields for the main view of an
SQLFORM.grid using the optional fields parameter, however, whenever you
choose to add a new record, the order seems to be dictated by the order in
which the fields were created in the table definition. Is there a way to
explicit
nd then did the following
at the top of the view for "view" pages:
{{=back_button}}
On Tuesday, September 23, 2014 11:12:14 AM UTC-5, Kyle Flanagan wrote:
>
> I have a controller that creates a grid off of a table -- very basic grid.
> I test to see if the user is "vie
I have a controller that creates a grid off of a table -- very basic grid.
I test to see if the user is "viewing" an item in the grid (if request.args
and request.args[0] == 'view') and if so, I customize the view to present
the information in the grid in a different layout.
Now, I'd like to ad
ds of records? Anyway, in
> the case of a search, you can always set "paginate" to be sufficiently high:
>
> grid = SQLFORM.grid(..., paginate=200 if request.get_vars.keywords else 20
> )
>
> Anthony
>
> On Wednesday, May 7, 2014 1:46:26 PM UTC-4, Kyle Flanagan wrote:
&g
Is there a straightforward way to get a Rows object representing ALL the
rows referred to by SQLFORM.grid?
Something similar to grid.rows, which is good, but it only gives a Rows
object with the rows currently being displayed on that page.
I'd like to allow the user to search using the grid,
Is there an appropriate web2py way to write to the filesystem?
My ultimate goal is to have a custom export class for SQLFORM.grid which
will allow the user to download a CSV of the data, but also store a copy of
that CSV file on the file system for use by other applications on the same
web ser
= id_map[field.type[9:].strip()][long(value)]
except KeyError:
pass
elif id_offset and field.type.startswith('reference'):
try:
value = id_offset[field.type[9:].strip()]+long(value)
except K
It's normally a good idea to construct your SQLTABLE in your controller and
then pass it to your view,
e.g.:
default.py
def index():
query = db().select()
table = SQLTABLE(query,headers='fieldname:capitalize', linkto=
'table_manage')
default/index.html
{{extend 'layout.html'}}
{{=tab
Try the following:
import datetime
db.bookings.start_date.default = datetime.date(start_year, start_month,start_day
)
Since start_date is the 'date' datatype, it's expecting a python datetime
object.
On Tuesday, May 6, 2014 4:22:46 AM UTC-5, Stefan van den Eertwegh wrote:
>
> Hi all,
>
> I hav
I'm encountering an error when uploading a CSV file when dates are involved
in a computed field. Using sqlite, web2py version:
2.8.2-stable+timestamp.2013.11.28.13.54.07 (also tested on
2.9.5-stable+timestamp.2014.03.16.02.35.39).
E.g., consider the following table definition in a model:
db.de
of the grid and therefore should give you no styling issues.
>
>
> On Wednesday, 1 January 2014 05:33:23 UTC+11, Kyle Flanagan wrote:
>>
>> I'm using a table to hold temporary information from a user. I use
>> SQLFORM.grid to present this table. What I'd li
My web2py experience is limited, but it seems you're losing your
form.vars.lname variable when you navigate to the next page. You'll need to
assign it to a request.vars, session, or some other persistent variable and
then use that to build your query instead of form.vars.lname.
On Tuesday, De
I'm using a table to hold temporary information from a user. I use
SQLFORM.grid to present this table. What I'd like to do is add a submit
button below the table that calls my submit function.
If I try adding an extra element in the controller according to the book
(http://web2py.com/book/defau
Paulo,
I spent probably 48+ hours trying to get web2py running on hostgator with
no success. I tried pretty much every shared hosting guide out there,
opened a ticket with hostgator, had them work on it, but with no luck. I
don't mean to discourage you, and if you successfully get it up and
ru
I had to use this today. However, this does not work correctly when the set
is empty. We assume that if the set is empty, whatever variable value being
tested is not in the set.
Here's an updated __call__ function:
def __call__(self, value):
value, error = IS_IN_SET.__call__(self,
Fixed by revision
https://code.google.com/p/web2py/source/detail?r=64ffb31906d8. Thanks
niphlod and mdpierro.
On Thursday, August 8, 2013 4:27:35 PM UTC-5, Kyle Flanagan wrote:
>
> I submitted this as a ticket (1622), but it may be more appropriate to be
> addressed here.
>
&g
Both
2.4.6-stable+timestamp.2013.04.06.17.37.38
and
2.6.0-development+timestamp.2013.08.09.11.04.59
On Friday, August 9, 2013 2:39:49 AM UTC-5, Massimo Di Pierro wrote:
>
> Which web2py version?
>
> On Thursday, 8 August 2013 16:27:35 UTC-5, Kyle Flanagan wrote:
>>
>&g
; E.g. session.serials = [] and then session.serials.append(x)
>
> Ykä
>
> On Thursday, July 18, 2013 6:55:52 PM UTC+3, Kyle Flanagan wrote:
>>
>> What's the best way to pass a Python list back to the controller, i.e.
>> keep the list object persistent between calls? The list could
I'm trying to change the width of an SQLFORM.grid to take up the full width
of the browser window, but only in one view. I'm assuming that means I need
to change the .container width, but I can't figure out where exactly the
width needs to be changed. I've also read that changing container to
c
What's the best way to pass a Python list back to the controller, i.e. keep
the list object persistent between calls? The list could get quite large so
I'm not sure if request.args or request.vars is appropriate for it (well
the items in the list)? The code below is a mockup of what I'm trying t
I have an SQLFORM.grid w/ an ondelete calling a function customer_delete().
However, the the function is not being called and the records are not
actually being deleted from the DB. If I remove the
"ondelete=customer_delete" in my grid args, the records are being deleted.
The way I understand i
Have you taken a look at the field_id parameter for grid?
field_id must be the field of the table to be used as ID, for example
> db.mytable.id.
SQLFORM.grid(..., field_id = db.item.id,...) might be what you're looking
for if I'm understanding your correctly.
http://web2py.com/books/default/
Those were the only changes that I remember. I've packed up the changes I
made to your app and attached them, just in case there's something I don't
remember changing. I've also attached a screenshot of where I see "Medical"
to make sure we're on the same page about what you're trying to accompl
Alex,
I downloaded your app and ran it. If I understand you correctly, you're
trying to get "Medical" to show up instead of "1" when you navigate to
Humanlanguages -> English -> Dictionarytypes -> Words?
I achieved this by editing your db.py to the following:
##...
## Dictionary type means wha
Have you tried adding a format to your tables and defining your tables
using objects instead of 'reference...'?
I'm no web2py expert by any means, but I had a similar situation and when I
changed the reference for my foreign id to db.other_table instead of
'reference other_table,' the format de
I'm getting a 404 NOT FOUND error whenever I try to use a smartgrid which
is linked to from a grid. I just started using web2py about two days ago,
so I might be totally missing something here.
I currently have an SQLFORM.grid on one page with a link to another
smartgrid. The link is defined in
29 matches
Mail list logo