I knew there are bunch of different approaches to implement what I need,
the one I prefer is to use enabled=False/True but by doing that we are
moving that feature (in my view it belongs to the scheduler) in the
function code. In that case, I have to reinvent the wheel, actually I have
also to
I have the same problem and i came with a workaround that looks ugly but it
works.
I needed a SQLFORM HTML template without exposing a route like
'http://localhost/home/my_custom_form'
I have created a view like views/mycontroller/form_mytable.html without
any controller dependency, since
Ok, i just found that you can add a custom formstyle argument as a function
to a SQLFORM which is perfect to customize forms.
def my_form_html(fields, extra_fields):
return Some kind of html markup
form = SQLFORM(db.mytable, formstyle = my_form_html)
--
Resources:
- http://web2py.com
-
Sorry, I missed the general usecase scenario ... and come on, it's not that
difficult to implement a wrapper with a flags table, even for a general
approach... or an update the first queued task named 'foo' right at the
end of the 'foo' function...it takes maybe 10 lines of code at best.
Whoops I was looking at sqlite because I thought the database was
corrupted seems instead that you have troubles with pickle files (the
.table ones) do you have all migrations turned off in production,
right ?
On Friday, May 2, 2014 11:31:34 PM UTC+2, peter wrote:
version is
what does {{=stats}} show ?
On Friday, May 2, 2014 9:46:26 PM UTC+2, pete...@gmail.com wrote:
Hey guys,
I want to display some aggregated stats (items per year) with a sqltable,
but the aggregate count column never shows up in the sqltable.
Basically only the groupby column is shown.
request.vars is like a dict. Surely you're hitting that issue :-P
test = dict(a=1,b=2)
for k,v in test:
...print k, v
...
Traceback (most recent call last):
File stdin, line 1, in module
ValueError: need more than 1 value to unpack
Add an iteritems() and you're good to go
for k,v in
Well...
- It happens when the app is in production.
- It magically happens SOME(random)TIMES simply by opening the page and
hitting F5.
- It doesn't happen when I'm testing it in my development virtualbox vm.
- Nope, I'm not using reserved keywords, I prefer using im my native
language.
I
I thought that leaving migrations on only affected performance? How can it
cause corruptions?
i.e you are right I have left them on.
Thanks
Peter
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
OK so I've been reading/researching and I'm still trying to wrap my head
around how the above code works,
First let me define what I *think* is going on,
The script imports socket.io modules needed and the imports web2py's
wsgibase...
SocketIOServer (('0.0.0.0', 8080), wsgibase,
well, they shouldn't but that's a VPS you're on who knows what kind of
kinky storage is running under it... web2py raises that error if it can't
un-pickle .table files...so it's not properly a web2py issue, more of a
problem with that file being somewhat tampered with. web2py writes to the
the redis backend usues the same logic as session files, so a bug in
the code would show anyway...
to make a grid A go to page # means that you left another grid B at page #
if you're using defaults without specifying the formname argument. I don't
think there's another hole that makes grids
On Sat, May 3, 2014 at 7:21 PM, Jesse Ferguson ifl...@gmail.com wrote:
OK so I've been reading/researching and I'm still trying to wrap my head
around how the above code works,
First let me define what I *think* is going on,
The script imports socket.io modules needed and the imports
How can I set the width of the dropdown menu for an input? The thing is
way too long because its trying to be longer than the textsorry, I know
its dumb, but I cant find anything
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Thanks for your help on this Niphlod
Peter
From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of
Niphlod
Sent: 03 May 2014 19:49
To: web2py@googlegroups.com
Subject: [web2py] Re: items in databases folder getting corrupted
well, they shouldn't but that's a VPS
Hi,
I have this code
auth.settings.extra_fields['auth_user']= [
Field('nickname', 'string', length=20, required=True, writable=False),
Field('image', 'upload'),
Field('thumb', 'upload', writable=True, readable=False, compute = lambda row
: SMARTHUMB(row.image, (50,50) )),
Field('point',
Than you VERY much for the info. I managed to get your videos on Vimeo.com
and have learned a lot . I am still new in python and this is a good start.
About table/filed...
With this app, its a single table with several fields of CHAR type, fields
are numbered e.g from 1 to 25, e.g wit this app,
Hi guys,
I am searching for a web-framework for my website, and are currently trying
several option.
I would be interested in using web2py, but I do not have any idea how to
install it.
The manual is for servers with ssh access. However I do not have this
option with my provider.
The host has
It just shows the created_year column, count column is missing completly..
(Not even a table header is shown for the count column)
Am Samstag, 3. Mai 2014 14:45:29 UTC+2 schrieb Niphlod:
what does {{=stats}} show ?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
I'm trying to query my tables from the private folder:
from gluon.tools import DAL
db = DAL(sqlite://../databases/storage.sqlite)
print db.tables
However none of my tables can be seen.
The idea is to have a better manner of extracting data rather than the
old-school:
with
Hello!
I have a problem with 'reddit-clone' app from this tutorial. I'm stuck at
moment in 2:28:00. My problem is with if statement that is supposed to
change the button responsible for changing the view.
For me the condition is always false, even though when printed, the
request.function
One thing that causes .table to get corrupted is running out of disk space.
On Friday, 2 May 2014 10:32:21 UTC-5, peter wrote:
I have several web2py 2.8.2 applications running on a VPS under Centos 5
with nginx and uwsgi. I use sqlite with all the apps. Items in
the databases folder
I've created a virtualfield on my table as this:
db.define_table(alunos,
SQLField(nome, string, length=255, label=Nome, notnull=True,
requires=IS_UPPER())
SQLField(data_nascimento, date, label=Data de
nascimento,represent=campoDataNascimento, notnull=True),
23 matches
Mail list logo