Thank, Paolo! I will take a look at the API.
2017-10-30 19:16 GMT-02:00 Paolo Caruccio :
> If it is feasible for you, you could use *Intl.NumberFormat* (
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/
> Reference/Global_Objects/NumberFormat) javascript
Cross posting my answer in the brazilian list
money string formatting in python2
currency = str('U$$')
value = float(0.02)
formatted_value = '{:,.2f}'.format(value)
print(' '.join([currency, formatted_value]))
cryptocurrency formating (8 decimals)
currency = str('BTC')
value =
If it is feasible for you, you could use *Intl.NumberFormat* (
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat)
javascript Internationalization API.
Il giorno lunedì 30 ottobre 2017 18:59:27 UTC+1, Gualter Portella ha
scritto:
>
> Dear all,
>
> I
On Monday, October 30, 2017 at 11:50:30 AM UTC-7, Anthony wrote:
>
> Perhaps the issue is not knowing how many records there are. Solvable by
doing a count(), but then you're making two queries (to get the count, and
then to get the records).
>>>
>>> If limitby(0, 10) followed
My mistake was that I used db.post.ALL...with your advice, db.post.id I now
get the correct response.
On 30 Oct 2017 9:50 PM, "Anthony" wrote:
> Perhaps the issue is not knowing how many records there are. Solvable by
doing a count(), but then you're making two
>
> Perhaps the issue is not knowing how many records there are. Solvable by
>>> doing a count(), but then you're making two queries (to get the count, and
>>> then to get the records).
>>>
>>
>> If limitby(0, 10) followed by slicing off the last record via [:-1] gets
>> you the records you
I'm not quite sure what you were going for with the original query, as it
is not even valid Python syntax let alone valid DAL code, but if you want
the 2nd through 9th most recent records, you could do:
db(db.post.author == auth.user_id).select(orderby=~db.post.modified_on,
limitby=(1, 10))
On Monday, October 30, 2017 at 10:46:57 AM UTC-7, Leonel Câmara wrote:
>
> Seems to be just a problem with pickle format for the table files you can
> probably solve this by doing a fake migration.
>
When you get past that, you may need to delete any sessions or errors that
you copied over
On Monday, October 30, 2017 at 4:15:04 AM UTC-4, Anatoli Hristov wrote:
>
> Hi Anthony,
>
> I have tried both, the stable and to clone the git.
>
> As I have my own routes, I had to put it in the root folder of web2py, and
> then the problem persist.
>
The traceback you showed suggests a
I had about 10 records. The more records I put in the more it did not work,
i.e pick the last 10. I get the whole db records. I think the
select().count() comes in handy here. Only how to work it out...
On 30 Oct 2017 9:03 PM, "Dave S" wrote:
On Saturday, October 28,
On Saturday, October 28, 2017 at 12:10:19 PM UTC-7, Anthony wrote:
>
> On Friday, October 27, 2017 at 7:37:40 PM UTC-4, Dave S wrote:
>>
>>
>>
>> On Thursday, October 26, 2017 at 7:26:48 AM UTC-7, Anthony wrote:
>>>
>>> There's no need to select the extra record and then drop it via Python.
>>>
Dear all,
I have been trying to reformat the numbers retrieved from the DB into the
format used in my country (Brazil).
I want to change decimals to ',' and thousands to '.'
The thing is that the only solution that I can figure out is in Python 3 -
I am am new to programming and webdev, like
Seems to be just a problem with pickle format for the table files you can
probably solve this by doing a fake migration.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list
Good day,
current environment : python 2.7.6.1 and web2py 2.9.11
updating to : python 2.7.6.1 and web2py 2.15.4
Does the older version of python could be creating the following error :
"Value error : insecure string pickle"
Here is the traceback.
Traceback
Ok that's the problem, I'm using a 2.14.6 release.
Thanks Anthony and others
On 28/10/2017 13:14, Anthony wrote:
That was a bug but should be fixed in web2py 2.15.
If you can't upgrade, as an alternative, see:
https://groups.google.com/d/msg/web2py/JeE6jLP-qjI/MXS0MVdOCQAJ
Anthony
--
Hi Anthony,
I have tried both, the stable and to clone the git.
As I have my own routes, I had to put it in the root folder of web2py, and
then the problem persist.
Do you know if this can be fixed?
Thanks
On Monday, 30 October 2017 02:52:28 UTC+1, Anthony wrote:
>
> By default, the
Book says check_reserved defaults to None but "welcome" app specifies "all":
https://github.com/web2py/web2py/blob/master/applications/welcome/models/db.py#L34
Can I safely switch that to None or ['']?
Doesn't/Couldn't the DAL escape everything so this would not ever be an
issue?
--
17 matches
Mail list logo