Thanks for the current hint.
Kind regards
Cornelius
Am 11.06.2012 01:59, schrieb howesc:
> from gluon.globals import current
>
>
> current has request, response, auth set automatically. you can store
> things in current (it is a Storage object). It has been recommended
> that if you add things t
Hello,
my application is generating pdfs which should be available via the
normal web2py download controller.
I realize, that the file in the uploads/-directory is named like:
pdf
But what is the something? OK, it does not seem to matter, if I set it
to anything, but I'd like to stick to
What do you mean about the webserver config? Where is it in web2py?
On Wednesday, June 6, 2012 11:15:42 PM UTC+8, sebastian wrote:
>
> via your webserver config...
>
> On Wed, Jun 6, 2012 at 8:14 AM, Charles Tang wrote:
>
>> I am using SQLForm to submit a large file and want to limit the upload
I have several applications that use gmail to send invitations and for
authorization. Recently they have both stopped working in the production
environments yet continue to work when running on my development machines.
I have looked at the message boards and tried everything I saw
(ensuring t
Does it make sense if we impose that the in cookie session can be
enabled only on SSL session?
Could we also leverage the browser local store as an option?
mic
2012/6/10 Massimo Di Pierro :
> If you have a high traffic site where the traffic is generated by multiple
> users, you end up with lots
Hey All,
I am really confused - I want to know if I need to pay for using
the below code into my webpage ? This invokes the google translator online.
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
},
Or is there a better way to translate webpages for free may be something
like using - jquery.translate-1.4.7-debug-all.js
Rahul D
On Monday, June 11, 2012 4:17:47 PM UTC+5:30, Rahul wrote:
>
> Hey All,
> I am really confused - I want to know if I need to pay for using
> the below code
http://code.google.com/p/web2py/issues/detail?id=849
Exception in thread Thread-21:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/home/szimszon/fejlesztes/sajat/web2py/gluon/newcron.py", line 227, in
run
pro
Hi Anthony,
thanks for the reply!
I have been looking at the code and there is something I don't really
understand (sorry for a noob question):
when the functions get called, they are called using a pattern:
ret = ...
ret and [f(fields,ret) for f in self._after_insert]
return ret
The question
It's on the console where you start the web2py.py...
2012. június 11., hétfő 14:19:45 UTC+2 időpontban szimszon a következőt
írta:
>
> http://code.google.com/p/web2py/issues/detail?id=849
>
> Exception in thread Thread-21:
> Traceback (most recent call last):
> File "/usr/lib/python2.7/threadin
Hi,
Pls, let me know about the successfully integrate-able dashboards with
web2py.
Thanks,
Ashraf
Dear ALL ,
I am creating an application with is a reference about some city's , so the
website has some city's , every city has some areas and every area has
some other stuff ,it all up to 6 levels , so what is the best was to do
that in the database ?
i am thinking about making every lev
What kind of queries are you planning to run on this data?
Your answer will help us decide whether this is better to have in few
or many tables.
Also of relevance are the normal forms
(http://en.wikipedia.org/wiki/Database_normalization)
On Tue, Jun 12, 2012 at 12:39 AM, Hassan Alnatour
wrote:
I think some simple queries nothing complex , i will just sort every level
by its parent .
this is the proof-of-hack I've done to work with both GWT and Web2py. Works
across Development and Production modes.
To get the Web2py server URL to make requests to the server I use this code
in my GWT client app:
String server_url;
if (GWT.isProdMode()) {
server_url = GWT.getHostPageBaseU
Hi Again,
I tried adding a method using:
def SomeMethod(fields,res):
print "inside SomeMethod"
db.my_table._after_insert.append(SomeMethod)
but nothing seems to happen. Is it possible that the implementation of the
adapters
does not call the methods inside _after_insert, _after_update and
Here's the full code for insert:
def insert(self, **fields):
self._attempt_upload(fields)
if any(f(fields) for f in self._before_insert): return 0
ret = self._db._adapter.insert(self,self._listify(fields))
ret and [f(fields,ret) for f in self._after_insert]
return ret
ret is t
>
> I tried adding a method using:
> def SomeMethod(fields,res):
> print "inside SomeMethod"
>
> db.my_table._after_insert.append(SomeMethod)
>
> but nothing seems to happen. Is it possible that the implementation of the
> adapters
> does not call the methods inside _after_insert, _after_upda
In order to attach the function, I have a function which is being called
through JSON-RPC, and looks like this:
@service.jsonrpc
def append_listeners():
print db.comments._after_insert # prints []
db.comments._after_insert.append(MyFunction)
print db.comments._after_insert # prints []
Is there an easy way how to make the top bar in web2py fixed?
Thanks
It looks like that tool is offered for free:
http://translate.google.com/translate_tools -- but it puts a Google branded
widget on the page. There's also a Google Translate API (
https://developers.google.com/translate/v2/pricing), which you can access
on the server side (via a Python library),
Model (i.e., DAL Table) definitions do not survive across requests --
during a request, you define the table, and then you use the table object
to access the db, etc. In your workflow, you are adding the _after_insert
function in one request (i.e., the RPC request) but doing the insert in a
sep
>
> Does it make sense if we impose that the in cookie session can be
> enabled only on SSL session?
>
I assume the cookie is cryptographically signed so it can't be modified, so
SSL shouldn't be necessary (though could optionally be turned on for
additional protection to keep the contents pr
Please look into the following code:
db = DAL("sqlite://storage.sqlite")
from gluon.tools import *
auth = Auth(db)
auth.define_tables()
crud = Crud(db)
db.define_table('country',
Field('name', unique=True),
format = '%(name)s')
db.define_table('state',
Field('country_id', db.country),
Hi Massimo,
I tried it but it didnt work out.
I tried both fake_migrate=True and migrate=False. But it is not working.
It is now giving eroor as:
invalid table name: auth_user
Detailed stack trace is:
Traceback (most recent call last):
File "C:\src\web2py\gluon\restricted.py", line 205, in r
Hi Massimo,
I have done it but now I get error as :
web2py_session_myappname
where myappname is the name of my application.
I have tried both options migrate=False and fake_migrate=True but it didnt
work out.
I have 2 applications which are accessing same database. When I seee
database tabl
I also get this. It appears after the "cron fix" update to trunk.
On Monday, 11 June 2012 14:23:20 UTC+1, szimszon wrote:
>
> It's on the console where you start the web2py.py...
>
> 2012. június 11., hétfő 14:19:45 UTC+2 időpontban szimszon a következőt
> írta:
>>
>> http://code.google.com/p/web
On Monday, June 11, 2012 5:36:19 AM UTC-4, Charles Tang wrote:
>
> What do you mean about the webserver config? Where is it in web2py?
>
In production you would typically use an external web server, like Apache,
so the configuration would in the external server, not web2py.
Anthony
>
> db.state.namecountryid.requires = IS_NOT_IN_DB(db, db.state.namecountryid)
>
Virtual fields are not for doing inserts/updates and therefore do not take
validators.
Anthony
>
> my application is generating pdfs which should be available via the
> normal web2py download controller.
> I realize, that the file in the uploads/-directory is named like:
>
> pdf
>
> But what is the something?
>
Looks like it's the last 16 (non-hyphen) characters of a uuid:
htt
>
> i was intrested in checking this out but there appears to be no source
> available at the posted url. Is there somewhere i can get a look at this ?
I'm currently working on a websockets project using web2py as a front end
> and this would be a good teaching tool
No, it still doesn't work:
C:\Users\Mariano\Downloads\web2py_win_3\web2py>web2py.exe
Traceback (most recent call last):
File "web2py.py", line 16, in
zipimport.ZipImportError: can't find module 'gluon'
Microsoft.VC90.CRT is also not solved.
If you want, I can look more deeply this when I get
You can achieve the expected result using computed fields.
db.define_table("state", Field("namecountryid"))
db.state.namecountryid.compute = lambda row: str(row.country_id)+row.name
db.state.requires = IS_NOT_IN_DB()
Also, You can use validators for that, but you will need to do some se
Am 11.06.2012 19:19, schrieb Anthony:
>
> my application is generating pdfs which should be available via the
> normal web2py download controller.
> I realize, that the file in the uploads/-directory is named like:
>
>
> pdf
>
> But what is the something?
>
>
> Look
I'm running from source and I don't see the error, but I think I know
what's going on.
Have you something in your applications crontab ?
also, are you on linux, mac or windows ?
Il giorno lunedì 11 giugno 2012 18:49:58 UTC+2, simon ha scritto:
>
> I also get this. It appears after the "cron fix
I'm running it on Linux and I have nothing in cron. I use scheduler and
linux crontab.
2012. június 11., hétfő 20:58:55 UTC+2 időpontban Niphlod a következőt írta:
>
> I'm running from source and I don't see the error, but I think I know
> what's going on.
>
> Have you something in your applicat
>
> hm, so the uuid seems to be there to take into account, that multiple
> files with the same filename might be uploaded. That makes sense,
> exspecially if not all files README.txt have the same content.
>
If the filename is very long, part of it might get cut off depending on the
"length"
uhm, maybe it's the default cron on admin that is giving error.
BTW, I'm getting an annoying pyfpdf window every time I start web2py from
current trunk.
Fix is easy: when cron lines are defined as *applications/etc or
**/applications/etc self.cmd becomes a list already for the intellingent
par
PS: forget about pyfpdf, I was importing the module directly.
If applications share a table, you must decide which app owns the table.
Only that application should ever migrate the table.
Assuming an application called 'foo', this could be accomplished by
something like this in your model file.
should_migrate = False
if request.application=='foo':
shou
Am 11.06.2012 21:26, schrieb Anthony:
>
> hm, so the uuid seems to be there to take into account, that
> multiple files with the same filename might be uploaded. That
> makes sense, exspecially if not all files README.txt have the same
> content.
>
>
> If the filename is very long
Beat me, but I am using the simplest download function
>
> def download():
> return response.download(request,db)
>
> and it works without database entries.
> Well - I got a table defined like this:
>
> db.define_table("t_files",
> #Field('file', 'upload', uploadfield='pictur
Am 11.06.2012 22:20, schrieb Anthony:
>
>
> Beat me, but I am using the simplest download function
>
> def download():
> return response.download(request,db)
>
> and it works without database entries.
> Well - I got a table defined like this:
>
> db.define_table("t_files
2012/6/11 Anthony :
>> Does it make sense if we impose that the in cookie session can be
>> enabled only on SSL session?
>
>
> I assume the cookie is cryptographically signed so it can't be modified, so
> SSL shouldn't be necessary (though could optionally be turned on for
> additional protection
Hey all,
I have enabled the recaptcha system by using:
from gluon.tools import Recaptcha
auth.settings.captcha = Recaptcha(request,
'PUBLIC_KEY', 'PRIVATE_KEY')
as recommended by the web2py book. However, even my reset password
needs a recaptcha. I don't even want it for the login.
I only
check auth.settings
login_captcha = None
register_captcha = None
retrieve_username_captcha = None
retrieve_password_captcha = None
Il giorno lunedì 11 giugno 2012 22:55:31 UTC+2, dundee ha scritto:
>
> Hey all,
>
> I have enabled the recaptcha system by using:
>
> from gluon.tools import Recaptc
>
> > I assume the cookie is cryptographically signed so it can't be modified,
> so
> > SSL shouldn't be necessary (though could optionally be turned on for
> > additional protection to keep the contents private).
> Knowing the application and its state can someone find the key since
> there
Thanks for the reply.
I tried:
auth.settings.login_captcha = None
This did not work for me. Then I tried
auth.settings.login_captcha = False and that did the trick.
Thank you very much.
Regards.
On Mon, Jun 11, 2012 at 4:06 PM, Niphlod wrote:
> check auth.settings
>
> login_captcha = None
On Monday, June 11, 2012 1:31:47 PM UTC-7, mcm wrote:
>
> 2012/6/11 Anthony :
> >> Does it make sense if we impose that the in cookie session can be
> >> enabled only on SSL session?
> >
> >
> > I assume the cookie is cryptographically signed so it can't be modified,
> so
> > SSL shouldn'
Still have this issue. However I am not sure it has anything to do with
the server being blocked by Google. Now when I try in my development
environment the emaisl are failing as well. I have tried using the same
original gmail credentials, as well as a different smtp server
and correspondin
We have an application running under apache2 with 51 tables in
postgres and runs very well on apache, when put to run with the
postgres nginx a request timeout error appears and locks the
web-server. What might be happening? which the configuration to run
web2py + postgresql + nginx?
Ovi
Hello people!
First of all... thank you Massimo and howesc!
About this question that I did and Massimo and howesc answerd on Stack
Overflow.
I tried to put some code there... but I could't...
http://stackoverflow.com/questions/10940995/does-google-app-engine-projection-queries-are-supported-by-
Doing some research I found the docs...
"You cannot project a property that also is referenced in an equality
filter. For example SELECT A FROM kind WHERE A = 1 is not supported, but SELECT
A FROM kind WHERE B = 1 or SELECT A FROM kind WHERE A > 1 is supported."
So I did ...
self.db(self.tabe
Hi Massimo and howesc!
Testing again... I found a problem:
Do not return errors ( but returns no rows... ).
rows = self.db(self.tabela.nome == nome).select(self.tabela.valor,
self.tabela.valor_blob)
Returns the desired rows...
rows = self.db(self.tabela.nome == nome).sel
Hi everybody,
I´m developing my first web2py application with form.custom.widgets and I
want to change at once all validations message of my form to the pt-br.py
definitions (translations).
What I know:
1) I can define my validation messages in db,py, (I don´t want do it)
2) I have languages/
I tried to setup a new application using the latest source code form trunk
and mongodb. I get the error pasted at the end when I try to register a
new user in my app. I tried changing the "from pymongo import son" to
"from bson import son" in the dal.py with no luck. I can import son from
bs
I'm trying to translate the below sql statement into web2py but I'm not
sure how to handle the union. Maybe I'm just not seeing the web2py union
command that would make translating this simple.
Anyone have any suggestions?
select * from drink where drink.drink_key not in (select drink_key from
in
Is tabela.valor_blob a Blob field? The GAE documentation says projections
can only include indexed properties, so no Text or Blob properties -- see
https://developers.google.com/appengine/docs/python/datastore/queries#Query_Projection.
I would think that would result in an error, though.
Antho
Probably going to need a lot more information. Have you used Nginx before?
What does nginx.conf look like? Are you getting any error messages? Nginx
error log? Do you have to kill nginx, uwsgi or web2py to run again?
Works OK for me. Maybe you're blocked?
https://accounts.google.com/b/0/DisplayUnlockCaptcha
Or for Google Apps:
https://www.google.com/a/[your domain].com/UnlockCaptcha
This is best done in JS clientside. something like:
jQuery(function(){
jQuery('#table_field__row').hide();
jQuery('#table_otherfield').change(function(){if(jQuery('#table_otherfield').checked())
jQuery('#table_field__row').show();});
});
On Monday, 11 June 2012 01:08:44 UTC-5, rahulserve
What kind of dashboard?
On Monday, 11 June 2012 09:31:56 UTC-5, Ashraf Mansour wrote:
>
> Hi,
>
> Pls, let me know about the successfully integrate-able dashboards with
> web2py.
>
> Thanks,
>
> Ashraf
>
Contrary to the book, I seem to recall that both migrate and
fake_migrate/fake_migrate_all need to be True for the .table files to get
re-generated. I'm not sure if that's intended or a bug.
On Monday, June 11, 2012 8:04:55 AM UTC-7, vilas patil wrote:
>
> Hi Massimo,
> I have done it but now I
I don't think UNION Is yet supported. Someone suggested:
r1=db((db.document.person==db.person.id) & (db.person.company ==
company_id)).select(db.document.ALL,orderby=db.document.name)
r2=db(db.document.company == company_id).select(orderby=db.document.name)
docs=r1|r2
your
select is:
select * from drink where drink.drink_key not in (
select drink_key from ingredients_alcohol where alcohol_key not in (
select alcohol_key from alcohol where alcohol_type_key in (
select alcohol_type_key from alcohol where alcohol_key in (3, 2, 5)
)
) uni
65 matches
Mail list logo