mdipierro wrote:
the rule is simple. If the app is not compiled no change requires
restarting except changes in files in the modules/ folder. If the app
is compiled you need to click on remove compiled and compiled
again but no restart.
As the OP of this thread, the above is what confused
I have one application (called base) in which I define all the tables
for three other applications. In the three applications I use the same
db.py file. In these db.py files I set migrate=False on all tables.
One of these applications is a CMS, in which I enabled Authorization
and Authentication.
I'm using hg tip and can't add a column to a table. It figures out
what to do, but doesn't alter the postgresql database. Then any
commands that need to use that column fail.
It was able to create the table in the first place, but cannot add a
column now that the table has been created. How
Here's what I propose:
In define_table, at this point:
if migrate:
sql_locker.acquire()
try:
t._create(migrate=migrate, fake_migrate=fake_migrate)
finally:
sql_locker.release()
At the end, it can read the database
I have given my question some more thought. Is it possible to generate
the tables related to authorization and authentication in the base
app, which also contains the other table definitions of my apps. And
then in the cms app just uncomment the following lines of code:
from gluon.tools import *
Depending on what you wanna do a simple noscript[1] on your html
would be enough.
[1]http://www.w3schools.com/TAGS/tag_noscript.asp
On 5 jan, 16:01, Thadeus Burgess thade...@thadeusb.com wrote:
no.
Well... the only way to verify, is if you have an AJAX callback to the
server if you
Should I have each user's session routinely log a timestamp with
userid into a seperate db?
or is auth.event useful for that?
--
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
Hi,
Well, I am developing my blog and in my index page I have the latest
05 posts. This posts can be big and I think that a good idea is
break the content and put a link read more to read the full
content of the post.
To solve this problem I thought of two solutions:
1) Break the post in
To solve this problem I thought of two solutions:
1) Break the post in determined number of the words, but this has a
problem:
- Break the formatation of my index page.
I implemented this to test but as the content field is a field
that accepts html tags if I put a read more
or you could use my improved version
http://groups.google.com/group/web2py/browse_thread/thread/4f9dfc4e9c4b5b27#
btw i did further improvements so you can search tags and have a tag
cloud with links that returns a list of items that were tagged with
this term, this code however is rather project
I have some questions that I have not understood.
In layout.html, I found only one {{include}}.
Is it possible to use more {{include}} in layout.html so that we can
achieve equivalent of the following:
{% block head %}{% endblock %}
{% block content %}{% endblock %}
{% block col3 %}{% endblock %}
Its still just a website, you have to refresh the page to see changes :)
-Thadeus
On Wed, Jan 6, 2010 at 2:57 AM, Werner F. Bruhin werner.bru...@free.fr wrote:
mdipierro wrote:
the rule is simple. If the app is not compiled no change requires
restarting except changes in files in the
Since you are including html in your posts, it is a bit difficult...
I am using markdown for blogitizor, so the html always comes out clean...
snip = 2000 #num characters by default
{{=WIKI(page.content[:snip], extras={
'code-color': {'noclasses': True},
Great Master Thadeus !, perfect ! solved my problem !.
Thank you very much !
-- Leandro.
--
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 from this group, send email to
I want only one application to be hosted on my site and I want to keep
my urls clean. So instead of having url
http://crm.appspot.com/crm/default/list_persons,
I want to have url like http://crm.appspot.com/list_persons. In order
to achieve this behavior, I wrote the routes.py as:
# routes.py
Don't. This would break lots of stuff.
Instead create your own custom download function
def donwload2():
row_id=request.args(0).split('.')[0]
image = db.yourtable[row_id].image
request.args=[image]
return response.download(request,response,db)
On Jan 6, 12:40 am, Mikko
This was never really intended to work but now I see some people are
using it this way and we may need to restore backward compatibility.
It may be possible to do so. Let me try.
On Jan 6, 1:28 am, Neveen Adel nevo.a...@gmail.com wrote:
I am using the following code to generate csv file:
Right now you cannot unless you edit gluon.sql.py and replace InnoDB
with MyISAM. I am not sure about the implications. The new DAL will
make it easier for you to write an adapter.
On Jan 6, 1:35 am, Oguz Yarimtepe oguzyarimt...@gmail.com wrote:
Hi,
How can i make DAL create MyISAM tables
Did you get any operational error at all?
On Jan 6, 3:00 am, Michael Toomim too...@gmail.com wrote:
I'm using hg tip and can't add a column to a table. It figures out
what to do, but doesn't alter the postgresql database. Then any
commands that need to use that column fail.
It was able to
please do. I missed this one. Thadeus is maintaining a list of
plugins.
On Jan 6, 5:50 am, selecta gr...@delarue-berlin.de wrote:
or you could use my improved
versionhttp://groups.google.com/group/web2py/browse_thread/thread/4f9dfc4e9c...
btw i did further improvements so you can search tags
Yes and no. the web2py template language is very different from
Django's because everything inside {{...}} is pure python. This means
there is no concept of blocks but in python you have function calls.
You can do
#based.html
{{def something()}}text goes here{{return}}
{{extend 'layout.html'}}
Two problems with this:
{{if len(post.content) 500:}}
{{=XML(post.content[0:500])}} [ read more ]
{{else:}}
{{=XML(post.content)}}
{{pass}}
1) XML(post.content) is vulenrable to XSS injections. Do XML
(post.content,sanitize=True) instead.
2) XML(post.content[0:500]) may
And do tables have represent?
if I specify a format string in define_table, isn't it a shortcut to
setting the represent attr of the table?
On Wed, Jan 6, 2010 at 01:54, mdipierro mdipie...@cs.depaul.edu wrote:
Sorry. I am not sure I understand the question.
This is not a valid expression:
You are correct and that is the future. It is different for every db.
The new DAL will have hooks to implement it.
Massimo
On Jan 6, 3:14 am, Michael Toomim too...@gmail.com wrote:
Here's what I propose:
In define_table, at this point:
if migrate:
sql_locker.acquire()
I tried something else, in the auth_table definition I set
migrate=False and I made the auth.define_tables() statement a comment:
# auth.define_tables() # creates all needed
tables
I am now able to expose the default/index function and the functions
that do not require
O
MySQLAdapter
-MyISAMAdapter
-InnoDBAdapter
:) I love the new DAL!
-Thadeus
On Wed, Jan 6, 2010 at 9:28 AM, mdipierro mdipie...@cs.depaul.edu wrote:
Right now you cannot unless you edit gluon.sql.py and replace InnoDB
with MyISAM. I am not sure about the implications. The new DAL
I guess thats my queue to post the list when I get the chance :)
-Thadeus
On Wed, Jan 6, 2010 at 9:32 AM, mdipierro mdipie...@cs.depaul.edu wrote:
please do. I missed this one. Thadeus is maintaining a list of
plugins.
On Jan 6, 5:50 am, selecta gr...@delarue-berlin.de wrote:
or you
hmm, well, What I want is to provide user a consistent webpage, even
if they don't have JS support (Progressive enhancement).
Now I use AJAX and those controllers that are used by AJAX functions
don't have a view. So if there is no JS they get displayed as plain
page with only data no styling (It
You can set a represent attribute for a table but that is not used
anywhere in web2py. You would have to call explicitly when you need
it. I think T2 uses table.represent but I forgot.
Massimo
On Jan 6, 10:22 am, KONTRA, Gergely pihent...@gmail.com wrote:
And do tables have represent?
if I
On Jan 5, 11:01 pm, Thadeus Burgess thade...@thadeusb.com wrote:
no.
Well... the only way to verify, is if you have an AJAX callback to the
server if you receive the callback, they have javascript... if you
don't receive one... then they dont.
def receive_if_js():
Nope, I can't.
I unzipped the downloaded file and that's all. It's isn't in the path
(I'm using Mint linux(custom Ubuntu))
But I found a solution though, just copy web2py directory within
google_appengine directory, that's it. ;-)
On Jan 6, 1:33 am, mdipierro mdipie...@cs.depaul.edu wrote:
If
What you describe here would not work. Tables have to be redefined (at
the web2py level) every time you need them. Therefore you must call
auth.define_tables() or, as far as web2py is concerned, they do not
exist. When you define them at the web2py level, if migrate=False,
web2py assumes thay also
Massimo,
Thanks for your reply.
Back to your original problem:
2) You have a custom auth_user in the wrong place in db.py (or with
wrong syntax) and the table gets defined twice. I am pretty sure this
is the case but I cannot point to the error if I do not see the code.
This is the code I
Aha!
this line
auth_table=db.define_table(auth.settings.table_user_name,
should be
auth.settings.table_user=db.define_table
(auth.settings.table_user_name,
On Jan 6, 11:44 am, annet annet.verm...@gmail.com wrote:
Massimo,
Thanks for your reply.
Back to your original problem:
2) You
On Jan 6, 1:50 am, Jon Romero darks...@gmail.com wrote:
You can hack OpenShare (http://openshare.emotionull.com/). It's on
bitbucket, written on web2py, running on GAE.
hi I go through the openshare website.
I have not registered yet, but following is what I get from reading
the content on the
I have a form to create related records with an input type select
element that should display a list of records that are also related to
the parent record. What would be the best approach to populate this
form. I'm trying to stick with SQLFORM since I feel this is not
achievable through CRUD.
In
Massimo,
I had a look at the sql.log file. The tables were created on
2009-12-29. When I exposed the default/index function this morning, at
timestamp: 2010-01-06T09:39:53.092633, I got the ticket mentioned
above. I retried exposing the function: timestamp:
2010-01-06T09:40:47.816061. And when I
So I have my blog... and I'm writing a post, and I walk off and leave
it, come back to post, and of course my session has expired.
What is the best way to keep this session alive? I am thinking an AJAX
call that is set to interval at every minute ?
-Thadeus
--
You received this message because
Massimo,
The line now reads like:
auth.settings.table_user=db.define_table
(auth.settings.table_user_name,
What should the validators read like:
auth_table.bedrijf.requires=[IS_IN_DB(db, db.bedrijf.id, '%
(bedrijfsnaam)s')]
This results in an error.
I got the line of code I used to define
Maybe Firebird deserves a mention for its flexibility. You can do:
select FIRST 3 SKIP 5 * from table
--or use this alternative--
select * from table ROWS 6 TO 8
It's so flexible that you can even use SKIP on its own.
--D
--
You received this message because you are subscribed to the
Massimo,
This does not work.
Especially if you are wanting a default for {{something()}}
It always uses the first definition, because of how views are extended
and included.
So as long as you have the def something(): and {{something()}} in the
same template file, it will work, but going
yes. we support it. We also suport embedded firebird.
On Jan 6, 12:13 pm, villas villa...@gmail.com wrote:
Maybe Firebird deserves a mention for its flexibility. You can do:
select FIRST 3 SKIP 5 * from table
--or use this alternative--
select * from table ROWS 6 TO 8
It's so flexible
(this) being using ajax calls or (this) being keeping the session alive?
-Thadeus
On Wed, Jan 6, 2010 at 1:53 PM, mdipierro mdipie...@cs.depaul.edu wrote:
kpax does this.
On Jan 6, 11:56 am, Thadeus Burgess thade...@thadeusb.com wrote:
So I have my blog... and I'm writing a post, and I
I turned it into a plugin but I am not sure how to get the API key
working.
Can you explain to us what steps are necessary on the facebook
registration site?
Eventually his should be integrated with Auth.
Massimo
--
You received this message because you are subscribed to the Google Groups
ajax calls to keep session alive
On Jan 6, 2:02 pm, Thadeus Burgess thade...@thadeusb.com wrote:
(this) being using ajax calls or (this) being keeping the session alive?
-Thadeus
On Wed, Jan 6, 2010 at 1:53 PM, mdipierro mdipie...@cs.depaul.edu wrote:
kpax does this.
On Jan 6, 11:56 am,
1) XML(post.content) is vulenrable to XSS injections. Do XML
(post.content,sanitize=True) instead.
I'll do it
2) XML(post.content[0:500]) may (and will) truncate some tags. What if
for example post content[0:500]='bla bla ... bla a href=http' it
will mess up your page very badly.
So I should just wait?
On Jan 6, 8:26 am, mdipierro mdipie...@cs.depaul.edu wrote:
You are correct and that is the future. It is different for every db.
The new DAL will have hooks to implement it.
Massimo
On Jan 6, 3:14 am, Michael Toomim too...@gmail.com wrote:
Here's what I propose:
Nope. On step 2, when I run python web2py ..., I get no errors at
all. It updates the .table file and sql.log, does not change the DB,
and gives me no errors.
On Jan 6, 7:30 am, mdipierro mdipie...@cs.depaul.edu wrote:
Did you get any operational error at all?
On Jan 6, 3:00 am, Michael
Thanks for that, but it doesn't seem to work when using
sqlform.custom.label wigdets. Which is how I happen to be doing the
whole form for this application. Is there an alternative?
On Jan 1, 9:21 am, mdipierro mdipie...@cs.depaul.edu wrote:
form=SQLFORM(...)
form[0].insert(position, TR(
how about setting a huge timeout?
On Jan 7, 7:45 am, mdipierro mdipie...@cs.depaul.edu wrote:
ajax calls to keep session alive
On Jan 6, 2:02 pm, Thadeus Burgess thade...@thadeusb.com wrote:
(this) being using ajax calls or (this) being keeping the session alive?
-Thadeus
On Wed,
Hello
I have broke my translation file for second time while 'update all
languages'
Most translation are shifted to up heighbour. And at the and there
are 3-4 steps different: like
# coding: utf8 at the begining all fine
{
'update is an optional expression like field1=\'newvalue\'. You
cannot
Hi
I have the following model:
db.define_table(sites,
SQLField(category_id,db.category),
SQLField(owner,db.auth_user, writable=False, readable=False),
SQLField(url, string,length=2048, notnull=True,
default=None),
SQLField(parent_site, reference sites))
However this
Which web2py version?
On Jan 6, 5:13 pm, KMax mkostri...@gmail.com wrote:
Hello
I have broke my translation file for second time while 'update all
languages'
Most translation are shifted to up heighbour. And at the and there
are 3-4 steps different: like
# coding: utf8 at the begining
I am on :*Version* web2py Version 1.74.5 (2009-12-30 15:44:00)
On Wed, Jan 6, 2010 at 3:33 PM, mdipierro mdipie...@cs.depaul.edu wrote:
which web2py version. this should not happen with 1.74.5.
On Jan 6, 5:28 pm, Miguel goncalvesmig...@gmail.com wrote:
Hi
I have the following model:
All web2py emails include both the list name and (apparently) the message
counter in the subject. As the message counter auto-increments, no subjects
are truly the same and thus my 'k' key in Emacs's VM doesn't kill the entire
subject. Any chance you can get rid of the counter? I can't see that
On Jan 6, 2010, at 2:25 PM, s...@pobox.com wrote:
All web2py emails include both the list name and (apparently) the message
counter in the subject. As the message counter auto-increments, no subjects
are truly the same and thus my 'k' key in Emacs's VM doesn't kill the entire
subject. Any
Jonathan No, I'm just repeating your request.
Ah, good man. It appears the motion has been offered and seconded. There's
no stopping us now... ;-)
Skip
--
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this group, send email to
you found a bug. I just fixed it in trunk.
On Jan 6, 5:37 pm, Miguel Goncalves goncalvesmig...@gmail.com wrote:
I am on :*Version* web2py Version 1.74.5 (2009-12-30 15:44:00)
On Wed, Jan 6, 2010 at 3:33 PM, mdipierro mdipie...@cs.depaul.edu wrote:
which web2py version. this should not happen
I think having the version number as part of the web2py distribution
file will be helpful.
--
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 from this group, send email to
I am a loss here. I need to your help.
Look into gluon/languages.py
There are two functions:
def read_dict(filename): ...
def write_dict(filename, contents): ...
Can you try reproduce the problem and see if read_dict returns the
correct data before it gets messed up and if write_dict gets the
I would like to encrypt form data that will be stored into the
database, not crypting the login password.
I can think of two ways:
1. use dbio=False, or
2. use onvalidation function to
encrypt the form data.
But I'll need to declare the field as a blob in order to store the
resulting binary
This was suggested a number of times. The problem is that it breaks
automatic downloads and future automatic uploads becaue they would
require knowledge of the version. Anyway instead of
http://web2py.com/examples/static/web2py_src.zip
you can access
Are you looking to encrypt all data (including references) or specific
text/string fields). In the latter case you can create a validator to
do it
remember that a validator is a two-way filter (in and out):
class IS_SECURE:
def __init__(self,encryption_key):
self.key=encryption_key
On Jan 5, 2010, at 3:13 PM, Thadeus Burgess wrote:
I think what he really wants is the same thing I have been discussing
for quite a while :)
For now, sqlform.custom is the way to go
http://web2py.com/AlterEgo/default/show/205
A side note: this page (and I suppose others) refer to what I
makes sense. I think I have done it.
On Jan 6, 4:25 pm, s...@pobox.com wrote:
All web2py emails include both the list name and (apparently) the message
counter in the subject. As the message counter auto-increments, no subjects
are truly the same and thus my 'k' key in Emacs's VM doesn't kill
fixed.
On Jan 6, 6:37 pm, Jonathan Lundell jlund...@pobox.com wrote:
On Jan 5, 2010, at 3:13 PM, Thadeus Burgess wrote:
I think what he really wants is the same thing I have been discussing
for quite a while :)
For now, sqlform.custom is the way to go
The new DAL is a priority and we are close to completion (will need
testing). But the first version will just be a rewrite of the current
one. New features will come later. When the new DAL is out we may need
you help to this done.
On Jan 6, 3:43 pm, Michael Toomim too...@gmail.com wrote:
So I
Massimo makes sense. I think I have done it.
Looks like it!
Thanks,
Skip
--
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 from this group, send email to
Thanks,
I'm interested in encrypted some of the fields like names, addresses
etc, not all fields.
So the encrypted text is still a text and no a binary blob?
--
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this group, send email to
Thanks fine,
It's to help me keep track of what version I've downloaded. On my
server, I unzip and rename the web2py to web2py_version, so that I can
keep the prior version in case I encounter problems with the new
version, and I simply create a symbolic link to the desired version.
On Jan 6,
My logs indicate that a web2py soft cron command to execute a Python
file at or after a given interval is achieved by forking off another
Python instance, instead of doing an exec on the contents of the file.
A sample from my standard output logs is below.
This is confirmed from examining
On page 228 of the web2py manual I see the docs pertaining to almost
exactly what I'm trying to do with the title 'Validators with
Dependencies' and see that 'The same mechanism can be applied to FORM
and SQLFORM objects.'
However I don't want 'password_again' in the database. If I try
Just came across this oldie in the Chicago Python User Group archive:
Massimo Dear fellow chicagoans,
Massimo here is a new web site made 100% with python (with Gluon).
Massimo http://www.appealmypropertytaxes.com/
Massimo It can help you save money on property taxes. Mind
Sorry, fork is not the correct OS term, as the new process is not a
copy of the parent process. The new process is just that, a new
process.
John Heenan
On Jan 7, 11:14 am, John Heenan johnmhee...@gmail.com wrote:
My logs indicate that a web2py soft cron command to execute a Python
file at or
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 luke...@earthlink.net wrote:
Thanks,
I'm interested in encrypted some of the fields like names, addresses
etc, not all fields.
So the
Can you post an example of your code?
On Jan 6, 7:22 pm, Delaney delaneygilli...@gmail.com wrote:
On page 228 of the web2py manual I see the docs pertaining to almost
exactly what I'm trying to do with the title 'Validators with
Dependencies' and see that 'The same mechanism can be applied to
The source code also exists here: http://github.com/jonromero/fbconnect-web2py
First of all you have to create a facebook application. The are plenty
of tutorials (even though you just need to change one path). Then you
copy the API and SECRET key.
You must put on facebook app settings - Connect
It is down.
Massimo
On Jan 6, 7:33 pm, s...@pobox.com wrote:
Just came across this oldie in the Chicago Python User Group archive:
Massimo Dear fellow chicagoans,
Massimo here is a new web site made 100% with python (with Gluon).
Massimo
Why I do not have understand if why do I have to create a facebook
application if all I want is to use facebook for authentication. A
facebook application requires a fb canvas (as done in my original fb
example) so that I can be embedded in a facebook page but I do not
necessarily want that. Am I
The lastest version.
On 7 янв, 05:31, mdipierro mdipie...@cs.depaul.edu wrote:
Which web2py version?
I made some patches to sql.py and dal.py ( timestamp-timestamp with
time zone, integer - bigint, serial-bigserial), hardly belielive
this is cause.
Maybe ru locale is the reason? Webserver
I just tried it and it works now.
Thanks Massimo!
-Miguel
On Wed, Jan 6, 2010 at 4:21 PM, mdipierro mdipie...@cs.depaul.edu wrote:
you found a bug. I just fixed it in trunk.
On Jan 6, 5:37 pm, Miguel Goncalves goncalvesmig...@gmail.com wrote:
I am on :*Version* web2py Version 1.74.5
Thanks.
--
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 from this group, send email to
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at
I want to store an audio file in the uploads folder and then have it
played by an embed:
#view
{{url=os.path.join(request.folder,URL
(r=request,c='uploads',f='audio',args=[audio_filename])}}
embed src={{=url}} /
This won't work. Why not? (If I move everything over to the static
folder and then
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.
--
You received this message because you are subscribed to the Google Groups
web2py-users group.
To post to this group, send email to
# model
db.define_table('doc',
Field('title','string'),
Field('filename','upload')
)
#controller
text_form=SQLFORM.factory(Field('text_in','text',db.doc))
file_form=SQLFORM.factory(db.doc)
...
if text_form.accepts(request.vars,formname='text_form'):
#insert data into the doc table
...
if
85 matches
Mail list logo