I dont have much programming exp in python and web2py.
I am creating a project where you create a a database of say jigsaw
puzzles. Is there any way to preview the image of a uploaded database
field before you would submit and process the input form
I would like the add form, to display the previ
Done. #317.
Thank you!
-Roman
On Mon, Jun 27, 2011 at 5:26 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> One possible solution is reset the pool when one connection from the
> pool is lost. Will look into it. Can you please open a ticket in
> google code?
>
> On Jun 27, 4:23 pm,
Thanks for the quick reply, Anthony!!!
We may try the following : break layout.html into header and footer
(everything before and after ), then instead of using {{extend}} we
will use conditional {{include}} statements at the top and bottom of each
view. That will still give us bytecode co
On Monday, June 27, 2011 7:38:39 PM UTC-4, Anthony wrote:
>
> I don't think you can have conditional extend commands like that (extend
> and include are not Python commands -- they are processed by the template
> engine before the Python is run). You can have conditional include commands,
> but
I don't think you can have conditional extend commands like that (extend and
include are not Python commands -- they are processed by the template engine
before the Python is run). You can have conditional include commands, but
technically all of the included views will be included and then
con
On Monday, June 27, 2011 4:36:29 PM UTC-4, Anthony wrote:
>
> On Monday, June 27, 2011 3:28:18 PM UTC-4, Richard wrote:
>>
>> Also, I just tried to change the compileapp.py with Storage... It stop to
>> send the traceback and I got a : invalid view (ref/create_fvte.load)...
>
>
> Do you have a
Hello!
I need to customize my views so that they look good on a computer screen and
on a smart phone.
One way to do so, It think, is to have separate layout definitions and then
do something like:
{{if session.platform == 'mobile':}}
{{extend 'mobile-layout.html}}
{{else:}}
{{extend 'desktop-l
You can pass a loading image to the load function
On 6/27/11 6:13 PM, Sebastian E. Ovide wrote:
Hi All,
some times a link A will reload a component (via cid=request.cid). In
those situations would be nice to have some kind of "loading" message
displayed.
thanks
--
Sebastian E. Ovide
That's it !
thanks
On Mon, Jun 27, 2011 at 1:16 AM, Pierre Thibault wrote:
> from applications.soso.models.some_module import my_db_helper_here
>
> I'm sorry I forgot the "some_module" in my first example.
>
--
Sebastian E. Ovide
Hi All,
some times a link A will reload a component (via cid=request.cid). In those
situations would be nice to have some kind of "loading" message displayed.
thanks
--
Sebastian E. Ovide
With ajax=False, LOAD doesn't start a whole new request or do anything with
the session, so shouldn't it be possible for non-ajax components to access
and write to the session?
Anthony
On Monday, June 27, 2011 5:37:29 PM UTC-4, Massimo Di Pierro wrote:
> Please use ajax=True for this not ajax
I did it this way because ajax=True was pretty slow and seams to conflict
with jQuery UI Tabs plugin ajax call...
Really not a master of javascript, so I can determine if it is component, my
usage of components, LOAD call, etc.
I will try ajax=True and report back tomorrow...
Richard
On Mon
You got the typo... Good.
Richard
On Mon, Jun 27, 2011 at 5:27 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> fixed. thanks.
>
> On Jun 27, 4:11 pm, pbreit wrote:
> > Bump. wanted to make sure this didn't get lost:
> >
> > Typo in:
> http://code.google.com/p/web2py/source/detail?r
Please use ajax=True for this not ajax=False. because changing the
session within another session is problematic conceptually. I am
surprised this worked before. Anyway, open a ticket and I will look
more into it.
On Jun 27, 4:32 pm, Richard Vézina
wrote:
> My session.tab_pos variable is not upda
My session.tab_pos variable is not updated anymore :-(
Richard
On Mon, Jun 27, 2011 at 5:07 PM, Anthony wrote:
> You could also explicitly set response.view='generic.load' in your
> create_fvte function.
>
> Anthony
>
> On Monday, June 27, 2011 5:00:00 PM UTC-4, Richard wrote:
>
>> I use generi
fixed. thanks.
On Jun 27, 4:11 pm, pbreit wrote:
> Bump. wanted to make sure this didn't get lost:
>
> Typo
> in:http://code.google.com/p/web2py/source/detail?r=04f1d1cb11c193bf813d4...
>
> "Storage" mis-spelled:
>
> *other_request.vars = **Stoarge(**vars**)*
One possible solution is reset the pool when one connection from the
pool is lost. Will look into it. Can you please open a ticket in
google code?
On Jun 27, 4:23 pm, Roman Bataev wrote:
> Informing the users is not a problem in our case because it's our internal
> app that is used by our employe
Informing the users is not a problem in our case because it's our internal
app that is used by our employees during business hours and we reboot the
database server on weekend. The only problem is that without restarting
web2py people get the above error once they start using the app on Monday.
Lo
Bump. wanted to make sure this didn't get lost:
Typo in:
http://code.google.com/p/web2py/source/detail?r=04f1d1cb11c193bf813d427e77c101a0eb90e495
"Storage" mis-spelled:
*other_request.vars = **Stoarge(**vars**)*
You could also explicitly set response.view='generic.load' in your
create_fvte function.
Anthony
On Monday, June 27, 2011 5:00:00 PM UTC-4, Richard wrote:
> I use generic...
>
> I try to make a create_fvte.load view and report back.
>
> Thanks.
>
> Richard
>
> On Mon, Jun 27, 2011 at 4:36 PM
You got it again Anthony!
Does it cause security hole to occure if I just copy and rename the
generic.load under create_fvte.load?
Related thread :
http://groups.google.com/group/web2py-developers/browse_thread/thread/8a5885186144e194
Thanks you...
Richard
On Mon, Jun 27, 2011 at 5:00 PM,
I use generic...
I try to make a create_fvte.load view and report back.
Thanks.
Richard
On Mon, Jun 27, 2011 at 4:36 PM, Anthony wrote:
> On Monday, June 27, 2011 3:28:18 PM UTC-4, Richard wrote:
>>
>> Also, I just tried to change the compileapp.py with Storage... It stop to
>> send the trac
Yes, web2py has lots of neat tricks. Rather than a whole db connection,
the IS_IN_DB validator can also take a DAL Set to limit the records shown --
see http://web2py.com/book/default/chapter/07#Database-Validators.
On Monday, June 27, 2011 4:44:52 PM UTC-4, mweissen wrote:
> Oooops - thank you
Oooops - thank you very much.
I think I could have found the difference between "color" and "colors"
myself :-(
About the solution: it works very well and it is very import for my project.
I have tried to find a solution for several hours and now I have got it in
10 minutes.
web2py is great! Tha
I still need a tutorial on 1) how the .table and sql.log files are used, 2)
what exactly migrate and fake_migrate do and 3) how to best resolve broken
migrations.
Your suggested change is in trunk. I am trusting you one this since I
am not a MSSQL user and cannot test it. If anybody else is using
MSSQL2Adaperter, i.e.
DAL('mssql2://')
please check that this change does not break your code.
On Jun 27, 3:30 pm, E L wrote:
> Hello
>
> Rather than sto
It's just a typo -- db.color.gr and db.color.id should be db.colors.gr and
db.colors.id.
Anthony
On Monday, June 27, 2011 4:35:01 PM UTC-4, mweissen wrote:
> Hi Massimo,
> looks great. But I got:
>
> web2py™ Version 1.97.1 (2011-06-26 19:25:44) Python Python 2.5.4:
> C:\Web2Py\web2py_win\
Hello
Rather than storing strings as UTF8 in VARCHAR, I would like to store
the strings as NVARCHAR in MSSQL.
It appears that is what MSSQL2Adapter is meant to do, but there were
errors when I tried to use it.
I believe a couple changes in the MSSQLAdapater code could make it
work (it seems to wor
On Monday, June 27, 2011 3:28:18 PM UTC-4, Richard wrote:
>
> Also, I just tried to change the compileapp.py with Storage... It stop to
> send the traceback and I got a : invalid view (ref/create_fvte.load)...
Do you have an explicit create_fvte.load view, or are you relying on
generic.load?
Hi Massimo,
looks great. But I got:
web2py™ Version 1.97.1 (2011-06-26 19:25:44) Python Python 2.5.4:
C:\Web2Py\web2py_win\web2py\web2py.exe TRACEBACK
1.
2.
3.
4.
5.
6.
7.
8.
9.
Traceback (most recent call last):
File "gluon/restricted.py", line 192, in restricted
File
"C:/Web2Py/web2p
Note, the 'migrate' and 'fake_migrate' arguments to DAL may not do what you
think they should do -- they merely set the 'migrate' and 'fake_migrate'
default values for any table definitions that do not explicitly set those
arguments -- if a table explicitly sets one or both of those arguments, t
yes
db.person.color.requires=IS_IN_DB(db(db.color.gr=='A'),db.color.id,'%
(color)s')
form=SQLFORM(db.person)
On Jun 27, 3:12 pm, Martin Weissenboeck wrote:
> Hi,
> I need a SQLFORM with a special drop-box with a subset of values.
>
> This is a simplified example, the whole problem is a little bi
Ok,
auth.define_tables( migrate=False )
seems to fix it, but what happens when a future web2py update changes
the auth tables ?
On Jun 27, 3:09 pm, Christopher Baron wrote:
> I've tried
>
> db = DAL("mysql://%s:%s@%s/%s" % (user, password, host, dbname),
> migrate=False)
>
> and still have the
Wait... don't just try this or you messed up more. You first used
'sqlite://...' and it told you "table already exists". Now you need to
fix that before you can change database (you changed to "mysql").
On Jun 27, 3:09 pm, Christopher Baron wrote:
> I've tried
>
> db = DAL("mysql://%s:%s@%s/%s"
Hi,
I need a SQLFORM with a special drop-box with a subset of values.
This is a simplified example, the whole problem is a little bit more
complex: Let's make two tables:
db.define_table('colors',
Field('color'),
Field('gr'), # group
format='%(color)s',
)
db.define_table('person
I've tried
db = DAL("mysql://%s:%s@%s/%s" % (user, password, host, dbname),
migrate=False)
and still have the same problem.
On Jun 27, 3:07 pm, Christopher Baron wrote:
> I upgraded via the admin update link and received an error, so I went
> ahead and downloaded the source.
>
> Regarding the m
Try this:
db = DAL('sqlite://storage.db', migrate=True, fake_migrate=True)
if everything works than your .table files are correct, remove
migrate=True, fake_migrate=True and you should be fine.
On Jun 27, 3:07 pm, Christopher Baron wrote:
> I upgraded via the admin update link and received an e
I upgraded via the admin update link and received an error, so I went
ahead and downloaded the source.
Regarding the migration techniques, the exception is being thrown on
creating web2py auth tables - specifically the following line of
code :
auth.define_tables()
Shouldn't web2py handle this fo
This is perfect timing. I, too, was beginning to implement an
organization_id feature in the app I'm porting from PHP.
Bravo!
Cliff
Have you try :
http://www.web2py.com/book/default/chapter/06?search=migrate#Fixing-Broken-Migrations
http://www.web2py.com/book/default/chapter/06?search=migrate#Migrations
You should use migrate=False in your models once your tables have been
created and you know you will not have to modify them
Did you upgrade by the web2py "admin" update link?
Richard
On Mon, Jun 27, 2011 at 2:22 PM, Christopher Baron
wrote:
> Hi web2py users,
>
> Just upgraded to Version 1.97.1
>
> I checked my code out into the new directory, opened my browser, and
> received and error stating 'auth_cas' already exi
Here CREATION :
{{extend 'layout_form.html'}}
@import
"{{=URL('static','plugin_added/jquery-ui-1.8.9.custom/development-bundle/themes/base/jquery.ui.all.css')}}";
{{=T('folder').capitalize()}}
{{=T('volume').capitalize()}}
{{=T('tome').capitalize()}}
{
Also, I just tried to change the compileapp.py with Storage... It stop to
send the traceback and I got a : invalid view (ref/create_fvte.load)...
Richard
On Mon, Jun 27, 2011 at 3:12 PM, Richard Vézina wrote:
> Hello,
>
> I get this :
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
Hi web2py users,
Just upgraded to Version 1.97.1
I checked my code out into the new directory, opened my browser, and
received and error stating 'auth_cas' already exists.
I removed all files from the databases folder and tried again
receiving an error that 'auth_user' already exists.
I'm using
Can you send me creation.html?
On Jun 27, 2:12 pm, Richard Vézina
wrote:
> Hello,
>
> I get this :
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
>
> Traceback (most recent call last):
> File "/programmation/version_197-1/web2py/gluon/restricted.py", line
> 192, in restricted
Hello,
I get this :
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
Traceback (most recent call last):
File "/programmation/version_197-1/web2py/gluon/restricted.py", line
192, in restricted
exec ccode in environment
File "/version_197-1/web2py/applications/sgddms/views/ref/creation.html",
line 1
Check out Woopra and MixPanel
Typo in the code:
*other_request.vars = **Stoarge(**vars**)*
I get an error when access an amfrpc3 service from flex (works for
1.96.4)
[FaultEvent fault=[RPC Fault faultString="Send failed"
faultCode="Client.Error.MessageSend"
faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed:
HTTP: Status 500: url: 'http://localhost:8000/myapp/gateway/ca
Yes this is because of connection pooling. The fact is, when you
database is down, web2py will return errors because it cannot connect
to your database. While on the one side we could have web2py return
more graceful errors, I think it is better follow the following
strategy:
1) redirect all your
Sounds Great also would like to see it;
Thanks.
David.
On 6/27/11 1:40 PM, Massimo Di Pierro wrote:
No but I am involved in a project and this will be done by mid August,
if not sooner.
On Jun 27, 11:47 am, "ariel.glez.m" wrote:
someone have a example where integrate web2py and celery???
No but I am involved in a project and this will be done by mid August,
if not sooner.
On Jun 27, 11:47 am, "ariel.glez.m" wrote:
> someone have a example where integrate web2py and celery???
I have a similar set up, but do not use connection pooling. When the MSSQL
server is rebooting, any requests by web2py will predictably return an error
about not being able to connect, but when the MSSQL server becomes available
again, web2py starts working again, no restart required. So I suspe
We run web2py with ms sql server as a database backend. Every weekend sql
server gets rebooted (to install microsoft updates), after which web2py apps
start failing with the following error message:
*('08S02', '[08S02] [Microsoft][SQL Server Native Client 10.0]SMux Provider:
Physical connection
someone have a example where integrate web2py and celery???
the url you are using is incomplete... try using URL()
$.post('{{=URL("init.html")}}', function(data){ } )
mic
2011/6/27 Bruce Dickey :
> I've just started using web2py and had an ajax call working, but must
> have done something that broke it. I've been backing out changes but
> have not be
I've just started using web2py and had an ajax call working, but must
have done something that broke it. I've been backing out changes but
have not been able to find what went wrong. The call in my js file is
$.post('init.html', function(data) { ...
and then in /controllers/default.py there is a
If you add a '_next' variable to your login link, the user will be
redirected to the URL in the '_next' variable after login. So, wherever you
are setting your login link, do something like this:
login
If you're using the default auth.navbar() to generate your login link, it's
a little tr
Pystar,
I suggest to use the oauth20_account.py authentication module that
comes included
with web2py. With that you can use any data coming from where you
want, provided that the field "username"
is unique for each user authenticating on the application.
mic
2011/6/26 Pystar :
> Still awaiting
Hello,
I have noticed that virtual fields are painfully slow.
Here is a good way to replace them on a SQL server.
I tested it on both mysql and postgres.
suppose you have the following table:
db.define_table('numbers', Field('a', 'integer'), Field('b', 'integer'))
you can add a virtual field:
Hello,
does anyone has build some site analytics application?
It would be great to have some statistics about user navigation,
traffic measure, etc
Something like piwik (http://piwik.org/)
On Monday, June 27, 2011 9:08:27 AM UTC-4, apple wrote:
>
> request.vars["table"] does not work either.
Hmm, it works for me. Maybe try restarting web2py. Also, make sure you're
using 1.97.1 (or trunk) -- prior to that, vars passed to LOAD were ignored
when ajax=False.
Anthony
Ok, thanks Massimo. I know that unique=True will never work because there's
no way to tell the database about multi-tenancy, I just wanted to make sure
the validators were working properly.
The ticket you refer to is about a problem with unique=True. You
cannot use unique=True with multi-tenant app because the latter is
enforced at the DB level and the DB has no knowledge of multi-tenancy.
I do not believe there is any other problem related with IS_IN_DB and
IS_NOT_IN_DB but perhaps
this is a good idea.
On Jun 27, 6:34 am, Anthony wrote:
> Unless you need to generate CSS dynamically based on the request, I would
> think it would be more efficient to compile the CSS once and serve it from
> 'static' -- that would avoid repetitive computation and allow for browser
> caching, n
Did this ever get resolved? I tried looking for a ticket on this but only
found one related to setting unique=True. I have to convert my app to
support multiple tenants and IS_IN_DB() and IS_NOT_IN_DB() are going to be
used in several places to make sure that a tenant cannot have duplicate rows
request.vars["table"] does not work either.
On Jun 27, 11:36 am, Anthony wrote:
> On Monday, June 27, 2011 6:24:20 AM UTC-4, Anthony wrote:
>
> > Massimo, in compileapp.py, I think you need to change:
>
> > 124. other_request.vars = vars
> > 125. other_request.get_vars = vars
> > to:
>
> > 124. o
I'm building an application that uses the login features provided by
web2py. Users could login at any time so I was hoping for a solution
that would take the person to the last page they were on before they
logged in instead of going to the index page. Any suggestions would
be greatly appreciated
On Monday, June 27, 2011 7:47:43 AM UTC-4, Stodge wrote:
>
> I thought there was a Python tool that did that. I can't remember the
> name offhand.
There are at least a couple, including CleverCSS and CleanCSS.
I probably overuse DropBox using this method. I actually have my code on
DropBox AND have the web2py server using those files running on two
different machines at the same time. I have never had the problem you
describe. The only problem I have is conflicting cron files from the two
machines wr
I thought there was a Python tool that did that. I can't remember the
name offhand.
On Jun 26, 4:16 pm, Jason Brower wrote:
> As nice and easy as it is (I love how easy the language is). Couldn't
> we just do this with python? That way we could just add our css file as
> a dynamic file like the
Unless you need to generate CSS dynamically based on the request, I would
think it would be more efficient to compile the CSS once and serve it from
'static' -- that would avoid repetitive computation and allow for browser
caching, no? It's also more portable that way.
Anthony
On Monday, June
Thanks Kenneth;
I actually did it this way also but I thought there would be a more
elegant way to achieve it.
Although I guess not.
Sometimes since DAL does so much for in simple ways; I thought perhaps
there was a simple way of doing this as well
On 6/27/11 6:54 AM, Kenneth Lundström wr
Wouldn't it be nice to manage the lesscss variables (they look much
like macros) from inside web2py?
That would add just a tiny computational effort on the server.
mic
2011/6/27 Massimo Di Pierro :
> I agree. Moreover when we move stuff like this to the client our apps
> get faster, when we move
> How do I use DAL to query by exact date?
db((db.events.created_on < datetime(date_of_day+1
0.00.00)&(db.events.created_on > datetime(date_of_day 0.00.00)).select()
Or then you need to save even just the date of the event, not datetime
as created_on saves.
I might be totally wrong but this
On Monday, June 27, 2011 6:24:20 AM UTC-4, Anthony wrote:
>
> Massimo, in compileapp.py, I think you need to change:
>
> 124. other_request.vars = vars
> 125. other_request.get_vars = vars
> to:
>
> 124. other_request.vars = Storage(vars)
> 125. other_request.get_vars = Storage(vars)
>
> Other
How do I use DAL to query by exact date?
I tried
db(db.events.created_on == request.now.date).select()
but this returned no rows?
I also tried
db(db.events.created_on.date == request.now.date).select()
but that throws an exception
Thanks.
Massimo, in compileapp.py, I think you need to change:
124. other_request.vars = vars
125. other_request.get_vars = vars
to:
124. other_request.vars = Storage(vars)
125. other_request.get_vars = Storage(vars)
Otherwise, request.vars in a non-ajax component is just a dict instead of a
Storage
Changelog
110627
- you can make the upload and download uuid's writable if you set the
- settings.uuid_writable = True
in the file 0.py
Hi Massimo, 10x for replying so fast!
BTW, I agree with Jason, you ARE awesome! :)
Web2Py is a god-sent...
However, I did't understand some of the options you suggested.
Mainly I need a more accurate definition of them term "your code".
My classifications is three-fold:
1. The web2py-application
2
Just add this to the top of the test function
print(request.vars)
print(request.vars.table)
request.vars prints the storage object as expected. However any
reference to request.vars.table or request.vars["table"] causes
failure.
On Jun 27, 12:22 am, Massimo Di Pierro
wrote:
> I c
81 matches
Mail list logo