On Tue, Jun 2, 2009 at 2:03 PM, mdipierro mdipie...@cs.depaul.edu wrote:
db().select(...,distinct=True)
I think it does what you ask. if you give it a try, please let us
know.
I don't think it does - I have the same problem as jcorbett. As soon
as you include the id in the query,
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. You
normally use select distinct when you need a list of
Hi, web2pyers!
Everyone knows Firebug, the perfect webdeveloper tool. There is also
FirePHP addon for using Firebug facilities for server side debugging/
logging. And recently I found firepy (http://code.google.com/p/
firepy/). It makes available to use FirePHP with Django.
I have added a bit of
On Tue, Jun 2, 2009 at 4:48 PM, SergeyPo ser...@zarealye.com 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
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
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),
On Jun 2, 4:22 am, Mark Larsen larsen...@gmail.com 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
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 mdipie...@cs.depaul.edu wrote:
hmmm... are you upgrading from a previous version? Did you
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
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:
?php
class Usermodel extends Model {
function
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
offray.l...@javeriana.edu.co wrote:
Hi all,
I send a mail this morning:
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
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 box.
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),
...,
You can also try this:
db.Field('sex', requires = IS_IN_SET(
{'male':'Handsome man', 'female':'Pretty woman'}
))
On Jun2, 8:24pm, Mladen Milankovic mml...@gmail.com wrote:
Hi.
You don't need the [] brackets.
use:
db.define_table('user',
db.Field('sex', requires =
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
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,
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
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 += '
db.table.field.represent=lambda value: A(value,_href='somewhere')
On Jun 2, 3:49 am, Samit Pal sami...@gmail.com 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
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 =
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 mariano.m...@gmail.com wrote:
Good
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 weier...@gmail.com wrote:
i know why i meet this question because of chinese word like C:
\Documents and Settings\Administrator\桌面
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
offray.l...@javeriana.edu.co wrote:
Hi all,
I send a mail this morning:
http://groups.google.com/group/web2py/browse_thread/thread/a439333f2d...
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 iceb...@21cn.com wrote:
You can also try this:
db.Field('sex', requires =
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 robert.s.l...@gmail.com wrote:
I am kind of new here, but I thought I might chime in. I am most
likely going to use web2py as
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:
awesome. I will take a look asap.
On Jun 2, 9:04 am, sgtpep danil.m...@gmail.com 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
Thank you!!
On 2 jun, 16:23, SergeyPo ser...@zarealye.com 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
Moreover:
http://www.web2py.com/AlterEgo/default/show/227
On Jun 2, 8:06 am, roblund robert.s.l...@gmail.com 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
2009/6/2 mdipierro mdipie...@cs.depaul.edu
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
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
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 mariano.m...@gmail.com wrote:
2009/6/2 mdipierro
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.
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
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
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:
2009/6/2 mdipierro mdipie...@cs.depaul.edu
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
On Jun2, 11:57pm, mdipierro mdipie...@cs.depaul.edu 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/
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
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')
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
...
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_company():
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',
Thanks this is sufficient. Will fix it tonight.
On Jun 2, 11:21 am, Iceberg iceb...@21cn.com 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
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 mariano.m...@gmail.com wrote:
2009/6/2 mdipierro mdipie...@cs.depaul.edu
Odd.
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 iceb...@21cn.com wrote:
On Jun2, 11:57pm, mdipierro mdipie...@cs.depaul.edu wrote:
http://jquerylist.com/
So many cool stuff! Wow.
And how do you think about this?
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
running from source or binary?
On Jun 2, 1:33 pm, glimmung phil.kil...@gmail.com 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
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
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 danbr...@gmail.com 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
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
Not sure I understand the question. After
if form.accepts(...)
# here you can use form.vars.id
On Jun 2, 3:31 pm, Bill isp...@gmail.com 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
# 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
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 maruadventu...@gmail.com wrote:
# write file out
--#FILE = open(../Helix/applications/Helix/static/
Massimo-
Thanks! That fixed it.
Dan
On Jun 2, 1:21 pm, mdipierro mdipie...@cs.depaul.edu 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 danbr...@gmail.com wrote:
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 from
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).
pside menu/p
dl class=maccordion
dtCreate Prodj:/dt
dd
ul
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
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 ch...@murraypost.net 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
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').
Added the import os.path and that worked like a charm.
Massimo, thanks again.
JohnMc
On Jun 2, 4:36 pm, mdipierro mdipie...@cs.depaul.edu 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
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 yark...@gmail.com wrote:
The README
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
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
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
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 danil.m...@gmail.com wrote:
Source files were
Ok, next version.
On Jun 2, 9:11 pm, Eddie Eyles ho...@heddonsgate.co.uk 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
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 salb...@gmail.com wrote:
Annet,
I found the problem but not the solution
The login form
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
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
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 mdipie...@cs.depaul.edu wrote:
I see you are not using Auth, this means a lot of extra work for you.
Assuming user.id was stored in
thanks guys...its working :)
On Tue, Jun 2, 2009 at 7:59 PM, mdipierro mdipie...@cs.depaul.edu 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'.
73 matches
Mail list logo