what about
query = ( db.person.id == db.othertable.id ) xxx
xxx.requires = IS_IN_DB(db(query),'othertable.id',((( all fields of
othertable are accessible, no need for dot ))), xxx )
Ashraf
On Feb 22, 9:42 am, Bruno Rocha rochacbr...@gmail.com wrote:
On Tue, Feb 21, 2012 at 8:22 PM, Richard
Hi Sanjeet,
If Admin and Client are groups you could also do:
{{if auth.has_membership('Admin'):}}
Admin links
{{elif auth.has_membership('Client'}}
Client links
{{pass}}
Regards,
Annet
I have a google app engine application developed using web2py
framework.
I have stored the files in blobstore and I am mailing the link to the
user. Since I need to perform the delete operation every time(delete
all the files from blobstore) and add a new file to the blobstore,
except for the
Hi,
I have been looking for this option in the DAL and came across this
discussion,
however it seems that this is no longer defined in the dal.py I have
(version 1.99.2).
Has this option been dropped again? Is it possible to achieve this behavior
in a different
way? I looked through the book
Thanks Annet
On Wed, Feb 22, 2012 at 2:51 PM, Annet anneve...@googlemail.com wrote:
Hi Sanjeet,
If Admin and Client are groups you could also do:
{{if auth.has_membership('Admin'):}}
Admin links
{{elif auth.has_membership('Client'}}
Client links
{{pass}}
Regards,
Annet
Thanks Massimo.
I can save plain text into xxx.doc as your suggestion.
But I want to save the content of textarea edited by tools such as
wymeditor or tinyeditor. Keep formatted content only, but not
including words such as span as following
span style=font-weight: bold;abc/span using pyrtf.
Thank you!
2012/2/17 Anthony abasta...@gmail.com
chapter 7.2.8 of the books tells how to add extra form elements to SQLFORM.
My question: I want to use a SQLFORM.smartgrid. On adding a new record a
SQLFORM appears. It is possible to add an extra form element to this form?
Concrete: I want
+1
2012/1/30 Alan Etkin spame...@gmail.com
+1
Seriously?? :)
Of course the layout is wrong. IE6 is ancient and probably one of the worst
pieces of software in history. Even Google started campaigns to help people
drop it already.
I don't see any reason someone should still be using IE6 or IE7 these days
and I really don't think web2py
web2py have a Mail class to send emails. It supports attachments.
If you have not, you can check the manual at section 8.2 Sending
emails for detailed examples.
The Mail constructor accepts an attachments argument (a single or
sequence of Mail.Attachment instances). It is possible to pass a file-
How is it wrong? What is the problem? If you need old browser
compatibility, You could change the layout detecting the old browser
with the request data.
On Feb 22, 3:57 am, web2py_lover lia...@gmail.com wrote:
in my IE 6.0, the layout ofhttp://web2py.com/examples/default/index shows ok
but
Is there a specific PHP framework you use? Perhaps someone could offer some
comparisons based on that.
I used CakePHP a lot before starting with web2py and I always compared the
two in the beginning. It's a natural thing to do, I guess.
Maybe the files are being removed before sending the data to the
client?
You could use a background task with the cron (web2py manual 4.18.1)
feature for removing old files after a given time.
On Feb 21, 4:25 pm, james c. james.cryp...@gmail.com wrote:
My application/controller is creating a
Good morning,
This community is very understanding and helpful, I really appreciate the
input from all of you.
In PHP, I really like Kohana. All URL requests are first filtered through
URL mapping settings which can be extended and set in any way necessary.
Then depending on that URL routing,
Thanks Alan,
What do you suggest me to send to the mail attachment as payload -
blob info object or blob reader?
On Feb 22, 4:30 pm, Alan Etkin spame...@gmail.com wrote:
web2py have a Mail class to send emails. It supports attachments.
If you have not, you can check the manual at section 8.2
Hello Anthony, thank you for your answer.
Is it possible to have wildcard URL mappings without specifying the
controller in the url?
Say for instance if I want to have, myurl.com/random1 and
myurl.com/r4nd0m2 to be forwarded to a single controller to perform an
action within that controller,
Hi folks,
I found this python package of web2py for unix/linux installation:
http://pypi.python.org/packages/source/w/web2py/web2py-1.98.2.tar.gz
(source files and bytecode files)
Unpacking it with tar and then do:
python setup.py build
python setup.py install
The setup.py script is doing
Never used blob for this case. I think you can use whatever blob
output which gives you a .read() method for the Attachment class to
parse it without problems.
On Feb 22, 9:02 am, Saurabh S ggtestlo...@gmail.com wrote:
Thanks Alan,
What do you suggest me to send to the mail attachment as
Massimo,
I have done some more technical reading and have a direct question about
web2py's basics.
I would like to ask why does web2py come with it's own wcgi daemon instead
of relying on an apache with embded wcgi?
Thank you.
In PHP, when an HTTP call is made, Apache, using the PHP, interpretes the
PHP file and sends the outcome. But python, an app needs to
be triggered with a specific port. Why is this so? I am not saying PHP is
better. I just want to understand the how python functions,
the fundamentals.
You can do it with URL rewrites but I'd advise against it. It's typically
unnecessary and poor app design.
Web2py sounds similar but you generally skp the mapping part and just name your
controller files and functions according to how you want our urls structured.
It works really well if ou keep our app cleanly designed and avoid the urge to
do dumb things.
There's a little bit of magic getting web
Hello again,
I have been reading further more and I found out that deploying Python
applications with Apache might be a better idea than nginx due to its
non-blocking nature and pythons, natural nature.
Once you set up Apache to work with mod_wsgi, is it enough to upload files
like in a PHP
I see, but why is it poor app design? If you have, let's say, a social
network and you want user profiles to be displayed directly at
mysocialnetwork.com/username, then it would be necessary,
Could you tell why with Python would it be a poor design? I am asking to
learn the essence of the
I'm not sure what you're trying to do but I would strongly advise getting the
source directly by cloning from google code. There's no setup.py step, you just
run it.
The track_changes should work fine. It's hard to tell if you need all th selfs
without seeing mor code. I'm not sure what you are trying to do but I would
rarely suggest doing that in a module. You'll save a lot of brain cells
avoiding modules.
Because in the real world of limited time and limited budgets sometimes
organizations don't have the resources to roll out new browsers when they
want, especially when they rely on vendors whose web products *don't work*
with new browsers. Someone who says 'I don't see a reason' is someone who
On Tuesday, February 21, 2012 10:40:44 PM UTC-5, Brian M wrote:
So if my quick reading of the code is correct this will expose a
directory listing? Am I close? (Some doc strings would be nice ;-) )
Yes -- it starts at the specified base directory and lists all
subdirectories and files,
Is it possible to have wildcard URL mappings without specifying the
controller in the url?
Say for instance if I want to have, myurl.com/random1 and
myurl.com/r4nd0m2 to be forwarded to a single controller to perform an
action within that controller, how can that be done with web2py,
On Wednesday, February 22, 2012 7:46:53 AM UTC-5, JeanM wrote:
I see, but why is it poor app design? If you have, let's say, a social
network and you want user profiles to be displayed directly at
mysocialnetwork.com/username, then it would be necessary
I don't think it would be poor
It's great -- but doesn't work for folders named with a spacebar, such as
'My documents'. Is there an easy fix for this?
PHP allows writing stupid code. Because even if a part of the code starts
performing an infinite root or somthing, the process in the end dies
without affecting other connections or parts of the web-app.
How does this work with Python? What happens if a part of the app, during
I think this was fixed in a later version.
On Feb 21, 9:52 pm, weheh richard_gor...@verizon.net wrote:
I'm trying to detect the browser being used to access my web2py app.
The literature seems to recommend reading request.env.http_user_agent.
But the results are a little confusing, so I'm
Now I understand. I will take your patch. Can you please open a ticket
so it gets tracked?
On Feb 21, 10:36 pm, Carlos carlosgali...@gmail.com wrote:
Hi Massimo,
It does not let me use instance methods as represent because the current
code uses [ f.func_code.co_argcount ] which takes into
I did. I can improve it. The goal was to approximate the time, not be
accurate. How precise does it need to be?
On Feb 21, 11:57 pm, Bruno Rocha rochacbr...@gmail.com wrote:
Hi,
in gluon.tools prettydate function tranform datetimes from date(2012, 01,
01) in to 1 month ago
but this function
Please open a ticket. I will take a patch about this.
On Feb 22, 1:36 am, Christian Foster Howes how...@umich.edu wrote:
yes, bulk_insert changed from needing a dict to needing the ** notation
at some point. are the docs out of sync?
and look at
So, if I understand you want something like this: http://html2rtf.codeplex.com/
On Feb 22, 4:38 am, web2py_lover lia...@gmail.com wrote:
Thanks Massimo.
I can save plain text into xxx.doc as your suggestion.
But I want to save the content of textarea edited by tools such as
wymeditor or
In PHP, I really like Kohana. All URL requests are first filtered through
URL mapping settings which can be extended and set in any way necessary.
Then depending on that URL routing, a controller is triggered either
because it's requested via the URL or because it's set as default.
Very
Please open a ticket. I can change its behaviour with it will require
more security checks.
On Feb 22, 7:57 am, dederocks dediro...@gmail.com wrote:
It's great -- but doesn't work for folders named with a spacebar, such as
'My documents'. Is there an easy fix for this?
I have been reading further more and I found out that deploying Python
applications with Apache might be a better idea than nginx due to its
non-blocking nature and pythons, natural nature.
You don't have to stick with Apache. Nginx + uWSGI is another recommended
configuration:
Note, that $1 above should be on the same line as the
WSGIScriptAliasMatch, right after the last / with no space.
Similarly, the AliasMatch should be a single line. Posting the code
here did an unexpected line wrap.
I think the problem is that the source attribute is set only once, on
document ready, before any values are selected in the multiselect. Instead,
maybe you can update the source attribute when the multiselect changes:
var base = {{=URL('hubaddressbook', 'locality_args_autocomplete')}}
Hi Guys, im new in this group and hope u can help me. First sorry my
english, im from Chile.
Well, i need to show a grid and rescue the values from a row clicking
on it.
First i search a lot of grids for web2py and only find 4 grids, like
jgrid, webgrid, sqlform.grid and sqlform.smartgrid, but
Dear ALL,
How can i use a guid in web2py ??
On Wednesday, February 22, 2012 10:25:49 AM UTC-5, Hassan Alnatour wrote:
Dear ALL,
How can i use a guid in web2py ??
I guess it depends on what you want to do with it. You can generate uuid's
in Python via:
import uuid
myuuid = uuid.uuid4()
Anthony
My post was made in the light of web2py, perhaps it was a bit too vague.
I'm sorry if you still need to support IE6 somewhere. Truly :) Among other
things I contract for our country's government but the departments I have
to deal with have moved away from IE6 a good while ago. I can understand
Agreed. I'm not sure there is a compelling case for ensuring perfect
display of the examples app in IE6. There's no problem creating other
web2py apps that run fine in IE6 (subject to IE6's own limitations). But it
is curious that it looks OK at web2py.com but not when running from source
on
Hello,
User are allow to enter noting when they change their password in
application/user/change_password form, I can also create user without
password in appadmin even if I set requires=is_not_empty() in the
model of auth_user table.
# Here my model definition :
auth_table = db.define_table(
You can also use web2py's more robust UUID-generation method:
from gluon.utils import web2py_uuid
myuuid = web2py_uuid()
Just out of interest what is more robust? I thought a UID was a UID?
On Feb 22, 4:32 pm, Ross ross.peop...@gmail.com wrote:
You can also use web2py's more robust UUID-generation method:
from gluon.utils import web2py_uuid
myuuid = web2py_uuid()
On Wednesday, February 22, 2012 11:36:48 AM UTC-5, simon wrote:
Just out of interest what is more robust? I thought a UID was a UID?
I think web2py_uuid() was created to enable cloning VM's behind a load
balancer without generating duplicates, so perhaps it would be a better way
to go.
Il 22 febbraio 2012 15:17, Massimo Di Pierro
massimo.dipie...@gmail.com ha scritto:
I did. I can improve it. The goal was to approximate the time, not be
accurate. How precise does it need to be?
That is a question for an additional arg:
prettydate(date, precision)
precision in ['year',
By default, CRYPT generates a hashed value even if you submit an empty
string, so if you put IS_NOT_EMPTY after CRYPT, it will pass validation.
However, there's no reason to use IS_NOT_EMPTY because CRYPT itself takes a
min_length argument, which defaults to 0. Note, there is also an Auth
Hello,
first of all I'm a beginner with web2py... I have to realize a room booking
system with web2py for my study.
For now I've created a table called db.bookings this table got the values:
id, user, room, time, date... (the room are from an other table called
db.room)
To allow the user to
Here
http://web2py.com/appliances
you can find some reservation systems: hotel room, restaurant table,
books.
Hope they are useful.
Massimo
On Feb 22, 10:37 am, Christoph Ott jones.mai...@googlemail.com
wrote:
Hello,
first of all I'm a beginner with web2py... I have to realize a room
+1
On Feb 22, 11:19 am, Anthony abasta...@gmail.com wrote:
On Wednesday, February 22, 2012 11:36:48 AM UTC-5, simon wrote:
Just out of interest what is more robust? I thought a UID was a UID?
I think web2py_uuid() was created to enable cloning VM's behind a load
balancer without generating
I see...
Thank you Anthony!
Richard
On Wed, Feb 22, 2012 at 12:32 PM, Anthony abasta...@gmail.com wrote:
By default, CRYPT generates a hashed value even if you submit an empty
string, so if you put IS_NOT_EMPTY after CRYPT, it will pass validation.
However, there's no reason to use
I like the grid a lot, but I think I am missing something. I have 2 fields
called age and age_units. The age_units field is stored as an integer. I
want to be able to show the age as a combination of the two fields
including some processing to convert the int to the proper string unit. I
am
I think no. Please open a ticket about this.
On Feb 22, 12:50 pm, naveed nav...@gmail.com wrote:
I like the grid a lot, but I think I am missing something. I have 2 fields
called age and age_units. The age_units field is stored as an integer. I
want to be able to show the age as a combination
Done. Thanks, Massimo.
In db.py, I created a db 'contacts' with a table 'mytable'. I later
added a field 'date' to mytable.
db.define_table('mytable',
Field('date',requires=IS_NOT_EMPTY()),
Field('name',requires=IS_NOT_EMPTY()),
Field('organization'),
Field('notes','text', requires=IS_NOT_EMPTY())
)
Hi,
I have a simple question in turn. How is it possible to make keyword
search criteria dynamic? For example:
db(Orders.id==id).update(Keyword+n = checked)
where n is any number?
What happens if you set the readable attribute to False -- are you still
able to access the field values for the links parameter?
On Wednesday, February 22, 2012 1:50:18 PM UTC-5, naveed wrote:
I like the grid a lot, but I think I am missing something. I have 2 fields
called age and
I have a simple question in turn. How is it possible to make keyword
search criteria dynamic? For example:
db(Orders.id==id).update(Keyword+n = checked)
where n is any number?
db(Orders.id==id).update(**{'%s%s' % (Keyword, n): checked})
Anthony
Did you turn off migrations via DAL(..., migrate=False) or DAL(...,
migrate_enabled=False)? Is this in a web2py app, or an external script or
shell?
On Wednesday, February 22, 2012 2:16:17 PM UTC-5, davidjensen wrote:
In db.py, I created a db 'contacts' with a table 'mytable'. I later
added
Hi,
Do you not need to specify a type='string' etc ?
Regards,
nils
On Wed, Feb 22, 2012 at 7:35 PM, Anthony abasta...@gmail.com wrote:
Did you turn off migrations via DAL(..., migrate=False) or DAL(...,
migrate_enabled=False)? Is this in a web2py app, or an external script or
shell?
On
Hi,
Do you not need to specify a type='string' etc ?
Regards,
nils
On Wed, Feb 22, 2012 at 7:16 PM, davidjensen davidjensen...@gmail.com wrote:
In db.py, I created a db 'contacts' with a table 'mytable'. I later
added a field 'date' to mytable.
db.define_table('mytable',
On Wednesday, February 22, 2012 2:39:59 PM UTC-5, nils wrote:
Hi,
Do you not need to specify a type='string' etc ?
Good point. If no type is specified, it defaults to 'string', but assuming
the 'date' field is intended to store dates, perhaps he should set the type
to 'date'.
Anthony
i add boto to my install and use it with s3 and sqs quite happily.
by blobstore you mean you are running on GAE using the GAE blobstore
right? checkout this section of the GAE docs:
http://code.google.com/appengine/docs/python/blobstore/overview.html#Writing_Files_to_the_Blobstore
I'm not the OP and I'm not saying web2py should look beautiful in IE6 out
of the box.
I'm just saying there are legitimate reasons for people to be using it and
attacking people coming to this forum seeking help doesn't make the web2py
community look all that helpful...
For seconds and days/weeks it works very well
now, 18 seconds ago, 2 hours ago, 2 days ago, 2 weeks ago...
The problem is when it starts to calculate months, for example: 2012-01-01
becomes one month ago and it is one month and 22 days ago or One and a
half month ago when it passes 15th day.
I
Disclaimer: I'm new to Web2py (2 days and loving it) and re-learning HTML
after many years away from it.
I have a large text field on a form whose input will be a list of items
entered by the user, separated by some sort of delimiter (most likely a
newline). Each valid line item will be
I don't think that .grid has that functionality (not sure however).
You can solve it anyway with the jQuery .click function. You'll need
to customize the grid so each row has a class attribute for to use as
selector.
The .click() function documentation:
http://api.jquery.com/click/
On 22 feb,
I think that defining a Field in the model as list: string give you
that functionality without further configuration (just creating a
common web2py form intance). For using new lines you should use the
TEXTAREA tag (used for text type fields), and split the input string
with the Python built-in
Maybe something like this:
mylist = request.vars.mytextarea.splitlines()
That assumes a newline is the delimiter. If you use a different delimiter,
then use .split(delimiter) instead.
Anthony
On Wednesday, February 22, 2012 3:24:07 PM UTC-5, Larry Wapnitsky wrote:
Disclaimer: I'm new to
That worked! Thanks, Anthony! Perhaps, this should be added to the manual?
Should I close the defect?
I'm using an svg image as a navigation map, with areas that can be clicked.
I've got the interactivity working via an external javascript, but when I
try to call web2py_component() I get an error telling me that
web2py_component is not defined. I assumed that I could call it since this
script
On Wednesday, February 22, 2012 5:16:02 PM UTC-5, naveed wrote:
That worked! Thanks, Anthony! Perhaps, this should be added to the manual?
Should I close the defect?
Maybe leave the issue but add a note. It would still be useful to be able
to more easily distinguish between fields to query
A slightly related question: In the grid, how can I show values from
referenced tables?
I have the table:
db.define_table('table1',
Field('field1'),
Field('usr', db.auth_user))
How can I show the user's first and last names in the grid for table1? The
ignores the usr column altogether,
You're sure that web2py.js has been loaded into the page?
On Wednesday, February 22, 2012 5:18:15 PM UTC-5, monotasker wrote:
I'm using an svg image as a navigation map, with areas that can be
clicked. I've got the interactivity working via an external javascript, but
when I try to call
When I installed plugin_wiki locally it runs just fine. The same
application uploaded to Google App Engine give me Insufficient
privileges when I navigated to the /plugin_wiki/index page. Am I
missing something obvious?
Thanks,
Kurt
Tha's easy to add. The function is in tools.py and is very short. If
you don't send me a patch in 2 days I will add what you ask.
On Feb 22, 2:49 pm, Bruno Rocha rochacbr...@gmail.com wrote:
For seconds and days/weeks it works very well
now, 18 seconds ago, 2 hours ago, 2 days ago, 2 weeks
Which page am I adding the second portion of code to? (web2py newbie here)
So with a little more research I found this page
http://jhb.gtug.co.za/jhbgtug/plugin_wiki/page/appengine which
instructed me to add some records to the db_auth tables.
Unfortunately, GAE did not create the db_auth table. So now I need to
understand why this table did not get created. I am running
I waited 10 minutes and tried again and the table was created. So now
it works. Still I am unsure why it failed the first time I uploaded it
to GAE.
On Feb 22, 6:16 pm, Kurt Fehlhauer kfehl...@gmail.com wrote:
So with a little more research I found this
Maybe try:
top.web2py_component(/paideia/exploring/index.load,page)
or
window.parent.web2py_component(/paideia/exploring/index.load,page)
Anthony
On Wednesday, February 22, 2012 5:18:15 PM UTC-5, monotasker wrote:
I'm using an svg image as a navigation map, with areas that can be
I apologize to you on behalf of the web2py community. I don't think
anybody meant to bash you, only Internet Explorer. You're 100% right
about large companies using ancient browsers. I work for a very large
fortune 500 company, and we are still using IE7 with no sign of an
upgrade in the
Any freely available tutorial/how-to article on this online?
Might be a good idea to add this to the next book under the deployment
recipes?
Thanks.
Osama
On Feb 22, 3:00 pm, howesc how...@umich.edu wrote:
i add boto to my install and use it with s3 and sqs quite happily.
Summary: does rocket serve ogg mime type or do I need to add it in?
Background: I'm trying to get html5 audio to work with Firefox 10.0.2.
Firefox will only read ogg files. I generate the requisite ogg file
but Firefox won't load it properly. When the page refreshes, the audio
player will appear
Yes I m using GAE blobstore. I am sending the blob reader as payload
and a filename. I m getting this error:
'Int' object has no attribute lower.
Can you please suggest what might be the reason behind it?
On Feb 23, 1:03 am, howesc how...@umich.edu wrote:
by blobstore you mean you are running
do you have a full stack trace with that and a code sample? I've never
tried to do this myself, but perhaps i can help debug.
On 2/22/12 22:55 , Saurabh S wrote:
Yes I m using GAE blobstore. I am sending the blob reader as payload
and a filename. I m getting this error:
'Int' object has no
This is my code:
def report_download(result, colnames):
import cStringIO
stream = cStringIO.StringIO()
render_report_csv(stream, result, colnames=colnames)
filename = '%s-%s-%s.csv' % (request.function, request.args(0),
request.now)
#For inserting file to the blobstore
**{'%s%s' % (Keyword, n): checked})
Anthony, can you explain it better? It's something that I would like
to understand very well.
Tnx.
On 22 Feb, 20:33, Anthony abasta...@gmail.com wrote:
I have a simple question in turn. How is it possible to make keyword
search criteria dynamic? For
there is nothing web2py specific about the Boto library, so you can just
read their docs: https://github.com/boto/boto and
http://readthedocs.org/docs/boto/en/latest/
On 2/22/12 20:26 , Osama Khan wrote:
Any freely available tutorial/how-to article on this online?
Might be a good idea to
there is not a stacktrace in the logs? what is the 'int' object that mail
expects to be a string?
96 matches
Mail list logo