thanks mmlado :)
On Wed, Jun 3, 2009 at 12:21 PM, Mladen Milankovic wrote:
>
> Hi.
>
> There's a parameter to SQLFORM, showid which is True by default. Just set
> it
> to False.
> Like:
> form = SQLFORM(db.users,user,fields=['firstname','lastname'], showid =
> False)
>
> regards
> mmlado
>
>
> O
Hi.
There's a parameter to SQLFORM, showid which is True by default. Just set it
to False.
Like:
form = SQLFORM(db.users,user,fields=['firstname','lastname'], showid = False)
regards
mmlado
On Wednesday 03 June 2009 08:32:16 durga wrote:
> Hi ,
>
> I have created a table for user. to update
Hi ,
I have created a table for user. to update the table i have written
the code
def editprofile():
user = db(db.users.id==session.userid).select()[0]
form = SQLFORM(db.users,user,fields=['firstname','lastname'])
i found id field is showing in the browser though i have selected
['fir
see the docstring in gluon.Winservice
it needs the win32 lib, to be installed seperately.
--- Original Message ---
From: mdipierro
To: web2py Web Framework
Sent: 03/06/2009, 06:37:07
Subject: [web2py:23165] Re: windows service problem in 1.63 (source)
I have no idea. You may have to he
thanks guys...its working :)
On Tue, Jun 2, 2009 at 7:59 PM, mdipierro wrote:
>
> or
>
> db.Field('gender', requires = IS_IN_SET(
> ['male', 'female'],['Handsome man','Pretty woman']))
>
> to preserve order.
>
> Notice that 'gender' is more appropriate than 'sex'.
>
> Massimo
>
> On Ju
Hi,
Thank you for the insight. You're right! I wasn't using Auth. I'll go to
work on it again tomorrow.
On Tue, Jun 2, 2009 at 10:34 PM, mdipierro wrote:
>
> I see you are not using Auth, this means a lot of extra work for you.
>
> Assuming user.id was stored in session.user_id upon login yo
I have no idea. You may have to help me debug this.
If you start python from the web2py folder, can you do
import gluon.winservice?
If you start python from the gluon folder can you do
import winservice?
Can you edit main and at the bottom insert
print os.getcwd()
When you start web2py as service
I see you are not using Auth, this means a lot of extra work for you.
Assuming user.id was stored in session.user_id upon login you can do
db.guestbook.author.default=session.user_id
db.guestbook.author.writable=False # readonly
db.guestbook.author.readable=False # invisible
Anyway, I suggest y
This is a problem only if login is the entry point of your app and it
should not be. If you always get to login from a redirection you
should not have this problem.
Massimo
On Jun 2, 6:04 pm, salbefe wrote:
> Annet,
>
> I found the problem but not the solution
>
> The login form that exposes h
Ok, next version.
On Jun 2, 9:11 pm, Eddie Eyles wrote:
> Perhaps a summary of the changes could also be placed on the download
> page of the web site? Many other applications do this, and it helps
> to know before downloading whether it is worth spending the time
> downloading.
>
> Eddie
>
> O
I am new to this. I can tell this is very usefull but I do not know
how to make it work.
Any chance you can make a short video showing it (perhaps using Jing)?
Do you feel it should be included in web2py? How?
Massimo
On Jun 2, 9:04 am, sgtpep wrote:
> Source files were updated in archive. So
http://www.web2py.com/examples/static/cookbook2.pdf
--~--~-~--~~~---~--~~
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 g
web2py 1.63.3 is out with some bug fixes
--~--~-~--~~~---~--~~
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
Hi Massimo,
mdipierro wrote:
> running from source or binary?
>
Source.
--
Regards,
PhilK
'work as if you lived in the early days of a better nation'
- alasdair gray
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Perhaps a summary of the changes could also be placed on the download
page of the web site? Many other applications do this, and it helps
to know before downloading whether it is worth spending the time
downloading.
Eddie
On Jun 1, 5:43 pm, Yarko Tymciurak wrote:
> The README has a summary of
Added the import os.path and that worked like a charm.
Massimo, thanks again.
JohnMc
On Jun 2, 4:36 pm, mdipierro wrote:
> Do not use URL to build paths. also create the file in binary. This
> will do what you want.
>
> FILE = open(os.path.join
> (request.folder,'static','contacts.json'),"wb")
Annet,
I found the problem but not the solution
The login form that exposes http:///[app]/default/user/login has
a hidden field called _next. This field at the beginning is empty.
Because is empty web2py should redirect to auth.settings.login_next=URL
(r=request, c='default', f='index').
yep, I got it :)
chris
{{=LI(A(prodj.name,_href=URL(r=request,f='m202',args=
[prodj.id])),_id='m202')}}
On Jun 2, 11:36 pm, murray3 wrote:
> I have a table called Prodj.
> In JPolite if I have the following in a sidebar module (201), what is
> the syntax to pass
> args=[prodj.id] to the appropr
Hi,
Guest Book users as they create a Guest Book entry will have an id
assigned to that entry. This id goes into my users table so that I can
retrieve it. I thought the lambda function set up would enable me to
do this. Bottom line: I don't know how to do accomplish this end.
Also, I don't kn
I have a table called Prodj.
In JPolite if I have the following in a sidebar module (201), what is
the syntax to pass
args=[prodj.id] to the appropriate controller (203), for the recieving
module (203).
side menu
Create Prodj:
Create A New Pr
Annet,
Which version are you using??
Best regards
Salva
--~--~-~--~~~---~--~~
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 fro
Massimo-
Thanks! That fixed it.
Dan
On Jun 2, 1:21 pm, mdipierro wrote:
> You can use
>
> form=SQLFORM(db.table,record_id,ignore_rw=True)
> if form.accepts(request.vars, session):
> # do something
> return dict(form=form)
>
> On Jun 2, 12:28 pm, Dan wrote:
>
> > When running an app on GAE,
Do not use URL to build paths. also create the file in binary. This
will do what you want.
FILE = open(os.path.join
(request.folder,'static','contacts.json'),"wb")
On Jun 2, 4:32 pm, JohnMc wrote:
># write file out
> -->#FILE = open("../Helix/applications/Helix/static/
> contacts.json","w"
# write file out
-->#FILE = open("../Helix/applications/Helix/static/
contacts.json","w")
FILE = open(URL(r=request,c='static',f='contacts.json'),"w")
FILE.writelines(json)
FILE.close()
return dict()
I have fiddled with the above code for about an hour. Missing
something. If I
Not sure I understand the question. After
if form.accepts(...)
# here you can use form.vars.id
On Jun 2, 3:31 pm, Bill wrote:
> How do I use lambda to retrieve the most recent id in conjunction with
> the guestbook code below?
>
> Would like to update my users table with a reference id t
Hello Annet,
I have set the URLs as you did in db.py, in my case:
auth.settings.login_url=URL(r=request, c='default', f='user/login')
auth.settings.login_next=URL(r=request, c='default', f='index')
auth.settings.logout_next=URL(r=request,c='default',f='index')
I think I do not need the first li
You can use
form=SQLFORM(db.table,record_id,ignore_rw=True)
if form.accepts(request.vars, session):
# do something
return dict(form=form)
On Jun 2, 12:28 pm, Dan wrote:
> When running an app on GAE, I need to have a way to edit the data in
> the datastore. So I'd like to use the crud tools
How do I use lambda to retrieve the most recent id in conjunction with
the guestbook code below?
Would like to update my users table with a reference id to their
guestbook entry.
In order store the guestbook entry id, I need to have a reference
id. I am not sure how to obtain this.
One idea w
running from source or binary?
On Jun 2, 1:33 pm, glimmung wrote:
> Hi Guys,
>
> I'm trying to install as a service under XP SP3.
>
> I've followed the instructions at
>
>http://www.web2py.com/AlterEgo/default/show/77
>
> ...which has installed the service.
>
> However, the service will
Hi Guys,
I'm trying to install as a service under XP SP3.
I've followed the instructions at
http://www.web2py.com/AlterEgo/default/show/77
...which has installed the service.
However, the service will not start - when I look in the event log I
see: -
Python could not import t
yes they have done a good job. I think we can incorporate those in
web2py. When the DAL is done.
On Jun 2, 12:05 pm, Iceberg wrote:
> On Jun2, 11:57pm, mdipierro wrote:
>
> >http://jquerylist.com/
>
> So many cool stuff! Wow.
>
> And how do you think about this? Would it be append into web2py t
I do not see why the order of the two tables in FROM ... matters at
all.
With the current web2py you cannot specify the order. Sorry.
But I will keep thinking about it.
Massimo
On Jun 2, 11:53 am, Mariano Mara wrote:
> 2009/6/2 mdipierro
>
>
>
> > Odd. Try
>
> > db((db.HourType.id==db.WoTtHt.h
Thanks this is sufficient. Will fix it tonight.
On Jun 2, 11:21 am, Iceberg wrote:
> Problem confirmed. It is because sqlite requires that the non-ascii db
> path name must be in utf8 encoding. However, when using non-English
> Windows, the default encoding is usually some "local" encoding.
>
>
Is there a way to set the default value of a boolean field? Running
this quick test suggests to me that there is not, or at least I can't
figure out how to do it. Here's the example model:
db.define_table('snacks',
db.Field('name','string',
requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'sn
On Jun 2, 10:55 am, annet.verm...@gmail.com wrote:
> Dan,
>
> Removing the readable=False and writable=False from your model to a
> custom controller from which you call update on the crud object should
> solve the problem. For example:
>
> @auth.requires_membership('manager')
> def update_compa
Dan,
Removing the readable=False and writable=False from your model to a
custom controller from which you call update on the crud object should
solve the problem. For example:
@auth.requires_membership('manager')
def update_company():
...
db.company.status.writable=False
...
for
Salva,
I don't think its a bug. You can override the default behaviour by
setting your own URLs'. Did you put the code I provided in your model
file?
In my application I have set the following URLs in db.py:
auth.settings.login_url=URL(r=request, c='authentication', f='login')
auth.settings.log
When running an app on GAE, I need to have a way to edit the data in
the datastore. So I'd like to use the crud tools for this. However,
I'm not able to update the fields in the tables that are set to be
readable=False, writable=False. My auth_user table has a few of these
fields - stuff to descri
On Jun2, 11:57pm, mdipierro wrote:
> http://jquerylist.com/
So many cool stuff! Wow.
And how do you think about this? Would it be append into web2py to
work together with the current server side validators?
http://jquery.bassistance.de/validate/demo/
--~--~-~--~~~
2009/6/2 mdipierro
>
> Odd. Try
>
> db((db.HourType.id==db.WoTtHt.hourtype)&(db.WoTtHt.workorder==2)&
> (db.WoTtHt.valid==True)).select(
> db.HourType.code,db.TaskType.code,left=db.TaskType.on
> (db.WoTtHt.tasktype==
> db.TaskType.id))
>
thanks for the followup. Unfortunately, it doesn't work ei
Problem confirmed. It is because sqlite requires that the non-ascii db
path name must be in utf8 encoding. However, when using non-English
Windows, the default encoding is usually some "local" encoding.
Good news is this can be fixed in web2py. Just change gluon/sql.py as
below:
Add line 671,672
Thank you Annet
I have tried your code but I does not work :( . Inside the Auth class
source code I found this line of code inside the __init__ function :
self.settings.login_next = self.url('index'). I think that means that
after login it should be redirected to the index funtion.
Tht's what hap
http://jquerylist.com/
--~--~-~--~~~---~--~~
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+u
I think this is what you're looking for:
auth.settings.login_url=URL
(r=request,c='authentication',f='user',args='login')
auth.settings.login_next=URL(r=request,c='default',f='index')
auth.settings.logout_next=URL(r=request,c='default',f='index')
Kind regards,
Annet.
--~--~-~--~~--
Odd. Try
db((db.HourType.id==db.WoTtHt.hourtype)&(db.WoTtHt.workorder==2)&
(db.WoTtHt.valid==True)).select(
db.HourType.code,db.TaskType.code,left=db.TaskType.on
(db.WoTtHt.tasktype==
db.TaskType.id))
On Jun 2, 9:42 am, Mariano Mara wrote:
> 2009/6/2 mdipierro
>
>
>
> > I think you want:
>
> >
Hello,
I don't know If I doing something wrong but I thought that after login
using @auth.requires_login() I should be redirected to the index
function.
With this code, after login I remain on the loging screen: "http://
127.0.0.1:8000/test/default/user/login"
def index():
"""
example
2009/6/2 mdipierro
>
> I think you want:
>
> op1 = db((db.WoTtHt.hourtype==db.HourType.id)&(db.WoTtHt.workorder==2)
> &
> (db.WoTtHt.valid==True)).select(
> db.HourType.code,db.TaskType.code,left=db.TaskType.on
> (db.WoTtHt.tasktype==db.TaskType.id))
>
> Massimo
>
Hi Massimo, thanks for your rep
Moreover:
http://www.web2py.com/AlterEgo/default/show/227
On Jun 2, 8:06 am, roblund wrote:
> I am kind of new here, but I thought I might chime in. I am most
> likely going to use web2py as the framework on an upcoming project. At
> times, I have become frustrated at the lack of an online comm
Thank you!!
On 2 jun, 16:23, SergeyPo wrote:
> This also looks like Ruby on Rails approach, however you can write
> your own classes in web2py, put them to models dir and use them as you
> have used to. E.g. you have an sql table 'users' in DAL, and you can
> write a class
> class Users:
> d
awesome. I will take a look asap.
On Jun 2, 9:04 am, sgtpep wrote:
> Source files were updated in archive. Some issues were fixed. And also
> logs shows in console now if you are authorized in admin application.
> I forgot to mention what features of frepy are ready for working with
> web2py:
>
If you are ok that your selection widget contains uncomplete
information, than you are right. But what I am telling about, is that
you give the user a selector with unique drug names at first:
db().select(db.drugs.name, distinct=True)
user selects 'Amoxycilin', you make another query:
Amoxycili
yes, Django has more users. But we are a very active community. Look
at the number of releases. You can always ask questions here.
Massimo
On Jun 2, 8:06 am, roblund wrote:
> I am kind of new here, but I thought I might chime in. I am most
> likely going to use web2py as the framework on an up
or
db.Field('gender', requires = IS_IN_SET(
['male', 'female'],['Handsome man','Pretty woman']))
to preserve order.
Notice that 'gender' is more appropriate than 'sex'.
Massimo
On Jun 2, 7:55 am, Iceberg wrote:
> You can also try this:
>
> db.Field('sex', requires = IS_IN_SET(
>
This cannot be done with the IS_IN_DB validator. You must create your
own validator.
Massimo
On Jun 1, 3:46 pm, Offray Vladimir Luna Cárdenas
wrote:
> Hi all,
>
> I send a mail this morning:
>
> http://groups.google.com/group/web2py/browse_thread/thread/a439333f2d...
>
> *I'm still stuck with
Not sure I understand. Where did you put the chinese characters?
web2py supports unicode but all strings in code must be UTF8.
Massimo
On Jun 2, 5:51 am, plato wrote:
> i know why i meet this question because of chinese word like C:
> \Documents and Settings\Administrator\桌面 " 桌面(chinese words
I think you want:
op1 = db((db.WoTtHt.hourtype==db.HourType.id)&(db.WoTtHt.workorder==2)
&
(db.WoTtHt.valid==True)).select(
db.HourType.code,db.TaskType.code,left=db.TaskType.on
(db.WoTtHt.tasktype==db.TaskType.id))
Massimo
On Jun 2, 3:59 am, Mariano Mara wrote:
> Good night everyone.
>
> Sorr
This also looks like Ruby on Rails approach, however you can write
your own classes in web2py, put them to models dir and use them as you
have used to. E.g. you have an sql table 'users' in DAL, and you can
write a class
class Users:
def findUser(login):
u = db(db.users.login==login).s
db.table.field.represent=lambda value: A(value,_href='somewhere')
On Jun 2, 3:49 am, Samit Pal wrote:
> Hi,
>
> I am using sqltable to retrieve content from db. I want to create a
> hyperlink on one of the fields. I also want to create a tool tip on
> another field. Is there a way to do it thru
Try the following:
edit gluon/sql.py and replace
if attributes.get('distinct', False):
sql_s += ' DISTINCT'
with
if attributes.get('distinct', False)==True:
sql_s += ' DISTINCT'
ekif attributes.get('distinct', False):
sql_s += ' DISTI
Source files were updated in archive. Some issues were fixed. And also
logs shows in console now if you are authorized in admin application.
I forgot to mention what features of frepy are ready for working with
web2py:
- server-side logging using logging module
- db query logging (!) with timing a
salbefe,
I understand your point coming from a CakePHP utilization. But most of
the PHP based frameworks naturally gravitate to using a lower level of
abstraction when operating on the DB with a global namespace. What you
will find with many Python based frameworks that they use an ORM (DAL,
SQLA
I am kind of new here, but I thought I might chime in. I am most
likely going to use web2py as the framework on an upcoming project. At
times, I have become frustrated at the lack of an online community
around web2py. There is some example code, and there are some experts
around, but we could use
You can also try this:
db.Field('sex', requires = IS_IN_SET(
{'male':'Handsome man', 'female':'Pretty woman'}
))
On Jun2, 8:24pm, Mladen Milankovic wrote:
> Hi.
>
> You don't need the [] brackets.
> use:
> db.define_table('user',
> db.Field('sex', requires = IS_IN_SET(['male', 'fe
Model:
T.force('en-nl')
I just updated from web2py version 1.61.4 to version 1.63. This update
introduced the following problem. In my model I have a table:
db.define_table('event',
db.Field(...),
db.Field('van_datum',type='date',label='Van-datum *
',default='',notnull=True),
...,
Hi.
You don't need the [] brackets.
use:
db.define_table('user',
db.Field('sex', requires = IS_IN_SET(['male', 'female'])))
regards
mmlado
On Tuesday 02 June 2009 13:39:35 durga wrote:
> hi
>
> I would like create a form through SQLFORM in which one of my field to
> be generated as combo b
hi
I would like create a form through SQLFORM in which one of my field to
be generated as combo box. for example i have options male/female for
a sex field. How do i write code for this.
db.define_table('users',
SQLField('sex',requires=[IS_IN_SET
(['male','female'])])
thanks in
I would try a LAMBDA expression whiich does the lookup in the other
table and then returns the message string
On Jun 1, 4:46 pm, Offray Vladimir Luna Cárdenas
wrote:
> Hi all,
>
> I send a mail this morning:
>
> http://groups.google.com/group/web2py/browse_thread/thread/a439333f2d...
>
> *I'm st
Hello,
To explain what I'm trying to say I will put an example.
For people that come from PHP frameworks like Zend or Code Igniter we
use the models on the following way:
First, we write each model on a file (like web2py) for example:
load->database();
}
function findUser($login)
hi,
Massimo give me a answer on this,
The problem are in the model here i have define something like,
SQLField('id','id)
i add that line while I´m trying to get form.vars.id,
and that line make this error "SyntaxError: Object exists and cannot
be redefined"
On May 29, 5:12 pm, mdipierro wrot
i know why i meet this question because of chinese word like C:
\Documents and Settings\Administrator\桌面 “ 桌面(chinese words)” I think
web2py not support chinese words ;)
On 5月29日, 上午9时45分, mdipierro wrote:
> hmmm... are you upgrading from a previous version? Did you edit the
> welcome app? Wh
On Jun 2, 4:22 am, Mark Larsen wrote:
> > I think you are right
> Also, i've had trouble in the past with CherryPy blocking AJAX calls
> when another thread to eating 100%. Apache or Lighttpd would not have
> this limitation.
I think this is not CherryPy's limitation, but Web2py's. It locks the
Good night everyone.
Sorry to bother you guys with this but I'm totally stuck.
I have the following tables defined:
db.define_table("TaskType", db.Field("code", type='string', length=3,
required=True, notnull=True,
unique=True),
d
Hi,
I am using sqltable to retrieve content from db. I want to create a
hyperlink on one of the fields. I also want to create a tool tip on
another field. Is there a way to do it thru sqltable?
--~--~-~--~~~---~--~~
You received this message because you are subscr
On Tue, Jun 2, 2009 at 4:48 PM, SergeyPo wrote:
>
> This works for sure in sqlite, mysql and oracle:
>
> db().select(db.tablename.fieldname, distinct=True)
>
> and this is correct approach because I can not imagine biz logic when
> you want to select distinct values AND their ID's etc. fields. Yo
74 matches
Mail list logo