Is it possible to use on SQLFORM.grid?
Em quarta-feira, 18 de março de 2015 às 16:11:44 UTC-3, pumplerod escreveu:
> I tried that. It doesn't work either. I've worked around my issue by
> simply not using hidden fields at all, but rather populating the fields
> after the form is submitted
I am getting this error:
Traceback (most recent call last):
File "/home/rebec/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
File "/home/rebec/web2py/applications/lavanderia/views/appadmin.html"
Done.
I did using the table definitions ...
Field('user_id', 'integer',writable=False
,readable=False,default=user_dic["user_id"])
Em ter, 26 de fev de 2019 09:34, Diego Tostes escreveu:
> Hi,
>
> i have this controller:
>
> def cria_servico():
> crud.setting
Hi,
i have this controller:
def cria_servico():
crud.settings.create_next = URL('default', 'dashboard')
form = crud.create(db.service)
I have a field on db.service named user_id. I whant to force the form to
fill this field with the auth_user.id of the user. How can i hidden this
Hi,
Is it possible to use Conditional fields to show a filed field?
I want to fill the geolocation infos using a Zip code from a field.
rgds
Diego
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Massimo,
may i use multiple fields on SQLFORM.factory?
may be a solution to create a form with the functionality of set a state
and automatically fill a dropdown with all cities from selected state, set
a city and automatically fill a dropdown with all zones from that selected
cities...
Hi,
i was reading about conditional fields (
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Conditional-fields
)
and i have a question.
is it possible to do it as a table definition?
bellow are my table definition:
Adverts = db.define_table('adverts',
Hi,
i have a table with more than 60 fields. Is it possible to create a "auto
save" feature with web2py Built-in methods to allowing users to have data
saved while the process of filling the form?
rgds
Diego
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
The problem was at dB.clientes...
Solved. Thanks!!
Em seg, 2 de jul de 2018 16:20, Anthony escreveu:
> Hard to say what's going on. Looks like it's getting an empty string from
> an ID field. What does the db.clientes definition look like?
>
> On Monday, July 2, 2018 at 7:38:27 AM
Hi,
i have this table:
def tempo_total_produto(produto_id):
try:
query = ((db.produto.id == produto_id))
result = db(query).select()
data_status = result[0]["data_criacao"]
data_hoje = datetime.date.today()
retorno = abs((data_hoje -
Anyone already used this plugin or have any tips to create a link in a
SQLFORM that call a form in a dialog box?
http://www.web2pyslices.com/slice/show/1713/
Rgds
Diego
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
liente,*
*
r.ordem_servico_id.identificador_os))*
2018-06-27 12:25 GMT-03:00 Diego Tostes :
> Hi Anthony,
>
>
> i think that put the requires make my code more organized ... But it is a
> personal choice. I did changes in my tables and now i have:
>
>
> Clientes = db.define_table('clientes',
>
em_servico.id
<http://ordem_servico.id>',*
*lambda r: '%s - os: %s' %
(r.ordem_servico_id.produto_id.cliente_id.nome_cliente,*
*
r.ordem_servico_id.identificador_os))*
> is it possible to "navigate" like this?
*r.ordem_servico_id.produto_id.
HI,
I have those tables:
*Produto = db.define_table('produto',*
*Field('ficha_tecnica', 'upload', label=T("Ficha Tecnica")),*
*Field('descricao_produto', 'string', label=T("Descricao Produto")))*
*Ordem_servico = db.define_table('ordem_servico',*
*Field('identificador_os',
ormat" arguments in the definitions of the respective referenced
> tables). In that case, web2py will automatically define the IS_IN_DB
> validators for you.
>
> Anthony
>
>
> On Wednesday, June 20, 2018 at 10:40:18 AM UTC-4, Diego Tostes wrote:
>>
>> I have tho
I have those tables:
*Produto = db.define_table('produto',*
*Field('ficha_tecnica', 'upload', label=T("Ficha Tecnica")),*
*Field('cliente_id', 'integer', label=T("Cliente ID")),*
*Field('cliente_nome', 'string', label=T("Nome Cliente"))*
*)*
*Pedido = db.define_table('pedido',*
*
Hi,
i have a table and i am using:
Show_Room.product_id.requires = IS_IN_DB(db(Product), 'product.ref',
'%(client_name)s - ref: %(ref)s')
When i am using SQLFORM to edit a line of my table, the already persisted
product_id is not selected and i have to select again. If i do not select
the
Hi,
I want to send informations to fill some fields in a SQLFORM.
I read this on web2py book:
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Pre-populating-the-form
But i did not understood. Anybody has a example of this ?
def display_form():
record =
Thanks!!!
it works!!
2018-06-09 21:36 GMT-03:00 黄祥 :
> perhaps you can use callback (before_update or after_update)
> ref:
> http://web2py.com/books/default/chapter/29/06/the-
> database-abstraction-layer#callbacks-on-record-insert--delete-and-update
>
> best regards,
> stifan
>
> --
>
Hi,
is there a way to implement a trigger on web2py?
i need a way to persist informations in a table every time a specific
column in a specific table changes the value.
rgsd
Diego
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py
Hi,
this is my code:
fields = (db.ensaios.codigo_registro,
db.ensaios.patrocinador_primario,
db.ensaios.contato_publico,
db.ensaios.titulo_en,
db.ensaios.trial_info
)
headers = {'db.ensaios.codigo_registro':
thanks.
db(db.ensaios.codigo_registro == "novo ensaio").update(en_pdf=stream)
works for me!!
thanks again!
2018-04-03 7:09 GMT-03:00 Dave S <snidely@gmail.com>:
> On Monday, April 2, 2018 at 12:50:38 PM UTC-7, Diego Tostes wrote:
>>
>> Hi,
>>
>&
Hi,
I already use this:
stream = open("/teste_en.pdf", 'rb')
db.ensaios.insert(codigo_registro="novo ensaio",
en_pdf=stream
)
but I need to know if is a possible update a row with an upload.
2018-04-02 14:27 GMT-03:00 Diego Toste
2018-04-02 13:22 GMT-03:00 Diego Tostes <dtos...@gmail.com>:
> Hi,
>
>
> i have a table in my model called ensaios:
>
> Ensaios = db.define_table('ensaios',
> Field('codigo_registro', 'string'),
> Field('url', 'string'),
> Field('titulo_pt', 'string'),
Hi,
i have a table in my model called ensaios:
Ensaios = db.define_table('ensaios',
Field('codigo_registro', 'string'),
Field('url', 'string'),
Field('titulo_pt', 'string'),
Field('titulo_en', 'string'),
Field('tags', 'text'),
Field('contato_publico', 'string'),
Hi,
i was using a require in my model like this:
Position.company.requires = IS_IN_DB(db, Company.id, '%(name)s')
But i need to use a query that allows the user to insert only the companys
that him already created. I need to know if is possible use a query like:
Company.id and Company.owner
Hi,
how can i send to a controller the attachment file from a html form in my
view?
Rgds
Diego
--
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
Thanks Ramos!
2017-01-24 10:42 GMT-02:00 António Ramos <ramstei...@gmail.com>:
> try
> var lista = {{=*XML(*dic["signals_list"]*)*}};
>
>
> http://www.web2pyref.com/reference/xml-html-helper
>
> 2017-01-24 11:37 GMT+00:00 Diego Tostes <tostes.pyt...@gmai
Hi,
I need to send a list from controller to a javascript variable in the view.
When i send the data the list to the view using:
var lista = {{=dic["signals_list"]}};
and when i try to open the page i get:
var lista = [Fever, fever, dor no
corpo, enxaqueca];
How can i fix this?
Rgds
de static/js
> then load it like this in the html
> {{response.files.append(URL('static','/js/tagit.js'))}}
>
>
>
>
> 2017-01-20 12:42 GMT+00:00 Diego Tostes <tostes.pyt...@gmail.com>:
>
>> Hi guys,,...
>>
>> i did all the tips without succes...
>>
Hi,
I have a html file that i i need to use with web2py, but this file access a
unique css and js file.
I try to add the files at the static withous success. I try to hardcoder
the script and the css at the html file without success too.
How can i do ?
Rgds
Tostes
--
Resources:
-
ppend(URL('static','/css/zzz.css'))}}
> {{extend 'layout.html'}}
>
> 2017-01-19 20:30 GMT+00:00 Dave S <snidely@gmail.com>:
>
>> On Thursday, January 19, 2017 at 12:22:06 PM UTC-8, Diego Tostes wrote:
>>>
>>> Hi,
>>>
>>> I have a html file
Hi,
I have a html file that i i need to use with web2py, but this file access a
unique css and js file.
I try to add the files at the static withous success. I try to hardcoder
the script and the css at the html file without success too.
How can i do ?
Rgds
Tostes
--
Resources:
-
Hi,
I am doing tests to approve a system that was develop in using web2py.
When i did a modification on the code of the gluon/tools.py in:
def __call__(self):
"""
Example:
Use as::
def authentication():
return
var options = {
> title: '{{=title}}'
> };
>
> var chart = new
> google.visualization.PieChart(document.getElementById('my_chart'));
>
> chart.draw(data, options);
> }
>
>
>
> 2016-01-21 18:01 GMT-03:00 Diego Tostes <toste
i am trying to use google chart plugin, but the example at
http://www.web2pyslices.com/slice/show/1721/google-charts-plugin, it is not
so clear to me.
anybody can show me a example with a controller and a view?
i need a simple line chart.
rgds
diego
2016-01-21 17:36 GMT-02:00 Diego Tostes
thanks for all!
2016-01-21 14:17 GMT-02:00 Alex :
> my favorite chart library:
> https://www.amcharts.com/
> very beautiful, easy to use, good documentation and friendly license
> (allows usage of free version even for commercial websites).
>
> Alex
>
> --
> Resources:
> -
Hi,
anyone can indicate a good solution to create charts using web2py?
rgds
diego
--
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
Hi,
i have a sqlform like this:
form = SQLFORM.grid(query=query_simulados, user_signature=False,
fields=fields,
ignore_rw=True, orderby=default_sort_order,
create=True, deletable=True, editable=True,
maxtextlength=64,
thanks!
works!!
2016-01-18 14:37 GMT-02:00 Anthony <abasta...@gmail.com>:
> On Monday, January 18, 2016 at 11:22:16 AM UTC-5, Diego Tostes wrote:
>>
>> hi anthony!
>>
>> thnaks... the default field is working!!
>>
>> but the redirect i did no unde
hi anthony!
thnaks... the default field is working!!
but the redirect i did no understand...
2016-01-18 14:11 GMT-02:00 Anthony <abasta...@gmail.com>:
> On Monday, January 18, 2016 at 9:29:29 AM UTC-5, Diego Tostes wrote:
>>
>> Hi,
>>
>> i have a sql
Hi,
I neew to create a form to edit a existing table element, but i do not want
to expose all the fields of the table to update.
is that possiblem using sqlform or crud form? or i need to build a custom
form at the viw and create a controler to update the table?
rgds
diego
--
Resources:
-
rd
>
> On Mon, Sep 14, 2015 at 12:47 PM, Diego Tostes <tostes.pyt...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I neew to create a form to edit a existing table element, but i do not
>> want to expose all the fields of the table to update.
>>
>> is that pos
def controler_update():
from gluon.tools import Crud
crud = Crud(db)
crud.update(db.tablename,
id)
db.tablename.field.readable = False
db.tablename.field.editable = False
return dict(form=crud())
2015-09-14 14:37 GMT-03:00 Diego Tostes <tostes.pyt...@gmail.
to completly "mute" a
> field... You may use readable = True and writable = False if you want to
> display the field data that will not be updated...
>
> Richard
>
> On Mon, Sep 14, 2015 at 2:47 PM, Diego Tostes <tostes.pyt...@gmail.com>
> wrote:
>
&
; On Mon, Sep 14, 2015 at 2:16 PM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> No, no, no, before the crud.update()
>>
>> I think it may work either after, but it more safe and coherent before
>> the form definition (before crud.something).
>>
>
Hi all,
is it possible to disable a field in the insert form that is created on de
SQLform grid?
thanks,
diego
--
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
I am using the A helper. It is possible to use this helper to create a pop
up to the link?
Thanks
--
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
Hi,
i have a model with:
Article = db.define_table('article',
Field('title', 'string'),
Field('author', 'string'),
Field('type_article', 'string'),
Field('url', 'string'),
Field.Virtual('link_to_click', lambda row: A('click_here',
_href=)),
)
How can do to show the url
automatically.
Anthony
On Saturday, December 28, 2013 4:20:34 PM UTC-5, Diego Tostes wrote:
here is my code:
http://pastebin.com/qh5AV8Xh
but the download don't start when i access this controler.
2013/12/28 Diego Tostes tostes...@gmail.com
i am using the pyrtf, but i dont know
()
Renderer().Write(doc, s)
s.seek(0)
return response.stream(s, attachment= True, filename=
'yourdocument.rtf')
Anthony
On Monday, December 30, 2013 7:52:07 AM UTC-5, Diego Tostes wrote:
thanks anthony,
but did not works... the result was a file with no name with None
printed
: A('Teste_%s' % row.parte.id
,_href=''))
but you may also want to consider using this instead:
db.parte.id.label = anexos
db.parte.id.represent = lambda id,row: lambda row: A('Teste_%s' % id
,_href=''))
On Friday, 27 December 2013 12:23:08 UTC-6, Diego Tostes wrote:
Hi,
I am trying
Hi,
Is it possible create doc files (word or openoffice) using templates
rendering?
Rgds,
Diego
--
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
done using
PyRTF
thanks
2013/12/28 Diego Tostes tostes.pyt...@gmail.com
Hi,
Is it possible create doc files (word or openoffice) using templates
rendering?
Rgds,
Diego
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py
i am using the pyrtf, but i dont know how create the file and download
without save the file on the server.
any idea?
2013/12/28 Anthony abasta...@gmail.com
There's also python-docx https://github.com/mikemaccana/python-docx.
On Saturday, December 28, 2013 10:35:33 AM UTC-5, Diego Tostes
here is my code:
http://pastebin.com/qh5AV8Xh
but the download don't start when i access this controler.
2013/12/28 Diego Tostes tostes.pyt...@gmail.com
i am using the pyrtf, but i dont know how create the file and download
without save the file on the server.
any idea?
2013/12/28
Hi,
I am trying to create a virtualfield as a link like the this code:
http://pastebin.com/c2wZqECH
But when i create a SQL.grid this virtualfield is displayed as a string.
Is it possible to create a link ?
Rgds,
Diego
--
Resources:
- http://web2py.com
- http://web2py.com/book
Hi,
Is it possible create a grid like SQLform.grid using a dictionay instead of
a query result?
Rgds,
Diego
--
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)
Hi Massimo,
I want to use the same graphics of a SQLform grid using my own dictionary.
I don't want to create a html grid using tr and td.
I am seeking for a solution to have a good graphical grid with search
engine to show data that i will send to the view using a dictionary.
Rgds,
Diego
--
59 matches
Mail list logo