HI Massimo,
Can you tag R-2.18.5?
Thanks!
Il giorno ven 5 lug 2019 alle ore 07:18 黄祥
ha scritto:
>
> already tried define the length on field constructor and change web server
> because error above refer to rocket.py
> ref:
> https://groups.google.com/d/msg/web2py/2B9B9o151II/UyfREFmlBgAJ
>
>
Hi Massimo,
Il giorno lun 6 ago 2018 alle ore 03:12 Massimo Di Pierro
ha scritto:
>
> Hello everybody,
>
> I released pyDAL 18.08 and web2py 2.17.1
Could you release pyDAL also on Pypi?! We use it in buildroot and the
recipe for downloading it and building it refers to pypi.
Thanks!
> They
I Jason,
2015-10-11 9:24 GMT+02:00 Jason (spot) Brower :
> I have been thinking, the admin interface could use some fixin' up.
> If I bought the extended licence to some theme, say...
> https://wrapbootstrap.com/theme/wrapkit-responsive-admin-template-WB09280SN?l=e
> or any
Dear Developers,
I really would like to use multiprocessing python queue in web2py but
I'm asking for an advice. I googled the forum but cannot find an
answer.
I have a worker process (a can bus message processing daemon) that
actually it's a web2py application that shares a database table with
Hi Massimo,
I will look into this. So in the end is definitively possibile to
install web2py core with python distutils and keep the application
outside.
I'll try with having applications in /var/www and serve that with
apache using web2py.
I'll post my results as soon as possible.
Sincerely,
Hi Massimo,
I'm trying to look at it. I have only a question about permission.
Applications should run in a writable folder such as the whole web2py.
I don't think there is an easy way to give writable permissions to
slices of python sitepackage.
I don't think also web2py could be disjointed to
Hello List,
I'm trying to understand how setup.py works. It seems to me that it
doesn't work.
There is no web2py binary in system path or somewhere else.
It's a bug or feature?
Thank you!
Sincerely, Angelo
--
Profile: http://it.linkedin.com/in/compagnucciangelo
--
Resources:
-
Hi Massimo!
2015-04-11 6:09 GMT+02:00 Massimo Di Pierro massimo.dipie...@gmail.com:
All the db operations are on db._timings along with their timings.
You can do {{=response.toolbar()}} to embed a toolbar to see them all. You
can log them to a file yourself
Hello List,
I'm debugging an application not written by me running in production.
I'm looking for a way to log all db operations to file for a certain controller.
I'm not looking for a global logging of all operations, but only on
controllers of interest.
Is there such a nice feature in web2py?
Dear Massimo, Developers,
I'm in the process of proposing a package for inclusion in buildroot.
Buildroot unfortunately doesn't embrace the concept of rolling release
so and I'm wondering for a solution.
The basic idea is that if I download the buildroot release 2015.02 in
a year or two, it
Hi Massimo,
The realease is not tagget in git. Could you tag it?
Thank you!
2015-04-01 0:27 GMT+02:00 Massimo Di Pierro massimo.dipie...@gmail.com:
Also. Thanks to Kathy and Luca for all your GAE tests!
On Tuesday, 31 March 2015 17:26:18 UTC-5, Massimo Di Pierro wrote:
- welcome app
Hi Massimo,
I just downloaded the src zip and this is the error output:
Traceback (most recent call last):
File web2py.py, line 18, in module
import gluon.widget
File /home/angelo/Scaricati/web2py/gluon/__init__.py, line 29, in module
You can also download a complete copy from
Hi Yannick,
Probably it's a regression with hardcron, if you search the list you
can find several thread about that problem.
I had it several times in the past and simply I gave up using hard
cron in web2py. I ususally use the plain and simple unix cron to
schedule activities!
Sincerely, Angelo
Hi Marcio,
I'm planning to grow the supported mobile devices list in web2py, but the
support right now is fairly extensive.
I got the user agent strings here
http://www.useragentstring.com/pages/Mobile%20Browserlist/ and added at
least one of the devices for each family to the unit test of
Hi Rocco!
I think you can open Web2py in Ecplise and lauch it in debug mode.
When you hit the performance penalty, press the pause button and you can
start to debug the design/welcome function!
Angelo
2013/3/15 Massimo Di Pierro massimo.dipie...@gmail.com
Strange. Anybody else seeing this?
The new web2py site is extremely beatiful, clean and professional.
Why make it darker and greener?!
2013/3/15 Massimo Di Pierro massimo.dipie...@gmail.com
Somebody suggested web2py.com should look more like http://nodejs.org/
It would not be difficult to do. Should it be done?
Massimo
--
Please see in Debian the software Douglas Crockford has polluted with that
clause!
http://codesearch.debian.net/search?q=The+Software+shall+be+used+for+Good%2C+not+Evil
Very sad ...
2013/1/30 Bruno Rocha rochacbr...@gmail.com
“The Software shall be used for Good, not Evil.”
I like it! we
Hi guys,
I'm looking for a clean way to make an update on mutiple tables with only
one form and cannot find anything clean/simple searching the mailing list.
Tables could be related (in parent-child relation) or not related at all.
I'm missing something or there is no easy way to do that?
Hi Annet!
This is freaking awesome and it worked like a charm!
I found a way to add automatically variables to form.vars, hope this helps!
record = db(...).select().first()
for table in [db.table1, db.table2]:
for field in table.fields:
form.vars[field] =
To Massimo,
I think this should be in the book after this
http://web2py.com/books/default/chapter/29/07#One-form-for-multiple-tables
Thanks!
2013/1/29 Angelo Compagnucci angelo.compagnu...@gmail.com
Hi Annet!
This is freaking awesome and it worked like a charm!
I found a way to add
Thanks Antony,
I think the previous solution is the most simple and clean way to make
multiple updates on Web2py and worked wonderfully. Anyway, thank you for
your intrest!
2013/1/29 Anthony abasta...@gmail.com
On Tuesday, January 29, 2013 4:40:04 AM UTC-5, AngeloC wrote:
Hi Steve,
Great
Hi Massimo,
I think this is a real problem.
In a web2py shell you can do:
rows = db.executesql(select * from charts)
but you cannot do:
rows = db.executesql(select * from charts; select * from charts;)
it raises the error above.
I think the problem is related to multiple resultsets. That
Thanks Anthoni,
Great idea! That works for sure!
Thanks!
Il giorno 17/gen/2013 19:43, Anthony abasta...@gmail.com ha scritto:
The create action of the grid results in a URL that ends with args
/new/tablename, so you can do:
if request.args and request.args[-2] == 'new':
tablename =
Any news on this?
2013/1/13 Álvaro José Iradier airad...@gmail.com
Hi, I get back to this thread again as I recently got a notification from
the feature request on Sourceforge.I had it nearly forgotten, but I think
it is still interesting and it looks like the author of Pydev is thinking
Hi guys,
I'm trying to insert something into related tables with SQLFORM.grid.
I want the user can see only one form with mixed fields for the various
tables. Tables are related, so I have to insert a record contemporary on
multiple tables. However I want to stick to SQLFORM.grid for the maximum
Hi Massimo,
I think I removed the file from the patches I sent you, but probably I
missed something. That file is absolutely useless right now and all it's
reference could be removed.
Angelo
2012/8/24 Massimo Di Pierro massimo.dipie...@gmail.com
I have upgraded to Bootstrap 2.1.0 thanks to a
Hi guys,
Any advice on howto extend IMG to preprocess url? I simply want to mangle
url before it passed to IMG and this should be done every time an IMG tag
is used.
Thanks!
--
Profile: http://it.linkedin.com/in/compagnucciangelo
--
Wow!
I'll try ASAP, thank you!
2012/8/21 Anthony abasta...@gmail.com
Maybe something like:
class MYIMG(IMG):
def __init__(self, *components, **attributes):
if '_src' in attributes:
attributes['_src'] = mangle(attributes['_src'])
return super(MYIMG,
://code.google.com/**
p/web2py/issues/detail?id=896http://code.google.com/p/web2py/issues/detail?id=896which
I cannot reopen.
Hope this helps!
Angelo
2012/8/10 Angelo Compagnucci angelo.co...@gmail.com
Hi Massimo,
I'm writing it right now to fix ie issues! Please be patient until fixed
cannot reopen.
Hope this helps!
Angelo
2012/8/10 Angelo Compagnucci angelo.compagnu...@gmail.com
Hi Massimo,
I'm writing it right now to fix ie issues! Please be patient until fixed!
2012/8/9 Massimo Di Pierro massimo.dipie...@gmail.com
This may be ok but where do I get bootswatch_ie.css from
Hi Massimo,
I think I cannot complete the bootstrap/web2py css merging in time for 2.0,
it's really a lot of work and I'm a bit busy these days.
Btw, i'm fixing the bug I introduced with issue 896 and I want to share a
thought with you.
Actually, there is no way to maintain a mobile first
Hi Massimo,
I'm writing it right now to fix ie issues! Please be patient until fixed!
2012/8/9 Massimo Di Pierro massimo.dipie...@gmail.com
This may be ok but where do I get bootswatch_ie.css from?
On Thursday, 9 August 2012 11:43:28 UTC-5, AngeloC wrote:
Hi Massimo,
I think I cannot
Kindle and other ebook readers that doesn't support pdf are useless for
viewing technical documents because text is reflowable, always. So blanks
are removed and text is full aligned.
Please don't screw with packtpub, amazon or others, is a common problem
with all reflowable mobile formats.
I
Alan Etkin spame...@gmail.com
Would it be possible to test it with a desktop pc? I visited the demo
and found difficult to appreciate the features. Is image and table
resizing being performed by the plugin?
On 13 ene, 10:51, Angelo Compagnucci angelo.compagnu...@gmail.com
wrote:
Hello list
continued using the demo and could see the resizing
effect. Really impressing. It would be interesting to have a way to
activate/deactivate this feature transparently by default in the
scaffolding application with a simple function call or a Settings
attribute.
On 15 ene, 14:32, Angelo Compagnucci
Hello list,
I want to share with you my new plugin (aiming to web2py inclusion!),
responsivekit, you can find it on github
https://github.com/angeloc/web2py-responsivekit.
Responsivekit implements responsive tables and responsive images using the
best known techniques at the moment (I'm basing
.
This is a patch:
web2py.css
25c25
img { border: 0; }
---
img { border: 0; max-width: 100%; }
2012/1/13 Angelo Compagnucci angelo.compagnu...@gmail.com
Hello list,
I want to share with you my new plugin (aiming to web2py inclusion!),
responsivekit, you can find it on github
https://github.com
I'll try as soon as possible, nice work!
Thanks!
2012/1/13 Mariano Reingart reing...@gmail.com
FYI
I'm working on a enhancement to Pdb, wich could be used from a remote
terminal to any server (and in the near future, with a nice visual
IDE):
There is really such an intrest?
I'm using eclipse+pydev everyday and overcomed the trickery to get code
completion working, it's really good ide. I think there is major need to
provide support for pydev than a closed source ide.
They are a company that sells a software, and if they don't want
I made something with:
http://www.jqplot.com/
Great library, You can feed datas in json, so it's very easy to interface
with a json service in web2py. Unfortunately it has a convoluted
documentation, you'll get some time to be acquainted to.
http://raphaeljs.com/
Exterminated graphic library,
Hi guys,
For a web application, I have to implement a sort of responsive design for
images. There are tons of solution online, but they requires to use some
sort of javascript and custom html to work (insert special tags or classes
in code). I don't like the approch because it make the code
Thanks Bruno,
These not solve my problem! To use thumbor, I have to prepare links using a
special syntax, that is what I want to avoid. If I wanted to change links I
would have done using responsive design tecniques and my own webserver!
@Antony:
I know sencha and it adopts an approch like the
Thanks Anthony,
Ok, this way I have to play anyway with urls. I'll try another approach.
There is a way to rewrite the page after rendering, just before the page
will be sent to the browser?
This way we can analyze img urls, resize images accordingly, and rewrite
the new ones.
What do you tink?
Yes, you are right, the approach is messy.
So the best way could be something like a module. The image URL is passed
as an argument, the module crunch the image and returns the correct URL.
So in code you have to write something like:
IMG(_src=responsive(URL('static','image.img')),_alt='test')
I made some test and successfully packaged web2py!
There is only a caveat, that unfortunately makes useless python-for-android
right now:
If you want to use it without kivy module (an opengl es 2.0 ui toolkit),
then you might want a lighter java bootstrap, that we don't have right now.
Help is
Hi guys,
I made a plugin to render as responsive all web2py tables. It uses a
combination of css media queries and javascript to accomplish the goal. You
can find it on my github:
https://github.com/angeloc/web2py-responsive-tables
It's far from perfect, I'm open to suggestions!
Sincerly,
I'll try as soon as possible!
I've previously used sl4a + python and web2py works flawlessy, but it a bit
difficult to setup, it cannot be done by a newbie like installing an apk!
2012/1/9 Marco Mansilla thebigsho...@gmail.com
El Mon, 9 Jan 2012 00:08:09 -0200
Bruno Rocha
From my understanding, it could be possible to make an apk complete with
python, libraries and web2py.
I'm setting up a dev env!
2012/1/9 Massimo Di Pierro massimo.dipie...@gmail.com
would python-for-android make it possible to create and apk?
On Jan 9, 2:23 am, Angelo Compagnucci
I can suggest you http://code.google.com/p/pts-mini-gpl/wiki/StaticPython
It's a statically compiled version (and runtime) of python, you can drop it
in web2py folder and write a script that starts
./python web2py.py
In this way you have not to fight with rpm packing (I made several
), and
avoid it for web payments (it's not insured at all).
I have no idea if the none free edition of startssl.
On Dec 22, 6:04 pm, Angelo Compagnucci angelo.co...@gmail.com
wrote:
This on is free and it works well
http://www.startssl.com/?app=1
They make simple validation
This on is free and it works well
http://www.startssl.com/?app=1
They make simple validation, the certificate is ready in minutes and the
certificate is a fully featured one!
I use it!
2011/12/22 Massimo Di Pierro massimo.dipie...@gmail.com
Any advice on where to buy a chap ssl certificate?
I bought it!
Wonderful!
2011/12/17 Alan Etkin spame...@gmail.com
I did not understand that point. What did you mean?
Ok, now i get it:
Do not download if other customer has not reported back yet
And the watermark has to be the text in the footer.
--
Profile:
, Angelo Compagnucci angelo.compagnu...@gmail.com
wrote:
Totally insane! I'm astonished!
This could be really useful for a project I'm working on, it's
really
what I'm looking for!
Thank you!
2011/12/10 Massimo Di Pierro massimo.dipie...@gmail.com:
I
Totally insane! I'm astonished!
This could be really useful for a project I'm working on, it's really
what I'm looking for!
Thank you!
2011/12/10 Massimo Di Pierro massimo.dipie...@gmail.com:
I wrote this code which could be used to create a CMS.
The app basically asks for the URL of any
Massimo, I'll hack on this, but first I prefer to give a finishing
touch to mobile admin, there are still som rough edges!
2011/12/10 Massimo Di Pierro massimo.dipie...@gmail.com:
I thought I posted this trying again...
http://web2py.com/examples/static/web2py_manual_4th.cut.pdf
The
If you want to make your web2py application completely portable on
Linux, Mac OS X and FreeBSD you can use StaticPython:
http://code.google.com/p/pts-mini-gpl/wiki/StaticPython
From the homepage:
StaticPython is a statically linked version of the Python 2.x
(currently 2.7.1) and 3.x (currently
These slides are really intresting, an english version sould be a must!
2011/12/5 Alan Etkin spame...@gmail.com:
I think that large python files turn difficult to read (specially if
you are contributing to the code)
Here are some recommendations for big sites/apps (in spanish) by
Martín
Yes it's fixed and the new skin is really slick!
Great Massimo!
2011/12/4 Massimo Di Pierro massimo.dipie...@gmail.com:
I believe this is now fixed. Please check it.
On Dec 3, 5:04 pm, Angelo Compagnucci angelo.compagnu...@gmail.com
wrote:
Yes, I can confirm there is a bug
Yes, I can confirm there is a bug.
With this model:
db.define_table('testdb',Field('test','datetime', requires=IS_DATETIME()))
I have this html using SQLFORM:
[...] input class=string id=testdb_test name=test type=text
value= / [..]
class should be datetime, not string!
2011/12/3 Carlos
There is an error on line 214 of gluon/contrib/user_agent_parser.py,
should be:
dist=['WindowsMobile'], flavor=None
2011/11/30 Bruno Rocha rochacbr...@gmail.com:
I just removed the {{is_mobile=request.user_agent().is_mobile}} from the
*/layout views and admin controller
it worked..
On
the response by myself, i'll send you my patches!
Thank you!
2011/11/28 Massimo Di Pierro massimo.dipie...@gmail.com:
No
On Nov 28, 1:48 am, Angelo Compagnucci angelo.compagnu...@gmail.com
wrote:
Great!
I'll work on it a soon as possible!
Are you using the Auto-initialization of form elements
I almost done the admin mobilization!
I have to get rid of an error on design.html, when done, I'll send you patches!
Thanks!
2011/11/29 Angelo Compagnucci angelo.compagnu...@gmail.com:
I'm astonished,
I'm trying to use admin from my rly old htc g1 with android
and it's totally
Quarite jquari...@gmail.com:
On Tue, Nov 29, 2011 at 6:40 PM, Angelo Compagnucci
angelo.compagnu...@gmail.com wrote:
I almost done the admin mobilization!
I have to get rid of an error on design.html, when done, I'll send you
patches!
Thanks!
Is there a way to see an example? it sounds
Great!
I'll work on it a soon as possible!
Are you using the Auto-initialization of form elements ?
Thanks!
2011/11/28 Massimo Di Pierro massimo.dipie...@gmail.com:
I could use some help. In trunk there is code for mobile admin.
That means that if you visit admin from a mobile device it
It give this error:
Traceback (most recent call last):
File /home/angelo/DEV/web2py-dev/gluon/main.py, line 493, in wsgibase
serve_controller(request, response, session)
File /home/angelo/DEV/web2py-dev/gluon/main.py, line 187, in
serve_controller
environment =
This should be absolutely in web2py!
2011/11/18 Massimo Di Pierro massimo.dipie...@gmail.com:
http://jquerymobile.com/blog/2011/11/16/announcing-jquery-mobile-1-0/
--
Profile: http://www.gild.com/compagnucciangelo
Register on Gild: http://www.gild.com/referral/compagnucciangelo
upgrade plugin_mobile.
Or are you thinking about something else?
I would like to have a version of admin (or perhaps a better wizard)
based on jquery mobile.
On Nov 18, 4:26 am, Angelo Compagnucci angelo.compagnu...@gmail.com
wrote:
This should be absolutely in web2py!
2011/11/18 Massimo Di
It totally rocks!
2011/11/9 David Watson davidthewat...@gmail.com:
Sorry, I found it:
http://groups.google.com/group/web2py-developers/browse_thread/thread/d9c3698044c4902f/8eb26098b55388d3?lnk=gstq=bootstrap#8eb26098b55388d3
On Nov 9, 12:47 pm, David Watson davidthewat...@gmail.com wrote:
Hi Martin,
You are right, but the previous trunk version it worked.
Massimo, could you enlighten us?
Thanks!
2011/9/13 Martin Weissenboeck mweis...@gmail.com:
Hi,
I have tried to test the user_agent_parser. At the top of default.py there
is
from gluon.contrib import user_agent_parser
Hi Martin,
The first time you download the source you can use:
hg clone https://code.google.com/p/web2py/ web2py-dev
Getting the latest version is really a matter of typing:
hg pull -u
into the web2py-dev folder!
2011/9/13 Martin Weissenboeck mweis...@gmail.com:
Ok, I have to wait for the
Yes, it is the method used by the @mobilize decorator!
2011/9/13 Rufus rufusvsm...@gmail.com:
In fact, view reselect might be nicely handled in a decorator
function!
Just decorate those functions that require multiple views (like mobile
versus normal)
It could modify the view name for the
I think that the extension should match the content, it's more clear.
For a json object I'm expecting a .json, an xml should have an xml
extension and so on. So for the mobile view I think the best is to
have a .mobi extension, but this is IMHO.
Also using the .mobile.html could be viable,
code following if
ua.dist.is_mobile...?
Regards, Martin
2011/8/28 Massimo Di Pierro massimo.dipie...@gmail.com
I have no objection.What do others think?
On Aug 28, 10:53 am, Angelo Compagnucci angelo.compagnu...@gmail.com
wrote:
HI Ross, Massimo,
I wrote a small decorator to use
to change every view from .html to
.m.html if is_mobile is true.
Now I am a little bit confused: what would be the best code following if
ua.is_mobile...?
2011/8/29 Angelo Compagnucci angelo.compagnu...@gmail.com
Hi Martin,
In trunk the correct syntax should be:
from gluon.contrib import
HI Ross, Massimo,
I wrote a small decorator to use the newly added is_mobile flag:
class mobilize(object):
def __init__(self, func):
self.func = func
def __call__(self):
from gluon import current
if current.session._user_agent:
if
Hi Ross,
I have explained myself too convoluted!
You are right on is_mobile and polymorphism, I read too
approximatively the code.
You are right also on attch always the is_mobile True/False to the
result object, is more simple to test for true false than that if
exists or not.
I hope it will
I think that some of this should be included in web2py!
Great work!
2011/8/26 Massimo Di Pierro massimo.dipie...@gmail.com:
WOW. fantastic!
massimo
On Aug 26, 11:35 am, kenji4569 hos...@s-cubism.jp wrote:
Hi, I've just published a collection of plugins which I'd created for
some web2py
Hi Ross,
I thought deeply on the implication on using the dist object. There
are many points in favour:
1) Only dist object could be mobile ones from the code, Android -
Iphone - Ipad are all dist objects.
2) If you want to detect Windows Mobile in a near future, you'll
create a new dist object
if self.is_mobile:
result.is_mobile = \
result[self.info_type].is_mobile = self.is_mobile
return True
return False
2011/8/24 Angelo Compagnucci angelo.compagnu...@gmail.com:
Hi Ross,
I thought deeply on the implication on using the dist
Hi list,
I'm using user_agent_parser.py from the latest stable version.
I have this user agent:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
I cannot understand why the code looks for the Opera user agent (I
have not read carefully the code) but it fails with this
like this:
def checkWords(self, agent):
for w in self.skip_if_found:
if w in agent:
return False
if self.look_for in agent:
return True
return False
Whith this fix it works for me!
Bye!
2011/8/23 Angelo Compagnucci
Hi Ross,
I'm looking into your user_agent_parser.py but I cannot find something
like the mobile detector.
I'll explain better. With user_agent_parser.py you can look for
browser version and os version, but there isn't an easy way to dectect
if a browser is mobile or not, or I'm missing
Thank you!
It works like a charm!
I'll keep you informed if I find anything!
Thank you!
2011/8/23 Ross Peoples ross.peop...@gmail.com:
I just submitted a patch for inclusion into the trunk. It includes the
change you mention, and includes a few other fixes, including a fix to the
Hi Ross,
Thank you for the info, it's really a good suggestion.
I'll try to add a variable like is_mobile, becase all informations
about browser and versions are already present in your code.
I think however that the Bruno's approach is really awesome. It's
really simple using the decorator,
from that? If so can you give
me
the user agent string that caused it? I asked for it on the issue, but I
figured you didn't have notifications turned on and never got the
message.
# HG changeset patch
# User Angelo Compagnucci angelo.compagnu...@gmail.com
# Date 1314136920 -7200
# Node ID
in bytes the packet has?
Is MTU/MRU of your server correctly configured for that packet size?
Consider that HTTP headers may well be big enough to break things in a
small packet.
ciao,
mic
2011/8/18 Angelo Compagnucci angelo.compagnu...@gmail.com:
Hi list,
I'm using web2py
/18 Massimo Di Pierro massimo.dipie...@gmail.com:
in trunk we upgraded to the latest rocket is the problem with the
previous or the current version?
On Aug 18, 7:39 am, Angelo Compagnucci angelo.compagnu...@gmail.com
wrote:
Hi Michele,
I think tihis is a rocket problem. The size of the packet
You are absolutely right!
I'm aware of the generic view issue, but I've completely forgotten!
Thank you very much for your help!
2011/8/16 Ross Peoples ross.peop...@gmail.com:
I should probably clarify why this is happening. The line I mentioned
checks to see if the client is running on the
Hello,
To enforce full CRUD permissions on a table, I have to manually add
read, select, create, update, delete permissions to
auth_permission table or there is a way to assign all permission with
a single shot?
In the same way, if I want a user with super admin rights on all the
tables, I have
Thanks Massimo!
2011/7/21 Massimo Di Pierro massimo.dipie...@gmail.com:
it would be much easier to just provide a function row.field.asdate()
or row.field.astime()
How this could be done? Give me an hint and I'll procede by myself!
Thank you!
Sorry for being retarted!
I have this:
db.define_table('test', Field('comment','string'), Field('data','datetime'))
but the function:
def getcommentsbydate():
rows = db(db.test).select(db.test.data.comment, db.test.data.date())
return dict(rows=rows)
throws an exception complaining that
discussed above but this does
def getcommentsbydate():
rows = db(db.test).select(db.test.data.comment, db.test.data)
for row in rows: row.data = row.data.date()
return dict(rows=rows)
On Jul 21, 8:06 am, Angelo Compagnucci angelo.compagnu...@gmail.com
wrote:
Sorry for being
:
You can just call row.data.date() instead of row.data when you need
the value.
On Jul 21, 10:49 am, Angelo Compagnucci angelo.compagnu...@gmail.com
wrote:
Thanks Massimo!
So I must traverse the list at least one time. I dont know how much
time is spent in this operation, but I have a very
Hello list members,
sometimes is useful to exctract the date or the time from a Filed
object without traversing the rows returned by a select statement.
I provide an examlpe:
db.define_table('test',Field('data','datetime'))
def getdates():
rows = db(db.test).select(db.test.data.date())
that dirty hack fails for the MSSQL adapter in 1.97.1:
Well yes, I called it a dirty hack!
I'm looking for a function to extract date and time from a datetime db
side and I think I found one for every database supported by the DAL,
I'm in the process of review my research.
I'm intrugued in the
the need for those
functions.
If you are only working with SQLite then adding date() or time() would
not be hard and they seem like sensible options. Maybe even add them
to other adapters as well.
Is the row.data.date() option enough for you?.
Denes.
On Jul 12, 5:39 pm, Angelo Compagnucci
Ello everybody!
I'm stuck whith a really simple thing, but the simpler are the worst!
I wrote this query:
rows = dbradius(dbradius.radacct.CalledStationId==hsname).select(
count,
dbradius.radacct.AcctStartTime.year(),
.
2011/7/12 DenesL denes1...@yahoo.ca:
Hi Angelo,
it depends on the type of field,
date fields can be accessed directly,
e.g. dbradius.radacct.AcctStartTime
datetime fields need .date():
dbradius.radacct.AcctStartTime.date()
Denes.
On Jul 12, 1:58 pm, Angelo Compagnucci angelo.compagnu
Sorry for being pedantic!
I made an empty application with only a table in the model defined as:
db.define_table('test',Field('data','datetime'))
and inserted some datetimes.
then I made a method in the controller:
def getdata():
rows = db(db.test).select()
return dict(rows=rows)
and
Hi List!
I have a question about cron!
In a controller, I use request.args[int] to get the current argument,
so I have a link in this form application/controller/argument .
Can I call or execute this controller with argument? Or the controlle
could be called without arguments?
Is there a way
1 - 100 of 110 matches
Mail list logo