I have a multi-tenant application, where users can upload files. I save
these in a different directory for each client (tenant), so I can keep tabs
on the overall disk space and number of files uploaded by each.
This works when defined in a model:
FILE_PATH=os.path.join(request.folder, 'uploads
You are welcome. Just a way of giving back so much help received from this
group.
Best regards.
El lunes, 9 de mayo de 2016, 1:48:34 (UTC+2), Michael Beller escribió:
>
> Thanks Carlos! I just came across this and your post helped me.
>
> On Friday, March 11, 2016 at 5:09:50 AM UTC-8, Carlos Kit
Thanks Carlos! I just came across this and your post helped me.
On Friday, March 11, 2016 at 5:09:50 AM UTC-8, Carlos Kitu wrote:
>
> Hi guys, I don't show up here too often because all the issues I find use
> to be solved here. Good job.
>
> Today I was going nuts with one issue, and I would li
You could extend markmin, I haven't tested but this should work
def show_var(text):
"""
Show a request var in markmin.
example usage in markmin:
``x``:show_var
return request.vars[text]
from functools import partial
MARKMINVARS = partial(MARKMIN, extra={'show_var':
What would be the most efficient way to take out html tag for IS_IN_SET
(str) which outputs
['my string']
Want to display.
my string
Is re.compile and re.sub are the only options?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py
I think I now know why it's not working, but I don't know how to fix it. I
think the issue is that I am filtering my supplier_contacts by getting the
supplier_id from request.args(0) however, the links on the SQLFORM.grid
look like this
http://127.0.0.1:8000/srm/supplier/view/view/supplier_cont
I have an SQLFORM.grid in a view to display a list of supplier contacts
When I click "Add Record", I get the error below.
Traceback
1.
2.
3.
4.
5.
6.
Traceback (most recent call last):
File "E:\web2py\gluon\restricted.py", line 227, in restricted
exec ccode in environment
File "E:\web2p
I found the problem, I had to add
user_signature=False
to the SQLFORM.grid i.e. (SQLFORM.grid(.,user_signature=False)
This sorted out the problem
On Sunday, 8 May 2016 17:04:52 UTC+1, DenesL wrote:
>
>
> http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#login-r
I would like to have a set that requires to be not empty. But looking at
the documentation there are no such thing as IS_NOT_EMPTY_OR like we have
for IS_EMPTY_OR. Any thoughts?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source
Thanks. I went with DigitalOcean and am having the experience you've
described.
On Saturday, May 7, 2016 at 12:59:47 PM UTC-4, Kenneth wrote:
>
> You can treat DigitalOcean or Linode as complete linux server to play
> around with.
>
> You can install any Python modules with PIP install module_na
http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#login-required-by-default-for-data-updates
By default all the URLs generated by the grid are digitally signed and
verified. This means one cannot perform certain actions (create, update,
delete) without being logged-in.
On S
It means that you can not name a table or field "ALL" because it is a
keyword (it has special meaning) in the current DB.
You have to use a different name.
On Sunday, May 8, 2016 at 9:48:23 AM UTC-4, Abhijeet Singh Tomer wrote:
>
> when I create a no of fields in the db.py file after then when I
Here is the code in my controller.
# -*- coding: utf-8 -*-
# try something like
def index():
return dict(message="hello from supplier.py")
def manage_suppliers():
links = [lambda row: A(SPAN(_class='glyphicon glyphicon-search'),'
View',_class='button btn
btn-default',_href=URL("supplie
You don't say how you are creating the form.
Assuming you are using SQLFORM then the label is in the Field definition:
http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor
On Sunday, May 8, 2016 at 9:48:28 AM UTC-4, R U wrote:
>
> I am fairly new to a
Dear Massimo,
Is there way to add custom alert dialog after clicking the delete button.
I have tried using following code in view/show.html and its working.
jQuery(function(){
jQuery('._btndelete').click(
function(){return confirm('Are you sure?');
});
});
I am searching for cus
I am fairly new to all things coding and the learning has been slow. My
question is how to insert a label or legend in a form when making the form
from the model.
If that is not possible I will need to make the form in the controller.
the problem I run into there is how to create a boolean. The
Hi,
I have been watching web2py for some time and really like it. I have worked
through a few basic examples but this is my first "real" project. I am
looking at making a simple Log manager, where I have a python listener that
parses incoming logs and then loads them into the database and then
Hello.
I've got a problem with grid component. I added grid to view with LOAD
function because i need to refresh data continuously:
{{extend 'layout.html'}}
{{=LOAD('default', 'grid.load', ajax=True, times="infinity", timeout=1
)}}
and my controler looks like below:
def grid():
links =
Hello.
I have problem and i cannot solve it.
I'm trying to write app which display data from database and automatically
refresh itself.
I used SQLFORM.grid because i need also select and sort functionality.
In view i used LOAD function with timeout to refresh component.
My problem is that when gr
HI,
Anyone knows how to implement the custom alert confirm message after
clicking delete button.
I have tried below code.
jQuery(function(){
jQuery('._btndelete]').click(
function(){return confirm('Are you sure?');
});
});
--
Resources:
- http://web2py.com
- http://web2py.co
when I create a no of fields in the db.py file after then when I click on
the database administration it shows me error which is as follows:
invalid table/column name "state" is a
"ALL" reserved SQL/NOSQL keyword
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- ht
I created a new model and called it data.py
I created a definition for a table
db.define_table('suppliers',
Field('company_name','string'),
Field('address1','string'),
Field('address2','string'),
Field('town','string'),
I'm passing in a get variable called x to the wiki page. I'm trying to read the
value of x from the wiki page. Is there a way to do that?
-Original Message-
From: "Leonel Câmara"
Sent: 5/8/2016 7:58 AM
To: "web2py-users"
Subject: [web2py] Re: markmin
What do you mean? Markmin is a
What do you mean? Markmin is a markup language. What are you trying to do?
--
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 becau
*How To Select Only The Latest Rows from a Table*
For a Table structure as below:
*Table(*
*PrimaryKey,*
*FieldName1,*
*FieldName2,*
*Time)*
FieldName1 and FieldName2 are not unique.
*Goal: To select only the latest row for each FieldName2*
*Items = db(db.Table.FieldName1 != Value1).select(or
25 matches
Mail list logo