Hi Richard,
I was finally able to make this work this way:
filename =
os.path.join(request.folder,'static/images/files/{}'.format(file[1]))
stream = open(filename, 'rb')
db.vendor.insert(default_name = vendor[0], logo=stream)
When I print the path, there is bo
Hello everyone. The databese of my web app is mongodb. I have defined a
table as the following
db.define_table('stu_jb',
Field("zy",label="major",type="list:string",requires=IS_IN_SET(major_lists,multiple=True)),
)
But when I add a record to the table I get the following error
'
Hello
I just updated to version 2.14.3 and noticed that empty strings are being
stored as null in database field. This didn't happened in 2.13.4.
Is this the intended behavior ?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source
It really looks like a permission problem.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Goo
I even removed everything in Web2py folder from first computer, and started
fresh with everything. That still does not work. It might be something like
regedit, or some system flags...
On Thursday, March 31, 2016 at 4:11:13 PM UTC-7, Vu Pham wrote:
>
> No, there is no error.
> The strange thing
No, there is no error.
The strange thing is that I copied what I had and can not edit in this
first computer, and pasted them in second computer. And everything is
working as normal. I can edit, and do my work as normal. That has to be
something preventing me from editing in first environment.
I don't mean during the launch of web2py, I mean, if you go to the blank
edit page you're getting and you go to the browser developer console
(usually f12 shows it) do you see errors there in the console tab?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://gi
Everything is fine. There is no error when launching Web2py framework.
Thanks for your help, Vu
On Thursday, March 31, 2016 at 3:21:07 PM UTC-7, Leonel Câmara wrote:
>
> Do you have any errors in the browser console?
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Do you have any errors in the browser console?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the
All files have read/write permission. And I did not change any permission. !
On Thursday, March 31, 2016 at 3:06:44 PM UTC-7, Leonel Câmara wrote:
>
> Did you change file permissions? Is it possible web2py does not have
> permission to modify the files?
>
--
Resources:
- http://web2py.com
- htt
Did you change file permissions? Is it possible web2py does not have
permission to modify the files?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You
Just try an experiment like this...
if form.process().accepted:
myvars = {'myvar1': 'A', 'myvar2': 'B'}
redirect(URL('default', 'nextstep', vars=myvars ))
def nextstep():
print request.vars.myvar1, request.vars.myvar2
return myvars
On Thursday, 31 March 2016 21:32:31 UTC+1,
Let me re-phrase the question.
Would it be invalid to post the input field name='box1' type='checkbox' as
box1[] ?
I have been unsuccessfull in replicating a post with box1[] from checkboxes
without Framework7 except when the input itself is named box1[].
F7 uses javascript to modify the DOM an
Is it possible for me to do jquery within the controller??
So after form.process().accepted I can hide the div containing the form and
show a div which will contain a button that the user can click and this way
I will be able to pass the variable from the view into another controller?
I've only
I did try all browser (IE, Chrome). It has same problem !
On Thursday, March 31, 2016 at 1:03:49 PM UTC-7, Vu Pham wrote:
>
> Hello,
> Can you help me with this problem.
>
> I had been editing my code without any problem. But lately every time I
> click on Edit feature, and it does not go to the
On Thursday, March 31, 2016 at 1:03:49 PM UTC-7, Vu Pham wrote:
>
> Hello,
> Can you help me with this problem.
>
> I had been editing my code without any problem. But lately every time I
> click on Edit feature, and it does not go to the Edit screen any more.
> Could you tell me why.
> attached
I fill an empty array with form values in a single view,
how am I able to pass this array into a new view so that I can do what I
want with the values in the new controller after the form is submitted?
I try doing something like the following within my controller containing
the form:
if form
On Thursday, March 31, 2016 at 1:03:34 PM UTC-4, Jacob Devin wrote:
>
> What's the difference between these two and when should we use them?
> dpform=SQLFORM(db.info,row.id,fields=['dp'],showid=False).process()
> dpform=SQLFORM(db.info,row.id,fields=['dp'],showid=False)
>
You should typically ca
On Thursday, March 31, 2016 at 1:03:49 PM UTC-7, Vu Pham wrote:
>
> Hello,
> Can you help me with this problem.
>
> I had been editing my code without any problem. But lately every time I
> click on Edit feature, and it does not go to the Edit screen any more.
> Could you tell me why.
> attached
Suggestion:
the detect_record_change section appears under FORM in the book
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Detect-record-change
but it does *not* work with FORM.
Its existence might be missed since there is no mention of it under SQLFORM.
Denes
--
Resources:
Hello,
Can you help me with this problem.
I had been editing my code without any problem. But lately every time I
click on Edit feature, and it does not go to the Edit screen any more.
Could you tell me why.
attached is the screen when I used Edit button in any application even
built-in apps lik
Hello,
I am using CAS to manage login in my application, with the following
structure:
MainApp -> Main Application
App1 and App2 -> Secondary applications
App1 and App2 are configured so that the login is managed by MainApp. For
login, everything works fine:
- If I login in MainApp,I'm logged
On Thursday, March 31, 2016 at 8:28:30 AM UTC-7, drew Roberts wrote:
>
> On Monday, March 21, 2016 at 9:53:36 PM UTC-4, drew Roberts wrote:
>
>> I have something like this in a controller:
>>
>> [...]
>>
> If I put something in the cur_camp field and submit, all rows "selected"
>> are updated w
Regular redirect doesn't work for ajax requests, you need to add
client_side=True to those redirects.
Example:
redirect(URL('default','screen'))
Should change to:
redirect(URL('default','screen'), client_side=True)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Here after default/delformforscreen.load accepts the form
default/screen.html should load. How do I do that? It ain't working the way
I thought. So I marked comment signs infront of that (see below) .
def screen():
row=db(db.info.info_id==auth.user_id).select().first()
if row:
g
What's the difference between these two and when should we use them?
dpform=SQLFORM(db.info,row.id,fields=['dp'],showid=False).process()
dpform=SQLFORM(db.info,row.id,fields=['dp'],showid=False)
On Thursday, March 31, 2016 at 5:36:01 PM UTC+5:30, Anthony wrote:
>
> You cannot call .process() twic
You don't need default for a update form... and as I said you query was
wrong... I have big doubt that your auth_user content is not what you think
it is... You should look at what your DB contains...
Your form may not pass because the value you try to update already not
unique too... which would
Well according to the blog that was the proper way to set the form with
default from the database but I maybe understood it wrong.
I ended up here cos I didn't find how to set up the default with a lambda
function. And so far, I always get a "lamba accpets 1 argument error
Anyway despite I comme
On Monday, March 21, 2016 at 9:53:36 PM UTC-4, drew Roberts wrote:
> I have something like this in a controller:
>
>
> @auth.requires_login()
> def list_machines():
> form=crud.create(db.machine)
> form1=SQLFORM(db.machine)
> machines=db(db.machine.id>0).select(orderby=db.machine.name)
Here is the example from long polling from Ricardo.
https://github.com/rpedroso/w2pchat/
But I believe its one chat room. Means no matter who logs into the page see
the same chat. Not sure if it can be modified to have multiple chat rooms
between two users.
On Thursday, March 31, 2016 at 2:2
Should be URL('static','images/files/{*0*}'.format(file[1]))
Richard
On Thu, Mar 31, 2016 at 6:34 AM, Marko Seppälä wrote:
> Hi,
>
> I want to upload some of the images programmatically from file system,
> when initializing the database. Not the actual file though, just normal
> upload so that
Why that for ???
for row in db(db.auth_user.first_name == db.auth_user.first_name).select():
administrator = row.is_manager
first_name = row.first_name
last_name = row.last_name
nickname= row.nickname
email = row.email
Hi,
I want to upload some of the images programmatically from file system, when
initializing the database. Not the actual file though, just normal upload
so that file stays in file system but it's accessible via database for
every user.
I tried something like this:
db.define_table('image',
Hi,
I am trying to download static file, from my application.
like xyz.xls file kept in folder "myApp/download/"
Thanks
Narendra
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/l
https://github.com/blog/2131-git-2-8-has-been-released
I may be wrong, I think the improvement is in fetch... I thought it was
managing clone recursive...
Richard
On Thu, Mar 31, 2016 at 4:04 AM, Tommi Lahtonen wrote:
>
>
> On Tuesday, March 29, 2016 at 7:48:07 PM UTC+3, Richard wrote:
>>
>> G
You cannot call .process() twice.
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Goo
There is a simple way :-)
from the code:
https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2914
links(dict): like `{'tablename':[lambda row: A(), ...]}`
that will add buttons when table tablename is displayed
On Thu, Mar 31, 2016 at 12:18 PM, Massimiliano wrote:
> Sorry is a
Sorry is a little more complex to get the table name involved.
It should be in request.args(1)
table = request.args(1).rpartition('.')[0]
On Thu, Mar 31, 2016 at 12:10 PM, Massimiliano wrote:
> Maybe you can check the table involved and set links option accordingly.
>
> Something like:
>
> tab
Maybe you can check the table involved and set links option accordingly.
Something like:
table = request.args(0) or ‘dashboard’
links = []
if table == ‘label_dashboard’:
links=[…]
grid = SQLFORM.smartgrid(db.dashboard,linked_tables=[‘label_dashboard’],
links=links)
Not tested
On Wed, Mar
def changedp():
row=db(db.info.info_id==auth.user_id).select().first()
dpform=SQLFORM(db.info,row.id,fields=['dp'],showid=False).process()
if dpform.process().accepted:
redirect(URL('default','screen'))
return locals()
{{extend 'layout.html'}}
{{=dpform}}
--
Resources:
-
On Tuesday, March 29, 2016 at 7:48:07 PM UTC+3, Richard wrote:
>
> Git 2.8 will solve that...
>
>
what do you mean?
I tried with git and it does not work any better than the full src-package.
Same error.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://git
41 matches
Mail list logo