On 14 February 2012 00:54, Omi Chiba wrote:
> I have a problem with the performance of CSV import and I assume it
> generate INSERT statement for every record so it will be 8000
> statement if you have 8000 records in csv file.
>
> Can we use bulk_insert method instead so there will be always onl
in the second example the DAL query operator == is taking care of trying to
convert your data to the right type.
http://zerp.ly/rochacbruno
Em 14/02/2012 05:14, "Annet" escreveu:
> I posted a question asking why this doesn't work:
>
> if request.args(0)==1
>
> the answer: request.args returns ea
I posted a question asking why this doesn't work:
if request.args(0)==1
the answer: request.args returns each arg as string
However, in my application I use this multiple times:
rows=db(db.node.id==request.args(0)).select(db.node.ALL)
where id is of type integer and not string. What is the dif
I posted a question asking why this doesn't work:
if request.args(0)==1
the answer: request.args returns each arg as string
However, in my application I use this multiple times:
rows=db(db.node.id==request.args(0)).select(db.node.ALL)
where id is of type integer and not string. What is the dif
All,
Pondering over with Anthony's solution, I just uploaded images to
static folder and that works wonders for image caching.
Below is the code that I changed in db.py for my model -
Field('profile_pic', 'upload', uploadfolder=request.folder
+'static/user_pics', requires=IS_LENGTH(262144
Hi there!
Please help me deal with date representation.
For example, I have a date field:
Field('date_start', 'date', default = datetime.date.today())
db.contracts.date_start.represent = lambda v:v.strftime('%d.%m.
%Y')
It works perfectly if I use SQLFORM.
But if I use just selection fr
Hi ,
import datetime
now = datetime.datetime.now()
#You probably need something like below --
date = now.strftime("%d %b %Y")
Some more cool and excellent Date manipulation and display tactics
at:
http://www.saltycrane.com/blog/2008/06/how-to-get-current-date-and-time-in/
Regards, Rahul D (www
Yes.
As a side note, DABO is written fully in Python itself.
It is a full fledged framework using wxPython for GUI.
But I am using its database-interaction tier & business-logic tier
(dabo.biz & dabo.db).
Since we, web2py followers, are using "web2py" as a footing, you may
ignore the code regardi
Yes.
As a side not, DABO is written fully in Python itself.
It is a full fledged framework using wxPython for GUI.
But I am using its database-interaction tier & business-logic tier
(dabo.biz & dabo.db).
Since we, web2py followers, are using web2py as a footing, you may
ignore the code regarding
Or you can click on "reload routes" in the web2py admin :)
On Feb 14, 12:38 am, Rene Dohmen wrote:
> Got it working with the example from the web2py book:
>
> routers = dict(
> BASE = dict(default_application='formatics'),
> )
>
> Thank you web2py book :)
>
> Maybe a nice reminder for people r
I have an online application deployed on google cloud.
I have used web2py framework to develop the application.
I have 2 tables the auth_user table and tasks table.Both of them have
more than 1000 records each.The tasks table contains person_id field
which stores the id's in auth_user table
I ne
I've worked around this by tackling the issue a different way:
- disable the delete button on the grid altogether with deletable=False
- selectively enable it in edit mode for records that are
safe/appropriate to delete
Maybe I should have done it this way to begin with - as it is nicer if
th
Yes.
As a side not, DABO is written fully in Python itself.
It is a full fledged framework using wxPython for GUI.
But I am using its database-interaction tier & business-logic tier
(dabo.biz & dabo.db).
http://www.dabodev.com
http://www.dabodev.com/documentation
-- Vineet
On Feb 13, 8:16 pm, R
Is this an ajax component? In that case, all the LOAD helper is doing is
setting up the JS code to make an ajax GET request to the component's URL,
so you can't easily pass large amounts of data to the component function.
If you only need the results of the query within the component, you might
.
What, if any, is the proper syntax for passing a db storage object to
a component?
In other words:
# controller
def index():
query=...
return dict(data=db(query).select())
# view
...
{{=LOAD('c1','f1')}}
So where in the LOAD statement can I pass in data as a db Storage or
must it be a d
It worked when I passed a different controller in the url other than
the one it is being called from.
It is production.
I checked the task queue it simply retries continuously if the same
controller is provided.
No params is not a mandatory argument to takqueue.add() I guess.
Because it does not t
Do you have tutorial installation.
Ovidio Marinho Falcao Neto
Web Developer
ovidio...@gmail.com
ovidiomari...@itjp.net.br
ITJP - itjp.net.br
83 8826 9088 - Oi
83 9334 0266 - Claro
>
> At the deployment section of the book now. Earlier I've been running
> web2py with python 2.7 but to run from source I need to install 2.5.
Actually, if you've been running web2py with Python 2.7, then you have been
running the source version of web2py. The version of web2py that comes wit
Deleting the database looks to have fixed it.
On Mon, Feb 13, 2012 at 2:24 PM, Bruce Wade wrote:
> Yeah I don't think that is the issue because it has worked several times
> before, probably a bug in the database I will just rebuild it and try again.
>
>
> On Mon, Feb 13, 2012 at 2:08 PM, Richar
Nice, will there ever be an official web2py on python 3?
On Mon, Feb 13, 2012 at 2:21 PM, Vadim K wrote:
> Nice port, I would say.
>
> I'll give it a try
--
--
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.warplydesigned.com
http://www.fit
I am attempting to implement a check that allows deletes only under some
circumstances. I figured I would do this via the ondelete arg in the
grid. Unfortunately I have run into a few stumbling blocks with this:
1/ The 1.99.4 code is busted - references 'ret' before it is defined
Fortunately a
Nice port, I would say.
I'll give it a try
I will try tomorrow and let you know. I have RPG to return the price
for the given currency (e.g. USD $100 => EUR $76) so it will be a good
sample.
On Feb 13, 4:13 pm, António Ramos wrote:
> Excelent
> How to pass parameters and receive result?
>
> Thank you
> António
>
> 2012/2/13 Omi Chiba
>
I have a problem with the performance of CSV import and I assume it
generate INSERT statement for every record so it will be 8000
statement if you have 8000 records in csv file.
Can we use bulk_insert method instead so there will be always only one
INSERT statement which should reduce the perform
Yeah I don't think that is the issue because it has worked several times
before, probably a bug in the database I will just rebuild it and try again.
On Mon, Feb 13, 2012 at 2:08 PM, Richard Vézina wrote:
> Try db.commit() between your two insert... Maybe web2py is doing only one
> commit at the
Thanks to everyone for answering my questions so far.
At the deployment section of the book now. Earlier I've been running web2py
with python 2.7 but to run from source I need to install 2.5. The python
web site has an msi installer for 2.5 but only source code for 2.5.6.
http://www.python.org
Excelent
How to pass parameters and receive result?
Thank you
António
2012/2/13 Omi Chiba
> Posted on web2py slice.
> http://www.web2pyslices.com/slices/take_slice/151
>
> I'm so excited and it is greater than aha moment for me. We're using
> DB2 for our internal web app and now I can do almost
Try db.commit() between your two insert... Maybe web2py is doing only one
commit at the end of your function, but since you do insert by hand instead
of let the form insert your maybe have to commit...
Richard
On Mon, Feb 13, 2012 at 4:51 PM, Bruce Wade wrote:
> Didn't touch psql. there is 3 re
Didn't touch psql. there is 3 records in that table already, so I was not
sure why it would even default to 1.
Here is the code that processes after the form is accepted. My code didn't
increment anything just standard web2py calls.
if ucashmethod.process(formname='ucash').accepted:
He could reset the sequence for sure, but maybe his code induce the
increment problem.
Richard
On Mon, Feb 13, 2012 at 4:46 PM, Ron McOuat wrote:
> It is like the sequence for that primary key has started over with a reset
> to initial value since the key value that causes the exception is 1. T
It is like the sequence for that primary key has started over with a reset
to initial value since the key value that causes the exception is 1. To do
that I would think you would have to tweak the sequence with psql while
there is data in the table.
Ron
I think a bit more of your code controller would be required to understand
what's going on...
Richard
On Mon, Feb 13, 2012 at 4:29 PM, Bruce Wade wrote:
> Hi,
>
> db.define_table('cash_journal',
> Field('transaction_type'),
> Field('distributor_id', 'integer'),
> Field('happen_time'
Dear ALL,
What is cache and what is memcache ?? i dont understand it ? why we
use it , what happens when we use it !!
>
> CMS is not a self-contained isolated library and except of very simple
> projects, a web application build on top of it will require changes in the
> CMS code.
>
True, but an app might be a mix of directly editing the CMS code plus
writing independent code that merely calls the CSM's API.
Hi,
db.define_table('cash_journal',
Field('transaction_type'),
Field('distributor_id', 'integer'),
Field('happen_time', 'datetime', default=request.now),
Field('happen_amount', 'decimal(10,2)'),
Field('ucash_before', 'decimal(10,2)'),
Field('ucash_after', 'decimal(10,2)'),
I never try it... But since web2py like linux and unix everything is in a
file somewhere, you maybe could try to make use of symbolic links... So you
could have a app (plugin app) that is linked as a plugin in others app
(main app that rely on some plugins).
Really not sure how well it could work.
I'm using a lot of custom plugins to allow re-use of code across several of
my web2py apps. But since the plugins are in a state of constant updating,
it's getting to be a pain to keep them all in sync. I use git for version
control (one repo for each app) and for deployment (on Fluxflex). I've
LGPL is designed for libraries. Static or dynamic linking to LGPL code is
allowed without enforcing copy-left. That means that the derivative work
can even be a proprietary software. However, if you change the library code
itself, you modification has to be released under LGPL. Since version 3
Posted on web2py slice.
http://www.web2pyslices.com/slices/take_slice/151
I'm so excited and it is greater than aha moment for me. We're using
DB2 for our internal web app and now I can do almost anything from
web2py because RPG/CL/Query... will be dynamically executed from
web2py as an part of pr
does this go in model?
On Feb 13, 12:20 am, Michael Toomim wrote:
> Here's an improved way to create indices in the DAL. Works only with
> postgresql and sqlite.
>
> def create_indices(*fields):
> '''
> Creates a set of indices if they do not exist
> Use like:
> create_indices(
Happily using Komodo Edit 6. If web2py is in the pythonpath, you get
autocomplete for it as well as the rest of python. I find it handier
than using any of the dedicated python ide's because you also must
work on html views and css files. It has autocomplete, syntax
checking, and brace matching
I'm researching the nosql and graph database landscape for a web2py
application that will require the schema to evolve over time and
provide network/graph analysis metrics.
I started by looking at the Tinkerpop (http://tinkerpop.com/) stack
and the Bulbflow (http://bulbflow.com/) python library fo
Thanks for the resposnes ;-) (typo intended). My bad.
The problem was with a duplicated block of code. In one case,
session_id is updated. In the other, it isn't. The one where it isn't
was winning. Nothing wrong with web2py (as expected). Sorry for
wasting time ... very much appreciate the feedba
yes I was using the web based shell
On Monday, February 13, 2012 5:40:53 AM UTC-5, Rahul wrote:
>
> Hi All,
>I am using the below statement to serialize images in my view
> -
> {{=TAG.img(_width=25, _height=30, _src=URL(r=request, c='default',
> f='download', args=[adminupdate.profile_pic]))}}
>
Maybe something like:
{{
that caches something into web2py, not into browser.
To cache into browser, probably the most rapid way is to send out expire
headers in the future.
something like this would cache the file into browser for 30 days
You are using the default download function, so if you need this
functionality
I think list comprehensins are reasonable way to populate drop-downs.
You don't need to specify he select fields if you dont want to. Then you'll
just gt back ALL fields.
Naming the db "db" is much easier to read for us.
Are you using the web-based shell in the admin app, or a regular Python
shell? You might try a regular shell, as the web-based shell seems to have
some limitations.
Anthony
On Monday, February 13, 2012 11:13:41 AM UTC-5, Bill Thayer wrote:
>
> No luck there either. Tried twice:
>
> In [2] : pri
You should replace IS_NULL_OR by IS_EMPTY_OR, IS_NULL_OR is depricated if I
remember.
I don't see what could be wrong... But I read recently about "test" that
could be conflicting with web2py some how...
But I guest that you try to implement a home made solution to follow logged
on and logged off
Got it working with the example from the web2py book:
routers = dict(
BASE = dict(default_application='formatics'),
)
Thank you web2py book :)
Maybe a nice reminder for people running with mod_wsgi: you have to
restart the webserver to activate changes in routes.py, and that's why
it didn't w
Shouldn't be he problem but I see at leat one typo: resposne.session_id
Can you try setting session_id to 0?
Why are you doing this?
No luck there either. Tried twice:
In [2] : print db.tables
['auth_user', 'auth_group', 'auth_membership', 'auth_permission',
'auth_event', 'auth_cas', 'image', 'comment']
In [3] : print db.tables
['auth_user', 'auth_group', 'auth_membership', 'auth_permission',
'auth_event', 'auth_cas', 'image
Dear Anthony ,
Thnx it works :)
Hi Ricardo,
Thanks for your reply, changing 1 to "1" solved the problem.
Kind regards,
Annet
On Feb 13, 12:47 pm, Ricardo Pedroso wrote:
> On Mon, Feb 13, 2012 at 10:58 AM, Annet wrote:
> > elif request.args(0)==1:
>
> This one above is always False. Should be at least:
>
> elif request.a
This isn't foolproof, but upon voting, you can send a cookie to the user's
browser. Before allowing a user to vote, check for the cookie, and if it
exists, don't allow the vote. Note, this will only prevent someone from
voting twice from the same machine and browser, assuming they don't delete
Hi Vineet,
Thanks for sharing. So, if I understand correctly, you use DABO code as an
equivalent of the php code in the example from the DTs to allow grid to
interact with database...
I will have a look at PowerTable this week to see if it actually implement
server processing and if not to try to
cache=(cache.ram, delay)
You should consult book with "cache" keyword. Caching is allowed for
certain thing like query.
Richard
On Mon, Feb 13, 2012 at 5:40 AM, Rahul wrote:
> Hi All,
> I am using the below statement to serialize images in my view
> -
> {{=TAG.img(_width=25, _height=30,
Thanks, i will test by the end of the week.
I need this.
Marin
On Sun, Feb 12, 2012 at 10:07 PM, Ross Peoples wrote:
> I have created another plugin for the MarkItUp widget. I know that
> plugin_wiki has this currently, but I wanted a dedicated plugin for this
> for an upcoming project I'm worki
Dear All,
i have a polls application and there is no registration but i want the
user to vote only one time , how can i do that ?
On Mon, Feb 13, 2012 at 10:58 AM, Annet wrote:
> elif request.args(0)==1:
This one above is always False. Should be at least:
elif request.args(0)=="1":
request.args returns each arg as string.
Ricardo
I am working on a network app, in which I use the same controllers and
views for all hubs. To keep them separated all hubs have an id and
every hub function start with test_hub_vars:
def test_hub_vars():
if not len(request.args):
redirect(URL('default','error'))
elif request.args(0
Hi All,
I am using the below statement to serialize images in my view
-
{{=TAG.img(_width=25, _height=30, _src=URL(r=request, c='default',
f='download', args=[adminupdate.profile_pic]))}}
What could I do to make the browser keep the images in cache?
Regards, Rahul D
On Feb 13, 11:13 am,
bump... anybody?
I want to embed web2py forms in a static website (same domain) and keep the
static part as simple as possible.
Currently I have this in the static website:
$("#form").load("path/to/web2py/app");
And this in the web2py app:
def email():
script = """
$("#contact_form").submit(functio
65 matches
Mail list logo