Re: [web2py] web2py CMS
Hi Andrey, So do you need a rich text editor? From web2py Examples (http://www.web2py.com/init/default/examples) Example 13 In controller: simple_examples.py def makertf(): import gluon.contrib.pyrtf as q doc=q.Document() section=q.Section() doc.Sections.append(section) section.append('Section Title') section.append('web2py is great. '*100) response.headers['Content-Type']='text/rtf' return q.dumps(doc) web2py also includes gluon.contrib.pyrtf, developed by Simon Cusack and revised by Grant Edwards. This module allows you to generate Rich Text Format documents including colored formatted text and pictures. 2014-06-01 6:43 GMT-03:00 Andrey K kmelevs...@gmail.com: Thanks Yamandu and Massimo, I will check it out. I have found several others: https://github.com/espern/tiny_website https://github.com/mdipierro/w2cms Fabiano, I need it for my application, so content manager or designer could edit at least text and change colors without keep asking developer (me) to do it:) On Saturday, May 31, 2014 9:32:08 AM UTC+3, Massimo Di Pierro wrote: kpax is so old I would recommend it any more. On Friday, 30 May 2014 16:28:04 UTC-5, yamandu wrote: We have some options as I know. Kpax from Massimo http://vimeo.com/1098656 https://github.com/mdipierro/web2py-appliances/tree/master/KPax2 Quoca and Movuca (more lika a social app) from Bruno Rocha http://quokkaproject.org/ https://github.com/rochacbruno/Movuca https://code.google.com/p/instant-press/ 2014-05-30 17:52 GMT-03:00 Fabiano Almeida fab...@techno7.com.br: Hi Andrey, Do you need a blog? 2014-05-30 11:21 GMT-03:00 Andrey K kmele...@gmail.com: I am interested to add in CMS system for our web2py application. Quick search does not give me any solutions. Is there any CMS plugin already or any recipes on it? Any thoughts, suggestions, links and comments would be very appreciated. Thank you in advance! -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Att. Carlos J. Costa Cientista da Computação Esp. Gestão em Telecom EL MELECH NEEMAN! אָמֵן -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] SQLFORM option fields
Hi, Can I use fileds option in normal SQLFORM ? How? I tried: form = SQLFORM(Solicitacao, fields=[Solicitacao.almoxarifado_id]) And has error. thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: SQLFORM option fields
Hi, Showing my code: Solicitacao = db.define_table(solicitacao, SQLField(solicitante_id, db.auth_user, default=me), SQLField(responsavel_id, db.auth_user, label='Responsável'), SQLField(almoxarifado_id, db.almoxarifado, notnull=True, label='Almoxarifado'), SQLField(cadastro, datetime, notnull=True, default=request.now), SQLField(efetivado, datetime)) Solicitacao.solicitante_id.requires=IS_IN_DB(db, 'auth_user.id') Solicitacao.responsavel_id.requires=IS_IN_DB(db, 'auth_user.id') Solicitacao.almoxarifado_id.requires=IS_IN_DB(db, 'almoxarifado.id', '%(nome)s') def cadastro(): form = SQLFORM(Solicitacao, fields=[Solicitacao.almoxarifado_id]) return dict(form=form) Error: File /home/fabiano/web2py/applications/gse/controllers/solicitacao.py, line 30, in cadastro form = SQLFORM(Solicitacao, fields=[Solicitacao.almoxarifado_id]) File /home/fabiano/web2py/gluon/sqlhtml.py, line 1059, in __init__ if fieldname.find('.') = 0: AttributeError: 'Field' object has no attribute 'find' Thanks, Fabiano. 2014-06-02 19:17 GMT-03:00 Anthony abasta...@gmail.com: Should be db.Solicitacao.almoxarifado_id. Anthony On Monday, June 2, 2014 5:11:18 PM UTC-4, Fabiano Almeida wrote: Hi, Can I use fileds option in normal SQLFORM ? How? I tried: form = SQLFORM(Solicitacao, fields=[Solicitacao.almoxarifado_id]) And has error. thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: SQLFORM option fields
I just discovered the problem, the fields in the attribute fields should be quoted without the table name: form = SQLFORM(Solicitacao, fields=['almoxarifado_id']) Thanks, Fabiano 2014-06-02 20:15 GMT-03:00 Fabiano Almeida fabi...@techno7.com.br: Hi, Showing my code: Solicitacao = db.define_table(solicitacao, SQLField(solicitante_id, db.auth_user, default=me), SQLField(responsavel_id, db.auth_user, label='Responsável'), SQLField(almoxarifado_id, db.almoxarifado, notnull=True, label='Almoxarifado'), SQLField(cadastro, datetime, notnull=True, default=request.now), SQLField(efetivado, datetime)) Solicitacao.solicitante_id.requires=IS_IN_DB(db, 'auth_user.id') Solicitacao.responsavel_id.requires=IS_IN_DB(db, 'auth_user.id') Solicitacao.almoxarifado_id.requires=IS_IN_DB(db, 'almoxarifado.id', '%(nome)s') def cadastro(): form = SQLFORM(Solicitacao, fields=[Solicitacao.almoxarifado_id]) return dict(form=form) Error: File /home/fabiano/web2py/applications/gse/controllers/solicitacao.py, line 30, in cadastro form = SQLFORM(Solicitacao, fields=[Solicitacao.almoxarifado_id]) File /home/fabiano/web2py/gluon/sqlhtml.py, line 1059, in __init__ if fieldname.find('.') = 0: AttributeError: 'Field' object has no attribute 'find' Thanks, Fabiano. 2014-06-02 19:17 GMT-03:00 Anthony abasta...@gmail.com: Should be db.Solicitacao.almoxarifado_id. Anthony On Monday, June 2, 2014 5:11:18 PM UTC-4, Fabiano Almeida wrote: Hi, Can I use fileds option in normal SQLFORM ? How? I tried: form = SQLFORM(Solicitacao, fields=[Solicitacao. almoxarifado_id]) And has error. thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] web2py CMS
Hi Andrey, Do you need a blog? 2014-05-30 11:21 GMT-03:00 Andrey K kmelevs...@gmail.com: I am interested to add in CMS system for our web2py application. Quick search does not give me any solutions. Is there any CMS plugin already or any recipes on it? Any thoughts, suggestions, links and comments would be very appreciated. Thank you in advance! -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: How to process form created in view
I understood. Thanks! Fabiano. 2014-05-21 4:26 GMT-03:00 Niphlod niph...@gmail.com: if you want to code by hand...be sure to know HTML first...where are action and method attributes for the form ? you'll collect vars from request.post_vars, hopefully. On Tuesday, May 20, 2014 9:48:45 PM UTC+2, Fabiano Almeida wrote: Hi Niphlod My code: *controller:* def index(): return dict() *view:* {{extend 'layout.html'}} h1Relatório Mensal/h1 br/ form name=fFiltro method=post bPeríodo:/bbr/ Data Inicial: input type=date name=dInicial br/ Data Final: input type=date name=dFinal br/br/ bFiltragem/bbr input type=radio name=rbFiltro value=0 Todos br/ input type=radio name=rbFiltro value=1 Individual br/br/ input type=submit value=Enviar /form I don't know how to collect vars from form after submitted. In controller don't have form var to use form.process(). Thanks, Fabiano. Em terça-feira, 20 de maio de 2014 16h10min51s UTC-3, Niphlod escreveu: start saying what you need to do ;-P usually request.get_vars, request.post_vars or their merge request.vars are holding the data of the form, but I can't say for sure without seeing what you did in the view. On Tuesday, May 20, 2014 9:08:32 PM UTC+2, Fabiano Almeida wrote: Hi all, I created directly in view of a form for report filtering options. How do I handle controler in the form after submit? Thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Calculate difference between datetimes
Good morning, What is the best method to calculate the time difference between two datetime fields? simple subtraction between the final and initial results on -00-00 00:00:00 Thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Calculate difference between datetimes
Hi all, I just discovered that the timedelta ... my lack of intimacy with the python still kills me ... Thanks for all, Fabiano. Em quarta-feira, 21 de maio de 2014 10h08min56s UTC-3, Fabiano Almeida escreveu: Good morning, What is the best method to calculate the time difference between two datetime fields? simple subtraction between the final and initial results on -00-00 00:00:00 Thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] How to process form created in view
Hi all, I created directly in view of a form for report filtering options. How do I handle controler in the form after submit? Thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: How to process form created in view
Hi Niphlod My code: *controller:* def index(): return dict() *view:* {{extend 'layout.html'}} h1Relatório Mensal/h1 br/ form name=fFiltro method=post bPeríodo:/bbr/ Data Inicial: input type=date name=dInicial br/ Data Final: input type=date name=dFinal br/br/ bFiltragem/bbr input type=radio name=rbFiltro value=0 Todos br/ input type=radio name=rbFiltro value=1 Individual br/br/ input type=submit value=Enviar /form I don't know how to collect vars from form after submitted. In controller don't have form var to use form.process(). Thanks, Fabiano. Em terça-feira, 20 de maio de 2014 16h10min51s UTC-3, Niphlod escreveu: start saying what you need to do ;-P usually request.get_vars, request.post_vars or their merge request.vars are holding the data of the form, but I can't say for sure without seeing what you did in the view. On Tuesday, May 20, 2014 9:08:32 PM UTC+2, Fabiano Almeida wrote: Hi all, I created directly in view of a form for report filtering options. How do I handle controler in the form after submit? Thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] SQLFORM.factory - other types of field
Good night, When building a custom form with SQLFORM, how do I specify the type of field to be displayed (eg date, time, number, etc.). Thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: SQLFORM.factory - other types of field
Understood. Thank you!!! Fabiano. Em terça-feira, 20 de maio de 2014 20h49min05s UTC-3, 黄祥 escreveu: please read dal chapter about field constructor. taken from the book about SQLFORM.factory : The Field object in the SQLFORM.factory() constructor is fully documented in the DAL chapterhttp://web2py.com/books/default/chapter/29/06#markmin_field_constructor. best regards, stifan -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Menu for anonymous and logged
Hi all! It's possible make differ menu for groups or logged users in models/menu.py ? How? Thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Menu for anonymous and logged
Cool Anthony! Thanks!!! Fabiano. 2014-05-19 20:43 GMT-03:00 Anthony abasta...@gmail.com: Sure: if auth.user: [custom menu or append/insert into standard menu] if auth.has_membership('some_group'): [same idea here] Anthony On Monday, May 19, 2014 6:29:42 PM UTC-4, Fabiano Almeida wrote: Hi all! It's possible make differ menu for groups or logged users in models/menu.py ? How? Thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] How do I filter relationship in SQLForm?
Hi all! I have this relationship: db.define_table('tipos', Field('descricao')) db.define_table('user_ponto', Field('user_id',db.auth_user, notnull=True, default=me, readable=False, writable=False), Field('dia','datetime', default=request.now, readable=False, writable=False), Field('tipo', db.tipos, notnull=True, label='Descrição'), Field('obs','text',label='Notas')) db.user_ponto.tipo.requires = IS_IN_DB(db,'tipos.id','%(descricao)s') How do I filter relationship in SQLForm? How do I filter options of combobox of user_ponto.tipo field in SQLForm? Exemple: if test: SQLForm(db.user_ponto) # show only tipos.id==1 else SQLForm(db.user_ponto) # show only tipos.id1 Thankful, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: How to hide buttons from form
Thanks!! Fabiano. 2014-04-24 0:17 GMT-03:00 Massimo Di Pierro massimo.dipie...@gmail.com: You only have the buttons because you did not create a view for the action. On Wednesday, 23 April 2014 14:22:20 UTC-5, Fabiano Almeida wrote: Hi, How to hide buttons from form? designrequestresponsesessiondb tablesdb stats Thanks, Fabiano -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] master detail form
Hi, I'm trying to do a master detail form. It is possible that the details form is grid style? How? Thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] How to hide buttons from form
Hi, How to hide buttons from form? designrequestresponsesessiondb tablesdb stats Thanks, Fabiano -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Form Master detail
Hi, I'm trying to do a master detail form. It is possible that the details form is grid style? How? Thanks, Fabiano. -- 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 Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.