It was indeed, thanks Stifan,
Basically, I was overwriting my whole ~/web2py folder with the contents of
the .zip file, as I've done it dozens of times before, since I keep my
applications symlinked from outside of the web2py directory structure,
removing the whole folder and recreating it from
On Monday, May 25, 2015 at 8:02:12 PM UTC-4, 黄祥 wrote:
>
> please try in your controllers:
> *not tested*
> id_max = db.project.id.max()
> maxID = db(db.project).select(id_max).first()[id_max]
> project_id = int(maxID) + 1 if maxID else 1
>
> db.project.uploadfolder = os.path.join(request.folder,'u
Validators apply to forms. If you want to run validators when doing a manual
insert or update (i.e., not via a form), you have to use .validate_and_insert
or .validate_and_update.
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2
Dear All
I have problem when i click on pagination of sqlform.smartgrid because my
custom date field change to today and i lost data
def index():
d=datetime.datetime.strptime(request.vars.desde, "%d/%m/%Y %H:%M:%S") \
if request.vars.desde else
datetime.datetime.strptime(datetime.d
i think it related with pydal (modular dal), please try to download the
newest version (not upgrade) and then packed and uploaded your old app into
the newest version.
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web
I have the following table definition:
db.define_table('person',
Field('email',requires=IS_NOT_IN_DB(db,'person.email')),
Field('password',requires=[CRYPT(salt=False)]),
Field('reg_key'))
I have the following function definition for a REST service:
please try in your controllers:
*not tested*
id_max = db.project.id.max()
maxID = db(db.project).select(id_max).first()[id_max]
project_id = int(maxID) + 1 if maxID else 1
db.project.uploadfolder = os.path.join(request.folder,'upload/project/%s' %
(project_id) )
best regards,
stifan
--
Resourc
web2py Version: Version 2.10.4-stable+timestamp.2015.04.26.15.11.54
Just upgraded it and at first I thought it was one of my apps, but when
trying to access the welcome, admin apps, I invariably got the same error:
S" type object 'DAL' has no attribute
'Field'"
p3
sS'layer'
p4
S'/Users/julio/we
Hi,
Thanks for the prompt reply.
It seems I've found a workaround:
{{=A('Working Modal', _href="#tst_modal", _class="btn btn-success", _onclick
="ajax('%s', '', 'ext_modal_data')" % URL("test_modal.load", vars={"var1":
"varX","var2":"varY"}), **{"_data-toggle":"modal"})}}
So adding an *onclick
you can't mix and match ALWAYS web2py's facilities and bootstrap ones.
Specifically, an A(..., callback=something) builds and intercepts any click
link on it, as it's supposed to be.
If you want bootstrap to work, use other (their?!) methods, not web2py's
one expecting that they work without iss
Hi,
I have found this strange behaviour of Web2py components when used with
Bootstrap3 Modal.
Adding data-toggle attribute to the A() helper breaks bootstrap.
Please consider the following example.
*Controller*:
def test_modal():
return dict()
*test_modal.load* view:
{{=BEAUTIFY(request.v
Note, instead of:
XML('')
you can do:
I(_class='icon icon-user glyphicon glyphicon-user')
Anthony
On Monday, May 25, 2015 at 3:51:20 AM UTC-4, Dmitry Ermolaev wrote:
>
> auth.navbar(CAT(XML(''),T('Welcome') ), mode=...
>
> понедельник, 18 мая 2015 г., 17:47:50 UTC+3 пользователь Carla Raquel
It looks like each project has only one photo associated with it -- do you
really need a separate folder for each project just to store a single
photo? If you are worried about OS performance issues with large numbers of
files in a single directory, you should instead do:
Field('photo', 'up
Are you saying you want to do something like:
def function_vars(...):
stylesheet = some_stylesheet
navbarpad = some_navbarpad
logo = some_logo
return locals()
def some_action():
return function_vars()
Yes, you can do that. Have you tried it and had a problem? Note, if
functi
Hard to say without knowing more details of the code, the content in the
database, etc.
On Monday, May 25, 2015 at 11:40:44 AM UTC-4, goome wrote:
>
> Thank you very much for your help. Sadly, it did not work.
>
> Il giorno giovedì 21 maggio 2015 20:16:01 UTC+2, Anthony ha scritto:
>>
>> You di
I think we need to see some actual code -- the before/after models as well
as the form controller/view code.
On Monday, May 25, 2015 at 11:48:38 AM UTC-4, goome wrote:
>
> Hello
> i again here to beg your help.
> I modified a table (adding a column and setting writable=False in another)
> in mod
You have both migrate and fake_migrate True at the same time? The intent of
fake_migrate is to sync an unsynchronise model/DB and it should be use in
conjonction with migrate False...
May your issue coming from there?
Richard#
On Mon, May 25, 2015 at 3:50 PM, Niphlod wrote:
>
> If you changed
I have the same issue
So what did you do about this?
Thx
Davy
Op maandag 13 augustus 2012 12:53:10 UTC+2 schreef Jaymin Oh:
>
> I just found by myself.
>
> populate method in db.py doesn't support in GAE.
>
> On Thursday, September 29, 2011 6:52:16 PM UTC+9, glomde wrote:
>>
>> Hi,
>>
>> I am t
If you changed the model, forms should reflect the changes istantly
can you post your before and after model ?
PS: beware of sqlite gotchas
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#SQLite
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documenta
Thank you for your atention Richard.
Initially there was no migrate setting for the table, then realizing not
working i tried to set explicitly migrate=True and then fake_migrate=True.
However i don't think is there the problem, due to the fact that web2py has
indeed created the column in the db,
to fix this:
http://stackoverflow.com/questions/24851207/tornado-403-get-warning-when-opening-websocket
with current web2py and tornado 4+
you have to modify: gluon/contrib/websocket_messaging.py
to
class DistributeHandler(tornado.websocket.WebSocketHandler):
def check_origin(self, or
What the state of your migrate flag? True or False?
Notice there is also a migrate_all or something at the DB string level
which prevent migrating of every tables...
Richard
On Mon, May 25, 2015 at 11:48 AM, goome wrote:
> Hello
> i again here to beg your help.
> I modified a table (adding a c
Hello
i again here to beg your help.
I modified a table (adding a column and setting writable=False in another)
in modes/db.py
but it had no effect: nor a form created by SQLFORM reflect the changes,
nor
db.table.fields show the new column.
But the column has indeed created in the db (sqlite). I
just define it with migrate=False and web2py won't issue any ddl statement.
On Monday, May 25, 2015 at 2:21:21 PM UTC+2, Gael Princivalle wrote:
>
> Hello all.
>
> I use a PHP opensource application called PHPList for newsletter
> management.
> It use a Mysql db that we can call 'phplistdb'.
> Us
Thank you very much for your help. Sadly, it did not work.
Il giorno giovedì 21 maggio 2015 20:16:01 UTC+2, Anthony ha scritto:
>
> You didn't turn off migrations in the new app, so web2py thinks it needs
> to create the table. If you want the new app to control the migrations,
> you'll have to
Hi Anthony,
Can you provide a more detailed example of what you are trying to achieve?
>
I have afunction which returns the following dictionary:
return dict(stylesheet=stylesheet, navbarpad=navbarpad, logo=logo,
wordmark=wordmark, brandurl=brandurl,
dropdowns=dropdowns, plural=
Dear all,
let's say the model is:
import os
db.define_table('project',
Field('title', 'string'),
Field('photo','upload',
uploadfolder=os.path.join(request.folder,'upload/project/'),
autodelete=True))
How can I include record.id in the uploadfolder path so a can have
separatesubfold
Thanks Anthony to clarify, now I understand... I never had such an issue I
guess, I never thought the set were preventing the form submission... Let
say that the IP address doesn't change, he could also have put the field in
readable true and writable false...
Richard
On Wed, May 20, 2015 at 4:34
Hello all.
I use a PHP opensource application called PHPList for newsletter management.
It use a Mysql db that we can call 'phplistdb'.
User table is 'phplist_user_user'.
I would like to add a user in 'phplistdb' from web2py.
If I try something like that:
def insert_phplist_user():
email = '
>> Have you updated web2py (and pydal) properly?
Hi Paolo,
Many thanks for looking into this.
I updated earlier this weekend with git pull.
How would I do it 'properly', do I have to use the recursive every time?
Cheers, D
--
Resources:
- http://web2py.com
- http://web2py.com/book (Docum
I want to have an extra field in the register form but not in the auth_user
table.
There has been some threads about this topic in the past.
In user.html I have added:
elif request.args(0)=='register':
form[0].insert(-1, DIV(
LABEL(T('registercode'),_class="control-label col-sm-3"),
auth.navbar(CAT(XML(''),
'Welcome'),...
понедельник, 18 мая 2015 г., 17:47:50 UTC+3 пользователь Carla Raquel
написал:
>
> How can one add an icon before the 'Welcome' message in the navbar,just
> like the one next to the 'Profile' in the drop-down? I tried using
> something like in
> auth.na
32 matches
Mail list logo