Hi- last night I wanted to change my database name (postgres) and make
a couple of small changes.. So, I exported the six tables or so
to .csv via the admin pages, then dropped my database, made the change
in the DAL connection string, created a new database, and hit go..
That didnt work.. so I c
oh - I bet it is that web2py is expecting a field called id
whereas I define my own primary key 'pkey' and there is no 'id'
assuming that is true, then tables with no primary key 'id'
are not serializable by json, but xml works ?
seems like a side effect and not intended behavior
On Mar 3, 7:38 am, Jonathan Lundell wrote:
> On Mar 3, 2011, at 1:46 AM, darkblue_b wrote:
>
> >>> @jonathan: Yes, a more detailed error messages than "no json" would be
> >>> awesome.
>
> >> generic.json now says:
>
> >> {{
&g
> > @jonathan: Yes, a more detailed error messages than "no json" would be
> > awesome.
>
> generic.json now says:
>
> {{
> ###
> # response._vars contains the dictionary returned by the controller action
> ###
> try:
> from gluon.serializers import json
> response.write(json(response._vars
> The problem is that not everything is json and rss serializable. What
> does your action look like?
a controller has a function called get_companies()
The companies table was chosen because it is readable as flat, for
learning..
(interested in .html .json and then perhaps .csv)
def get_compani
as per the very simple instructions, I wrote a controller function to
return a few items..
generic.html and generic.xml work, but generic.json and generic.rss
fail
just learning still, I searched the newsgroup and found
>Lorin Rivers Jan 13, 2:26 pm
>OK, if I specify which columns get ret
I see, it makes a button per ID
works for now.. thx! -Brian
t a list / popup menu ?
I am loading more data now..
> On Feb 27, 8:21 pm, darkblue_b wrote:
>
> > well I guessed a little - and now something seems to work!
> > (more testing now)
>
> > {{=row.affirm_pkey}}{{pass}}
>
> > -Brian
>
> > On Feb
well I guessed a little - and now something seems to work!
(more testing now)
{{=row.affirm_pkey}}{{pass}}
-Brian
On Feb 27, 6:06 pm, darkblue_b wrote:
> On Feb 27, 5:41 pm, Massimo Di Pierro
> wrote:
>
>
>
> > Here is a possible solution (typos aside):
>
> &g
??
if it is removed, I get
"missing pass in view"
if it is there, and I typed it in right
it is simply a very long error in parse container with no msg
-Brian
> On Feb 27, 6:53 pm, darkblue_b wrote:
>
> > Hi- maybe this is really easy and I havent found i
Hi- maybe this is really easy and I havent found it yet..
I now have a table defined in db.py, like so
db.define_table('ratings_view',
Field('flat_key', type='integer'),
Field('rating_value', type='double'),
Field('category', type='text'),
Field('credit', type='text'),
Field('s
in case I wasnt clear, I used "extract_pgsql_models.py" to create the
model..
you have to re-arrange the output, from alpha by method to leaf tables
first
but it appears to work well..
On Feb 26, 5:39 am, DenesL wrote:
> > Hi All- making some progress here in week 1 with web2py...
> > I wrote my
a quick try with the new widget.py on Debian 6, works well for me..
On Feb 26, 11:34 am, José L. wrote:
> On Saturday, February 26, 2011 7:29:09 PM UTC+1, Massimo Di Pierro wrote:
>
> > Thanks,
> > your fix is in trunk.
>
> > I'd like to see the gtk version and I am ok to you adding it to trunk
>
hi- thanks for this continuing thread..
I thought about it a bit, and yes, I see there is a great fundamental
divide between people new to web2py jumping in and trying to make
things work with executesql() and such, and on the other hand using
the framework to do what it does.. that's true for me,
ds in iPython now
> Em 24/02/2011, às 06:14, darkblue_b escreveu:
>
> > from the linux command line, in web2py/
> > python gluon/shell.py -S test_rv
>
> > where test_rv is my small working app
> > I get ipython, but I cant find any app context (?)
> > for example, whos whows nothing
>
> > ??
>
> > -Brian
the reply literally addressed nothing I asked about!
btw- I answer questions daily in my own group..
so I know the system works! -Brian
On Feb 25, 1:11 pm, villas wrote:
> On Feb 25, 9:20 am, darkblue_b wrote:
>
> > this is a non-answer..
>
> Well, even if some answers are m
this is a non-answer..
On Feb 24, 6:51 am, pbreit wrote:
> Depending on how far along you are, I typically advise 1) build your models
> in Web2py and let it create your DB schema and 2) try to first use Web2py
> DAL.
>
> While you CAN create your DB first and you CAN write raw SQL, it kind of
>
ing to do... -Brian
>
> On Thu, Feb 24, 2011 at 6:06 AM, darkblue_b wrote:
>
> > Hi All- making some progress here in week 1 with web2py...
> > I wrote my postgres database first, and generated the model from it..
> > and that is working well ..
> > But I have o
Hi All- making some progress here in week 1 with web2py...
I wrote my postgres database first, and generated the model from it..
and that is working well ..
But I have one *postgres* view, which is about 5 joins.. I dont yet
understand..
Do i have to write this out in the web2py *QL, or can I exe
from the linux command line, in web2py/
python gluon/shell.py -S test_rv
where test_rv is my small working app
I get ipython, but I cant find any app context (?)
for example, whos whows nothing
??
-Brian
thank you! will try shortly
On Feb 21, 6:45 pm, Anthony wrote:
> On Monday, February 21, 2011 9:08:16 PM UTC-5, darkblue_b wrote:
>
> > I guess I am still missing something..
> > I wrote this, but, logged in, I get a msg that says "no json" and a
> > b
= { 'key1' : 'response 1' }
return sample_data
def data_as_json():
stuff = get_data()
return json( stuff )
On Feb 21, 5:34 pm, darkblue_b wrote:
> I am trying it now..
>
> (fyi, Google Groups auto removes the URL in your response)
>
> On Feb 21, 4:37 pm, Massim
t; @auth.requires_login()
> def f():
> return dict(data=data)
>
> and call it withhttp://.json(int this second case you must
> return a dict)
>
> and call it with .json
>
> On Feb 21, 5:14 pm, darkblue_b wrote:
>
> > Hi All- just stumbled upon web2py, glad to
Hi All- just stumbled upon web2py, glad to see it!
I built a model that works for a client, and now simply want to return
JSON *for a logged in user".. I am sure this is straightforward, but
maybe someone could say it in a simple way..
thanks in advance
-Brian
24 matches
Mail list logo