You can reference the table itself like this.
Try:
db.define_table('table_example',
SQLField('some_int_field','integer'),
SQLField('parent_id_field', 'integer'))
and then treat parent_id_field just as it's name suggests
On Friday 12 June 2009 10:27:09 cpt1002 wrote:
> Hi,
>
> Has anyon
I upgraded my development site to 1.64.1 but I find I'm not
"authorized" to see most of my site now. I think there may have been
some changes to the way auth works.
For example, if I select a link that goes to a controller function
that has the decorator @auth.reqires_login() it sometimes displa
hi together,
how can i delete in this code only the requested content from the
table, not the whole table content?
here my code:
{{for projekte in pro:}}
{{if projekte.pend <= now:}}
{{=projekte.cdate}} - {{=A(projekte.pname,_href=URL
(r=request,f="show",ar
For some reason the session.flash doesn't work on an auth password
recovery (which should really be called a password reset I think). I
tried it with setting auth.messages.email_sent and without. I am
running from the latest source.
--~--~-~--~~~---~--~~
You rece
On Friday 12 June 2009 14:25:29 Joe Barnhart wrote:
> I upgraded my development site to 1.64.1 but I find I'm not
> "authorized" to see most of my site now. I think there may have been
> some changes to the way auth works.
Hello Joe.
I can't reproduce your problem on my site (which uses a slight
I had the same problem:
http://groups.google.com/group/web2py/msg/fb2a167a01a92534
I feel it was a corrupted update/download issue ( I did not
investigate the cause ).
Using SVN I just created a new repository and downloaded web2py trunk
again, problem gone.
Hope it helps.
--~--~-~--~---
Hi,
how can i use the XML-Service for my tables?
Because i would acces from flex(action script) via xml on my tables. I
read there is a service in web2py
for this, but how can i use this?
thanks
Peter
--~--~-~--~~~---~--~~
You received this message because you are
On Jun 12, 12:20 pm, pk wrote:
> how can i use the XML-Service for my tables?
> Because i would acces from flex(action script) via xml on my tables. I
> read there is a service in web2py
> for this, but how can i use this?
http://web2py.com/examples/default/tools#services
F
--~--~-~--~-
thanks but how can i give all the content from all tables back as xml?
On 12 Jun., 13:49, Fran wrote:
> On Jun 12, 12:20 pm, pk wrote:
>
> > how can i use the XML-Service for my tables?
> > Because i would acces from flex(action script) via xml on my tables. I
> > read there is a service in web
Probably you have
crud.settings.auth=auth
You do not want that.
On Jun 12, 5:25 am, Joe Barnhart wrote:
> I upgraded my development site to 1.64.1 but I find I'm not
> "authorized" to see most of my site now. I think there may have been
> some changes to the way auth works.
>
> For example,
Will investigate.. Should work
On Jun 12, 1:27 am, cpt1002 wrote:
> Hi,
>
> Has anyone gotten an error using the "reference table" call with
> similar model code:
>
> db.define_table('table_example',
> SQLField('some_int_field','integer'),
> SQLField('parent_id_field', 'reference table_e
if you have
def data(): return crud()
try
http://127.0.0.1:8000/app/default/data/tablename/select.xml
On Jun 12, 7:20 am, pk wrote:
> thanks but how can i give all the content from all tables back as xml?
>
> On 12 Jun., 13:49, Fran wrote:
>
> > On Jun 12, 12:20 pm, pk wrote:
>
> > > how ca
On Jun 12, 8:46 am, AchipA wrote:
> Errr, but that is how it works right now, so you have to keep this
> behavior in some form if you want to be backward compatible.
True but I was thinking why would you execute another controller's
model if it is supposed to be for that particular controller
> If it is easy to implement I don't see why not.
> All the other ideas seem to have major drawbacks.
> Time (and lots of live testing) will tell.
talking about lazy or special model files?
--~--~-~--~~~---~--~~
You received this message because you are subscribed
works for me. something is wrong in your update.
On Jun 12, 1:27 am, cpt1002 wrote:
> Hi,
>
> Has anyone gotten an error using the "reference table" call with
> similar model code:
>
> db.define_table('table_example',
> SQLField('some_int_field','integer'),
> SQLField('parent_id_field',
Lots of people are reporting problems with CRUD. This is because they
have
crud.settings.auth=auth
which did not work before and works now because of a bug fix.
- The above line does not do what you think.
- The above line is NOT REQUIRED to make @auth.requires_login,
@auth.requires_membership
On Jun 12, 4:36 am, DenesL wrote:
> > a) if there is no stuff.py in models, we include all models,
> > convenient for development, friendly to newbies
>
> If no stuff.py include everything else?.
> I am against this one.
Errr, but that is how it works right now, so you have to keep this
behavior
lazytables
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
web2py+unsubscr...@
I know the name is wrong. Can you help debug this?
Massimo
On Jun 12, 5:52 am, "mr.freeze" wrote:
> For some reason the session.flash doesn't work on an auth password
> recovery (which should really be called a password reset I think). I
> tried it with setting auth.messages.email_sent and wi
On Jun 12, 4:58 am, Alexey Nezhdanov wrote:
> You can reference the table itself like this.
> Try:
> db.define_table('table_example',
> SQLField('some_int_field','integer'),
> SQLField('parent_id_field', 'integer'))
> and then treat parent_id_field just as it's name suggests
Isn't def
See example in cookbook2 slide 50.
Cookbook2: http://groups.google.com/group/web2py/msg/fcd6aa1687410501
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send ema
but i get an empty page if i try
http://127.0.0.1:8000/2busy/default/data/project/select.xml
here the code in my model:
from gluon.tools import Mail, Auth, Crud, Service # new in web2py
1.56
service = Service(globals())
crud = Crud(globals(),db)
def data(): return crud()
On 12 Jun., 15:
On Jun 12, 2:32 pm, DenesL wrote:
> On Jun 12, 4:58 am, Alexey Nezhdanov wrote:
> > You can reference the table itself like this.
> > Try:
> > db.define_table('table_example',
> > SQLField('some_int_field','integer'),
> > SQLField('parent_id_field', 'integer'))
> > and then treat pare
Let's get there:
http://www.turnkeylinux.org/appliances/django
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe
how would i go about processing a normal form. Say I have a search
bar, how would I call a function with params, such as:
def doSearch(query):
thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Fram
With latest trunk I get neither XML nor an empty page.
The response contains an html table with links to
/app_name/default/data/select/table_name
for each table in db.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
Oops... disregard last post, wrong link.
With /app/default/data/tablename/select.xml
I get HTTP 404 webpage not found.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this gr
Same result with the seemingly correct syntax:
/app/default/data/select/tablename.xml
With tablename=dog
/app/default/data/read/dog/1
produces a read-only form with dog #1 info
while
/app/default/data/read/dog/1.xml
creates a ticket:
Traceback (most recent call last):
File "D:\web2py\tr
If I understood correctly, the syntax goes like this:
http://server:port/app/ctl/fct/a/b/c?p=1&q=test
a,b,c are args and you find them in request.args as ['a','b','c']
p,q are named vars returned by forms,
they would be in request.vars as {'p':'1', 'q':'test'}
see p.86-87 in the pdf manual.
My packaging skills for creating .debs are nonexistent. But I would be
willing to package a VM with web2py + apps for say VirtualBox, KVM and
VMWare. All are quite popular modes of trialling software.
Suggest some appropriate web2py appliances to include and I will give
it a go.
On Jun 12, 9:11
this was never suppoed to work but it not supposed to give you a
ticket either. It is a case I never thought about. It can be fixed,
tonight.
Massimo
On Jun 12, 10:11 am, DenesL wrote:
> Same result with the seemingly correct syntax:
> /app/default/data/select/tablename.xml
>
> With tablename
Micheal,
def's that are passed values are treated as private in the web2py
environment. Keep that in mind.
Lets say you wanted to search for a person's records by last name. You
have a field in a table -- SQLForm('lastname','string')
Steps:
1) Determine what you want returned. Then construct y
try:
def select(): return crud.select()
http://127.0.0.1:8000/[app]/default/select/[tablename]/whatever.xml
this should work although it is "experimental" because it is using a
default serializer on your own data. You would have do define your own
serializer.
Massimo
On Jun 12, 8:56 am, pk w
I still get Invalid function
I don`t know what i have to do that this will work
On 12 Jun., 18:22, mdipierro wrote:
> try:
>
> def select(): return crud.select()
>
> http://127.0.0.1:8000/[app]/default/select/[tablename]/whatever.xml
>
> this should work although it is "experimental" because it
I would go with bare web2py unless somebody wants to work on improving
and clening up the sysadmin appliance.
Thanks for your help
On Jun 12, 10:37 am, JohnMc wrote:
> My packaging skills for creating .debs are nonexistent. But I would be
> willing to package a VM with web2py + apps for say Virt
hi,
how can i sort or orderby my table, when i will show the newest
content on top?
i have a field calls timestamp with 'datetime'
and now i will show on the html page the newest one on top like
12.06.2009 - Test
10.06.2009 - Test2
...
thanks
--~--~-~--~~~---~--~
On Jun 12, 6:14 pm, pk wrote:
> how can i sort or orderby my table, when i will show the newest
> content on top?
> i have a field calls timestamp with 'datetime'
> and now i will show on the html page the newest one on top like
> 12.06.2009 - Test
> 10.06.2009 - Test2
crud.select(db.tablename,
On Jun 12, 2:56 pm, pk wrote:
> here the code in my model:
> def data(): return crud()
This line should be in the default controller, not the model.
F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Fra
I have been working on this this morning and YES, there is a bug. But
there is more than that. The syntax I proposed before was
http://.../app/controller/function/arg0/arg1/.../argN.extension
The problem is that works only if no args else there is ambiguity on
whether the extension belongs t
ok thanks,
On 12 Jun., 19:32, Fran wrote:
> On Jun 12, 6:14 pm, pk wrote:
>
> > how can i sort or orderby my table, when i will show the newest
> > content on top?
> > i have a field calls timestamp with 'datetime'
> > and now i will show on the html page the newest one on top like
> > 12.06.20
it`s too complex for me ;)
i will only show the table as xml
and now i`m absolutely overstrained :(
please help me to solve my problem
On 12 Jun., 19:37, mdipierro wrote:
> I have been working on this this morning and YES, there is a bug. But
> there is more than that. The syntax I proposed be
hi,
i ask this today and i need this very important.
Can you please help me. for example my html page :
12.05.2009 - Test - delete
delete should be a hyperlink
when the user clicks on it, it should delete the Test from the table.
how can i solve this problem in my html?
thanks
--~--~-
OK thanks. I'll continue using a dedicated field to allow editing of
the "user-friendly" filename after uploading.
Ted
On Jun 11, 9:40 pm, mdipierro wrote:
> Currently when you upload a file, the actual file goes in the
> filesystem of "uploadfield" in the database. The filename is
> b16encoded
For now just do this:
def table_as_xml():
from gluon.serializers import xml
response.headers['Content-Type']='text/xml'
return xml(db(db[request.args(0)].id>0).select().as_list())
Then call it as
http://127.0.0.1:8000/[yourappname]/default/table_as_xml/[tablename]
On Jun 12, 12:
That really depdends on how the page is generated? Can you post your
code for this page?
I have a feeling you are trying to implement some rails example which
does not translate quite the same in web2py.
have you looked into http:///youapp/appadmin?
Massimo
On Jun 12, 12:58 pm, pk wrote:
hi,
i solved now my problem.
On 12 Jun., 19:58, pk wrote:
> hi,
> i ask this today and i need this very important.
> Can you please help me. for example my html page :
>
> 12.05.2009 - Test - delete
>
> delete should be a hyperlink
>
> when the user clicks on it, it should delete the Test from
hi massimo,
thanks a lot, i`m very happy now ;)
dear
Peter
On 12 Jun., 20:10, mdipierro wrote:
> For now just do this:
>
> def table_as_xml():
> from gluon.serializers import xml
> response.headers['Content-Type']='text/xml'
> return xml(db(db[request.args(0)].id>0).select().as
I think the "patch" may have been the change I suggested in this
thread dealing with file uploads using forms within a jDiv.
http://groups.google.com/group/web2py/browse_frm/thread/34533d763a5e856f/c6cb190b051a03bc?lnk=gst&q=jdiv+file+upload#c6cb190b051a03bc
Basically the change was to utilize j
Is the work being done with jPolite meant to replace the work that was
being done with jDiv?
I've been using a modified version of the older jDiv code in my app.
Should I be looking instead to use jPolite?
Ted
On May 19, 12:06 pm, mdipierro wrote:
> I turnedjpoliteinto a web2py app.
>
> http
They should be merged but jDiv should stay. What does you modifie
version do? Can you share it?
On Jun 12, 1:27 pm, Ted G wrote:
> Is the work being done with jPolite meant to replace the work that was
> being done with jDiv?
>
> I've been using a modified version of the older jDiv code in my ap
I want to do something like this, but it doesn't seem to work:
x=db(query).select(stuff)
for y in x:
x['y']['field1'] = 'new name'
I want to preserve the SQLRows representation of x, so I don't want
to make a copy to some other data structure.
Can anyone help me with the syntax, please?
I want to do something like this, but it doesn't seem to work:
x=db(query).select(stuff)
for y in x:
x['y']['field1'] = 'new name'
I want to preserve the SQLTable representation of x, so I don't want
to make a copy to some other data structure.
Can anyone help me with the syntax, please?
-
Thanks but I do have
type="text/javascript"/> <-- this ends with /> which is correct.
Looks like no one else has seen this problem.I suspect the WSGI
servers serve up the .js file in a different order than what Microsoft
IIS 5.1 does
and also I am guessing the IE8 and Firefox are sensitive to t
And Massimo wins the kewpie doll! Yes, this statement was uncommented
in my db.py file. Now that it's gone my auth problems are no more.
Thanks for the head's up.
On Jun 12, 5:30 am, mdipierro wrote:
> Probably you have
>
> crud.settings.auth=auth
>
> You do not want that.
--~--~-~-
Hi,
is the sourcecode for the web2py.com/appliances also available in a
verison control system like web2py itself?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group,
y['field1'] = 'new name'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
web2
My only con is one of style. To me it just seems to break the
simplicity of the /A/C/F/Arg/ call. I would advocate something like --
/A/C/F/Arg/?serve=xml&
But that's just me.
On Jun 12, 12:37 pm, mdipierro wrote:
> I have been working on this this morning and YES, there is a bug. But
>
I'm trying to display text in a page using an universal encoding such
as UTF-8.
Here is an example:
return dict(message=u'Castro de Avelãs')
in the view I have:
...
{{=message}}
...
It doesn't work... I don't get the 'ã' or I get it messed up if I do
message='Castro de Avelãs'
I know for a
On Fri, Jun 12, 2009 at 8:27 PM, blackthorne wrote:
>
> I'm trying to display text in a page using an universal encoding such
> as UTF-8.
> Here is an example:
> return dict(message=u'Castro de Avelãs')
>
> in the view I have:
>
>
>
>
> ...
> {{=message}}
> ...
>
> It doesn't work... I don't ge
I did tried that with but without any success.
as I said, it can't be problem of the browser or the view side since
It does work fine if I write it on the template directly.
On Jun 13, 3:15�am, �lvaro Justen [Turicas]
wrote:
> On Fri, Jun 12, 2009 at 8:27 PM, blackthorne wrote:
>
> > I'm trying
No need to u'Castro de Avelãs', just 'Castro de Avelãs', providing
that your source code itself is in utf8 (by default, it is).
On Jun13, 7:27am, blackthorne wrote:
> I'm trying to display text in a page using an universal encoding such
> as UTF-8.
> Here is an example:
> return dict(message=u'C
as you can see on my first post in this thread I also tried it that
way but I get it messed up with
message='Castro de Avelãs'. Something like, 'Castro de Avel?s'
with message=u'Castro de Avelãs' I get 'Castro de Avels'
On Jun 13, 3:26 am, Iceberg wrote:
> No need to u'Castro de Avelãs', just
Mmm, try putting these lines at the beginning of your controller and
see whether it makes difference?
#!/usr/bin/env python
# coding: utf8
On Jun13, 10:30am, Francisco Gama wrote:
> as you can see on my first post in this thread I also tried it that
> way but I get it messed up with
> messa
Thank you!
That did the trick :)
On Jun 13, 3:38 am, Iceberg wrote:
> Mmm, try putting these lines at the beginning of your controller and
> see whether it makes difference?
>
> #!/usr/bin/env python
> # coding: utf8
>
> On Jun13, 10:30am, Francisco Gama wrote:
>
> > as you can see on my fi
Massimo, I would suggest this correction by Iceberg as default for
controller and model templates...
On Jun 13, 3:38 am, Iceberg wrote:
> Mmm, try putting these lines at the beginning of your controller and
> see whether it makes difference?
>
> #!/usr/bin/env python
> # coding: utf8
>
> On
Me too. :-) After all, I've been done that manually for years. Should
propose that much earlier.
On Jun13, 10:44am, Francisco Gama wrote:
> Massimo, I would suggest this correction by Iceberg as default for
> controller and model templates...
>
> On Jun 13, 3:38 am, Iceberg wrote:
>
> > Mmm, t
most browser do not understand
should be
...
On Jun 12, 2:08 pm, dlypka wrote:
> Thanks but I do have
> type="text/javascript"/> <-- this ends with /> which is correct.
>
> Looks like no one else has seen this problem.I suspect the WSGI
> servers serve up the .js file in a different order tha
No because I do not have the resources to maintain it. I do encorage
people to take ownership of those apps, post them using a version
control system and I will just link them.
On Jun 12, 2:55 pm, Hans Donner wrote:
> Hi,
>
> is the sourcecode for the web2py.com/appliances also available in a
>
Mind that you would change the data retrieved from the db but not the
data in the db.
On Jun 12, 3:54 pm, DenesL wrote:
> y['field1'] = 'new name'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framewor
This we cannot do because it would ve backward incompatible
On Jun 12, 4:31 pm, JohnMc wrote:
> My only con is one of style. To me it just seems to break the
> simplicity of the /A/C/F/Arg/ call. I would advocate something like --
>
> /A/C/F/Arg/?serve=xml&
>
> But that's just me.
>
> On J
Given that they are executed, not imported the first of these two
lines
#!/usr/bin/env python
# coding: utf8
seems inappropriate. Will the second line be sufficient?
On Jun 12, 9:52 pm, Iceberg wrote:
> Me too. :-) After all, I've been done that manually for years. Should
> propose that
yes, I assumed that one.
As to your question, I just tried just with the second line (#coding:
utf8) and yes, it worked fine.
:)
On Jun 13, 4:06 am, mdipierro wrote:
> Given that they are executed, not imported the first of these two
> lines
>
> #!/usr/bin/env python
> # coding: utf8
>
> s
I am really excited about the jython compatibility. This opens a huge
possibility for me at work. They only use Java tools, but we are using
Jython because it's way faster.
Let's see if I can convince them to use web2py too.
Anyway, here is the post...
http://skunkyjay.wordpress.com/2009/06/12/w
Massimo, that's exactly what I want.
On Jun 12, 11:02 pm, mdipierro wrote:
> Mind that you would change the data retrieved from the db but not the
> data in the db.
>
> On Jun 12, 3:54 pm, DenesL wrote:
>
>
>
> > y['field1'] = 'new name'- Hide quoted text -
>
> - Show quoted text -
--~--~--
DenesL: I tried exactly that, but somehow, it didn't seem to work.
I'll try again. Thanks for your response!
On Jun 12, 4:54 pm, DenesL wrote:
> y['field1'] = 'new name'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
I just read it. Did not know it was yours (I does not mention the
author). Great post. Thank you Jason.
let me know if you can help testing .war file.
Massimo
On Jun 12, 10:29 pm, Jason Brower wrote:
> I am really excited about the jython compatibility. This opens a huge
> possibility for me
No it does not work.
You have to do:
x=x.as_list()
for y in x:
y['field']='value'
You cannot modify records in a SQLRows object because they are
computed when requested. This will change in the new DAL.
Massimo
On Jun 12, 10:30 pm, weheh wrote:
> DenesL: I tried exactly that, but somehow
ok, I changed the scaffolding add and admin accordingly. Uploading to
trunk now.
Massimo
On Jun 12, 10:09 pm, Francisco Gama wrote:
> yes, I assumed that one.
>
> As to your question, I just tried just with the second line (#coding:
> utf8) and yes, it worked fine.
>
> :)
>
> On Jun 13, 4:06 am
Still no comments about the issue below? I consider it an important
issues and am not sure this is best ways (although it is in trunk
now):
I have been working on this this morning and YES, there is a bug. But
there is more than that. The syntax I proposed before was
http://.../app/controlle
Nice. Anyone else writing about web2py?
On Jun 12, 8:29 pm, Jason Brower wrote:
> I am really excited about the jython compatibility. This opens a huge
> possibility for me at work. They only use Java tools, but we are using
> Jython because it's way faster.
> Let's see if I can convince them
On Friday 12 June 2009 20:49:28 mdipierro wrote:
> I would go with bare web2py unless somebody wants to work on improving
> and clening up the sysadmin appliance.
Umm... You propose to drop /admin/ from debian web2py package???
> Thanks for your help
--
Sincerely yours
Alexey Nezhdanov
--~--~-
Hi everyone.
I'm currently trying to migrate a legacy oracle database to web2py and
on the past weeks I stumbled upon several issues related to how the database
was originally designed and how web2py expects to interact with it.
Among them:
* I need support for ref cursors
* I need to write so
>From what I can tell, the issue is that a double redirect happens when
request.vars._next or auth.settings.retrieve_password_next are not
specified.
In tools.py line 1013:
if not next:
next = self.url()
This forces a redirect to /authtest/default/user which then redirects
again t
83 matches
Mail list logo