On Thu, 2010-01-07 at 11:54 -0800, mdipierro wrote:
> Any of you behind this?
>
> http://www.startuply.com/Jobs/Web_Py_Web_Developer_1856_1.aspx
>
> if you know more I am curious.
I haven't checked lately, but is there a site for people looking for a
job in web2py on the homepage of web2py? If
Yes, the problem is the one you mention. You need two left joins with
different aliases.
This should do it:
x=db.person.with_alias('x')
y=db.person.with_alias('y')
rows = db(db.likes.id>0).select(x.ALL,y.ALL,
left=[x.on(x.id==db.likes.person),
y.on(y.id==db.likes.endeared)])
f
Perhaps this is a basic DB question: I want to model people who like other
people. So I have a table of people and a table of relationships called
'likes'. The 'likes' table contains two columns: person, and endeared, both
representing people.
The problem comes when I want to join the two tables t
true
On Jan 7, 6:55 pm, weheh wrote:
> I assume I have to write the logic to determine whether uploadfolder
> exists before writing into it, correct?
>
> On Jan 7, 6:04 pm, mdipierro wrote:
>
> > You can have subfolder structure
>
> > Field('file','upload',uploadfolder='')
>
> > any field ca
Under private should not use db.table.field.store and you should not
use dafult/download.
On Jan 7, 6:53 pm, weheh wrote:
> That's cool. I can put things under private. I didn't realize that was
> supposed to be my play area.
>
> If I do put files under private, should I insert the file's filena
These two are nice:
http://www.4dsolutions.net/cgi-bin/py2html.cgi?script=/ocn/python/blowfish.py
http://www.josh-davis.org/files/uploads/2007/06/aes_v001.py
each of them is single file no dependencies. solid algorithms. The AES
if the offical US government standard for encryption. I tend to trus
I assume I have to write the logic to determine whether uploadfolder
exists before writing into it, correct?
On Jan 7, 6:04 pm, mdipierro wrote:
> You can have subfolder structure
>
> Field('file','upload',uploadfolder='')
>
> any field can have its own uploadfolder which can me (but does not
That's cool. I can put things under private. I didn't realize that was
supposed to be my play area.
If I do put files under private, should I insert the file's filename
into a db field of type string or should I use db.table.insert
(fieldname=db.table.fieldname.store(stream,'filename'))?
I know t
Can you recommend an encryption module?
On Jan 6, 6:18 pm, mdipierro wrote:
> Good point. It depends on the encrypt function. I would use one that
> encrypt and then base64 encodes it to avoid problems.
>
> On Jan 6, 7:04 pm,NeonGoby wrote:
>
> > Thanks,
> > I'm interested in encrypted some of th
Yeah, that's MUCH more legible. By the way I'm DONE!!! once I
understood that part doing the rest was just a few minutes work.
Thank you so much for your time and patience. Soon I will have some
time to help with that previous project we had discussed earlier.
Thanks again Massimo!
On Jan 7, 3:4
On a second thought, you could have also done
{{=form.element(_name='verify_email')}}
which is more readable.
On Jan 7, 5:42 pm, mdipierro wrote:
> form is the form
> form[0] is the table
> form[0][-2] is the row (TR) before the last, the one you inserted
> form[0][-2][1] is the second TD of th
form is the form
form[0] is the table
form[0][-2] is the row (TR) before the last, the one you inserted
form[0][-2][1] is the second TD of the TR
form[0][-2][1][0] is the first thing in the TD, the INPUT helper
error messages are appended after INPUT/TEXTAREA helpers
automatically, if any.
On Ja
The problem is this is not well defined. Your computer may have
multiple network cards and multiple IP addresses. When a request
arrives from outside the web server knows which IP is being used but
when a function called by cron, it would not know which IP to pick. In
fact you can cron even if you
Thank Works!!! I 'got my fish' and would also like to learn 'how to
fish' now. :P
But sure seems like a real cryptic non-documented way to do things.
Is there any way to get more details. Just like using form[0] instead
of form. The api docs online don't seem to fill the gaps for me with
what'
is there a way to get the host ip info inside a function that has been
called from a cron script? request.env.http_host doesn't seem to work
(request doesn't make much sense when called from a cron script).
im trying to use xmlrpc communication between two apps, but without
hard coding the URL and
You can have subfolder structure
Field('file','upload',uploadfolder='')
any field can have its own uploadfolder which can me (but does not
need to be) a subfolder of uplaods/
On Jan 7, 4:59 pm, Thadeus Burgess wrote:
> There is an issue with the uploads folder.
>
> Most filesystems will suf
There is an issue with the uploads folder.
Most filesystems will suffer a huge performance penaltiy if there are
> 100 files in a single folder.
So in an app that receives alot of uploads, having these all in one
folder is really really bad for the servers performance (think flickr
type site).
H
There are two subfolders: private and uploads
You should not mess up with uploads. Let SQLFORM put staff there and
download retrieve it. You can manually do it but ONLY if you use
db.table.insert(fieldname=db.table.fieldname.store
(stream,'filename'))
This is very special folder because ther
ERRATA. This will not work. I overlooked the fact you put something
under uploads that is not actually uploaded and does not follow
appropriate naming convention.
You need:
1) your own action in controllers/audio.py
def download_audio():
f=os.path.join(request.folder,'uploads',request.args(0)
Summing you have a download in controller default.py
{{audio_filename='folder1/folder2/audio_filename.mp3'}}
{{url=URL(r=request,c='default',f='download',args=audio_filename)}}
"index". audio.py has
>
> def download():
> return response.download(request,db)
>
> I also tried making a controllers
How about with an which I then
write to a file abc under uploads/folder1/folder2 and want to insert
into the db.doc.filename, which is of type 'upload'?
On Jan 7, 8:54 am, mdipierro wrote:
> If you have an represented as a
> FieldStorage in request.vars.xyz you can do
>
> db.doc.insert(filename
The syntax is correct but the logic escapes me.
On Jan 7, 4:14 pm, Thadeus Burgess wrote:
> So just to check my logic, this is the correct way to DALism the query?
>
> where = (db.orders.customer_id == None)
> lefton = (db.customers.customer_id == db.orders.customer_id)
> members = db(where).sele
You are right. It will never be in form.custom but this could work
{{=form[0][-2][1][0]}}
On Jan 7, 3:39 pm, Delaney wrote:
> That makes a lot of sense, however in the view.
>
> {{=form.custom.label.verify_email}}
> {{=form.custom.widget.verify_email}}
>
> The verify_email is not available fro
This should work:
session.form_vars=dict(form.vars)
have you tried it?
On Jan 7, 2:56 pm, johntynan wrote:
> Thanks Massimo! This works perfectly.
>
> I have one quick follow up question.
>
> When using the following code:
>
> form=SQLFORM(db.table)
> if FORM.accepts(form,request.vars):
>
Sorry, Massimo, no joy.
What is my download controller supposed to look like and what folder
and file is it supposed to be in?
Currently, the view is called from controller "audio" and action
"index". audio.py has
def download():
return response.download(request,db)
I also tried making a cont
So just to check my logic, this is the correct way to DALism the query?
where = (db.orders.customer_id == None)
lefton = (db.customers.customer_id == db.orders.customer_id)
members = db(where).select(db.customers.ALL, left=db.orders.on(lefton))
-Thadeus
On Thu, Jan 7, 2010 at 4:02 PM, Thadeu
Yeah, it's the same for wordpress... (moreover: for each wordpress)
Alex F
El 07/01/2010 23:01, Jon Romero escribió:
> From http://wiki.developers.facebook.com/index.php/Facebook_Connect_Tutorial1
:
"Each Connect website is treated as a Facebook application, and so it
needs an API key. Go to the
This would be a sample query in MYSQL... I just do not know how to
port this to DAL syntax :)
SELECT customers.* FROM customers LEFT JOIN orders ON
customers.customer_id = orders.customer_id WHERE orders.customer_id IS
NULL
-Thadeus
On Thu, Jan 7, 2010 at 3:29 PM, Thadeus Burgess wrote:
>
>From http://wiki.developers.facebook.com/index.php/Facebook_Connect_Tutorial1
:
"Each Connect website is treated as a Facebook application, and so it
needs an API key. Go to the Facebook Developer application and click
Create An Application. Fill in these fields: "
You have to create an applicati
look in db.py
## if no need for session
# session.forget()
Just don't use sessions.
On Thu, Jan 7, 2010 at 2:57 PM, Richard wrote:
> is there a way to disable timeout and have sessions last forever? That
> would be useful for my intranet app where security is not an issue.
>
--
You received
is there a way to disable timeout and have sessions last forever? That
would be useful for my intranet app where security is not an issue.
On Jan 8, 12:40 am, selecta wrote:
> on the thought of huge timeout/no timeout
> is there a implementation of "remember me" out there that I can look
> at, I
That makes a lot of sense, however in the view.
{{=form.custom.label.verify_email}}
{{=form.custom.widget.verify_email}}
The verify_email is not available from form.custom.label or
form.custom.widget... still shows 'None,None'
But I do think this is much closer!
On Jan 7, 11:39 am, mdipierro
Query for records that are in one table but not in another table?
myrecord
---
theid -> FK -> listofstuff
datetitme
listofstuff
---
myid
myname
myvalue
So basically, I want all listofstuff that does not have a record in myrecord
-Thadeus
--
You received this message because you
Thanks Massimo! This works perfectly.
I have one quick follow up question.
When using the following code:
form=SQLFORM(db.table)
if FORM.accepts(form,request.vars):
session.form_vars=form.vars
as you had suggested here:
http://groups.google.com/group/web2py/browse_thread/thread/b3508f4a9b
Any of you behind this?
http://www.startuply.com/Jobs/Web_Py_Web_Developer_1856_1.aspx
if you know more I am curious.
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe f
I get it now. I would do this:
def reg_info():
form = SQLFORM(db.attendees)
form[0].insert(-1,TR('Verify email',INPUT
(_name='verify_email'),''))
def validate_email(form):
if form.vars.email!=form.vars.verify_email:
form.errors.verify_email='email does not match'
Now I understand.
Short answer. It cannot be done in the sense there is no API for it
Long answer. It can be done this way:
### define table post and set the format
### based on a field that does not exist
db.define_table('post',
Field('title',length=256),
Field('body','text',requires=IS
Sorry for the spamming of messages. But on page 213 of the manual it
says... "The same mechanism can be applied to FORM and SQLFORM
objects."
Can I get an example that in the controller that will work with custom
sqlforms? Maybe that's all I really need.
On Jan 7, 10:52 am, Delaney wrote:
> Ho
Honestly doing keeping 'verify_email' in the db is not a big deal to
me. If there is a way to reference other Field values in
db.define_table I'll do it there instead. Just a little lost with the
docs on how to do it.
On Jan 7, 10:49 am, Delaney wrote:
> Sure,http://www.pasteall.org/10201/html4
Sure, http://www.pasteall.org/10201/html4strict
This is the view and the output.
On Jan 7, 10:28 am, mdipierro wrote:
> where do you get '.verify_email'? can you show the complete
> html output?
>
> On Jan 7, 12:22 pm,Delaney wrote:
>
> > The controller is...
> > def reg_info():
> > form = S
where do you get '.verify_email'? can you show the complete
html output?
On Jan 7, 12:22 pm, Delaney wrote:
> The controller is...
> def reg_info():
> form = SQLFORM(db.attendees)
> form.append(
> Field('verify_email','string',
> requires = IS_EXPR('value==%s' % repr
Sure.
db.py:
db.define_table('post',
Field('title',length=256),
Field('body','text',requires=IS_NOT_EMPTY()),
Field('author',db.auth_user),
)
db.define_table('comment',
Field('post',db.post,writable=False,readable=False),
Field('author',db.auth_user,writable=False,readable=Fals
The controller is...
def reg_info():
form = SQLFORM(db.attendees)
form.append(
Field('verify_email','string',
requires = IS_EXPR('value==%s' % repr(request.vars.get
(form.vars.email, None)),
error_message=T('Emails do not
math'
thanks again for the interest. I will send the code directly to you
with a release from my manager. This may take a bit of time... but
since I am personally interested in this project, I will do the
needful.
Cheers
On Jan 7, 8:28 pm, mdipierro wrote:
> Send me what you have done. I am curious.
>
Ah... times such as these when Access really makes you happy...
So I have an email field... unique, and people who think they are
smart have signed up with a lowercase email, and then again with an
uppercase email.
Yes it is my fault for not converting to lowercase before validating.
(well I did
Hi Gergo,
appadmin has nothing to do with t2 and t2 was deprecated long ago.
I guess you can still define db.post.represent but I am not sure what
do you want to do with it. What behavior do you expect? Can you
provide a concrete example?
On Jan 7, 9:31 am, "KONTRA, Gergely" wrote:
> Yes, AFAI
Thank you, for clarification!
On 7 jan., 15:01, mdipierro wrote:
> Yes because get_or_create_user already expects an encrypted password.
> In gluon.tools its is always called as
>
> user = self.get_or_create_user(form.vars)
>
> where form.vars have already passed validation, therefore the passwor
Yes, AFAIK appadmin is a T2 thing.
So, I wonder how can one rewrite the line below using
db.post.represent (still that is more flexible)
db.define_table('post',
Field('title',length=256),
Field('body','text',requires=IS_NOT_EMPTY()),
Field('author',db.auth_user),
format='%(title)s
That is why it would be nice to have workflows like plone. You can
create/edit an item and then when you are done "publish" it. You
would still need to save it to not get a login timeout, but people
would not see it until you were ready.
-wes
On Wed, Jan 6, 2010 at 7:44 PM, Thadeus Burgess wro
They should be there
http://.../yourapp/appadmin
are they not? is it possible you have a auth.define_tables() is
controller and not in a model?
On Jan 7, 9:03 am, jiri wrote:
> Hello,
>
> I am implementing webapp and I want to use "database administration"
> that is already implemented in web2p
Send me what you have done. I am curious.
On Jan 7, 8:26 am, vihang wrote:
> Thanks for the clarification.
>
> If the end users cannot distribute compiled code out of a framework,
> it would defeat the purpose of creating a framework. But web2py did
> gel very well with a framework like Titanium,
Hello,
I am implementing webapp and I want to use "database administration"
that is already implemented in web2py to edit "auth" tables - tables
with information about users. I can't find tables in application admin
section. Is this possible? I can see table names (auth_user, etc) in
sql.log but I
Primary source of help: web2py groups
-
http://groups.google.com/group/web2py/topics
http://groups.google.com/group/web2py-developers/topics
http://groups.google.com/group/web2py-users-brazil/topics
Tips on searching the users group
-
Thanks for the clarification.
If the end users cannot distribute compiled code out of a framework,
it would defeat the purpose of creating a framework. But web2py did
gel very well with a framework like Titanium, could see at ways to
leverage it in future hopefully :-)
Regards
Vihang
On Jan 7, 7
Yes it would violate because you make an executable. It does not
requires a separate web2py installation to run as other web2py
applications.
If you distribute your code separately from web2py and let the users
build their own exec, then you can distribute your code BSD but they
will not be allowe
I am not modifying anything in web2py. Instead the titanium app
'imports web2py' similar to how the py2exe was used to create windows
binary of web2py. Hence this is like a modified web2py exe using
titanium instead of py2exe/py2app. This way, one can create web2py
based apps in titanium. Do you th
Yes because get_or_create_user already expects an encrypted password.
In gluon.tools its is always called as
user = self.get_or_create_user(form.vars)
where form.vars have already passed validation, therefore the password
has already been encrypted.
If you call get_or_create_user yourself in the
If what you build is a web2py application then you can release it
under any license you want. If you have taken out and modified web2py
modules (those in the gluon folder) than your work MUST be released
under GPL2 assuming this is compatible with the titanium license.
On Jan 7, 7:45 am, vihang w
It is not special. It is a folder. It is not a controller action. Here
is what you do:
{{url=URL(r=request,c='download',args=audio_filename)}}
>
> This won't work. Why not? (If I move everything over to the static
> folder and then change 'uploads' to 'static' in the URL statement, it
> does work
If you have an represented as a
FieldStorage in request.vars.xyz you can do
db.doc.insert(filename=db.doc.filename.store
(request.vars.xyz.file,request.vars.xyz.filename))
On Jan 7, 1:37 am, weheh wrote:
> # model
> db.define_table('doc',
> Field('title','string'),
> Field('filename','uploa
Hello!
I've discovered following problem when using auth.get_or_create_user
({"email":"m...@web.net", "password":"longlongtime"}), the password in
database isn't encrypted, but stays plain. But when using form
registration it's encrypted correctly.
Is this right behavior?
--
You received this me
Hello,
I am working on a test app which integrates web2py with titanium, but
there seems to be a bottleneck if I want to release/distribute as open
source. Titanium is APL and web2py is GPL. Or was the info given to be
wrong, as in APL code can call GPL code? I would prefer releasing the
final cod
on the thought of huge timeout/no timeout
is there a implementation of "remember me" out there that I can look
at, I want this feature for my page at some point and if is an
implementation out there it would be nice to share!
just in case, i guess what "remember me" does on most pages is to not
de
Is source is available??
I haven't seen it. Please provide me the link.
No one ever want's to start from scratch (most of the time).
On Jan 7, 12:18 am, Jon Romero wrote:
> I wasn't suggesting using the actual OpenShare. The functionality is
> similar to what you want.
> + You have banners
> + Y
On Wed, 2010-01-06 at 22:58 -0800, weheh wrote:
> I guess the os.path.join(request.folder...) isn't really necessary in
> the above-given example. Just there as part of my testing why this
> wasn't working.
Unless you uploaded it with your web app, I would put it in static.
Regards
--
You receiv
65 matches
Mail list logo