How do I keep session.flash and response.flash from doing their things when
I don't want to? Specifically I don't want the messages popping up after a
user logs in or when they make a new entry to the DB.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
you can't mix python formatting directly in the select
fetch the values first and transform them later using strptime and strftime.
BTW: if startdate is a 'datetime' field you just need to strftime it later.
On Monday, December 30, 2013 6:04:39 AM UTC+1, software.ted wrote:
I have a
as you do with the normal one. either you use ssh forwarding or you
enable ssl
On Sunday, December 29, 2013 10:02:52 PM UTC+1, Arnon Marcus wrote:
How can I access the admin app in remote (non localhost) server, when
hosting via gevent?
--
Resources:
- http://web2py.com
-
the XML function solved the problem:
{{for i, row in enumerate(rows):}}
{{=DIV(XML(T(row.table_field), sanitize = True) ) }}
{{pass}}
thanks.
On Mon, Dec 30, 2013 at 3:29 AM, 黄祥 steve.van.chris...@gmail.com wrote:
another way around is define it on the represent for your table text field.
After adding some input validation I've realized that the calendar widget
is not popping up. Is there anything I need to add to the controller or
elsewhere?
form=FORM(TABLE(...TR(Admission Date: ,INPUT(_name='adm_date',widget=
SQLFORM.widgets.date.widget,requires=IS_DATE()))...
--
Resources:
In my Case it says
'str' object has no attribute 'filename'
--
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
After adding some input validation I've realized that the calendar widget
is not popping up. Is there anything I need to add to the controller or
elsewhere?
I suspect there's no widget option for the INPUT objects, unless it was
added and was not updated in examples:
How do I keep session.flash and response.flash from doing their things
when I don't want to? Specifically I don't want the messages popping up
after a user logs in or when they make a new entry to the DB.
For processing forms, you can disable the message_something option in
.process()
HELP PLEASE!
Could you post the relevant part of code that throws the error? What
version of web2py are you running?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list
I tested these functions in Safari, in Safari everything works as before.
Does anyone have an idea what changed in Firefox and how to solve this
issue?
Does it actually redirect (does it open the new location)? You can check
the response output with the firefox console (Ctrl+Shift+K)
--
I have an app running on MySQL , I want to use mongoDB instead.
I want to help on migration from mysql to mongoDB.
Thanks,
regards,
Tushar Tuteja
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
I have an app running on MySQL , I want to use mongoDB instead.
I want to help on migration from mysql to mongoDB.
Thanks,
Beware that mongodb adapter is in an experimental stage of development, so
you should know what you are doing before migrating. I suppose there are
lots of howtos
How do I do that?
I tried the anyserver -h flag, but there was nothing there about it...
--
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
Hey,
Thanks for the answer. Luckily there are no joins, but I need to see what
web2py features of DAL won't work.
Thanks,
Regards,
Tushar Tuteja
On 30 December 2013 16:44, Alan Etkin spame...@gmail.com wrote:
I have an app running on MySQL , I want to use mongoDB instead.
I want to help on
Fantastic
http://bramp.github.io/js-sequence-diagrams/
--
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
Thanks for the answer. Luckily there are no joins, but I need to see what
web2py features of DAL won't work.
To my knowledge, you cannot use the scheduler or Auth.accessible_query,
everything else not requiring join queries should work.
--
Resources:
- http://web2py.com
-
how do you connect to the admin app when it's served by rocket ? the same
way goes for the gevented webserver (or anyserver.py).
ssh forwarding
ssh -L localport:host:hostport user@ssh_server
On Monday, December 30, 2013 1:06:35 PM UTC+1, Arnon Marcus wrote:
How do I do that?
I tried the
thanks anthony,
but did not works... the result was a file with no name with None printed
at the first page
2013/12/29 Anthony abasta...@gmail.com
You are attempting to return a pyrtf.Document object, but instead you must
stream a file or file-like object. You have to render the document
What happens if you move doc.Sections.append ( section ) after the line
that says section.append( p ) ?
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 at the first page
My understanding is that:
- github repo for the book app has the latest content
- the online book app is somewhat regularly updated from the github repo
- the pdf is generated only when the actual book gets published.
So once the 6th edition gets out, the pdf will reflect this, not before.
Please try to add to the INPUT the class date:
form=FORM(TABLE(...TR(Admission Date: ,INPUT(_class='date',_name=
'adm_date',widget=SQLFORM.widgets.date.widget,requires=IS_DATE()))...
Il giorno lunedì 30 dicembre 2013 09:48:06 UTC+1, Keith Planer ha scritto:
After adding some input validation
I have no idea what ssh forwarding is, or whatever it is you wrote here-I can
look it up.
I am not a linux wiz by any means, nor an operations guy - just learning things
as I go as I need them.
I understand that the admin app, by default, requires a secure channel, for ano
non localhost usage.
That fixed it, Paolo, thanks!
On Mon, Dec 30, 2013 at 8:33 AM, Paolo Caruccio
paolo.carucci...@gmail.comwrote:
Please try to add to the INPUT the class date:
form=FORM(TABLE(...TR(Admission Date: ,INPUT(_class='date',_name=
Hi,
I have this on the view:
div
input name=name onkeyup=ajax('org_form_load.load', ['name'],
'org_form_target') /
/div
div id = org_form_target/div
and something like this on the controller:
def org_form_load():
org_code = request.vars.name
org_code_name =
Sorry, a couple mistakes in the code. This should do it:
def generate_doc():
from gluon.contrib.pyrtf import *
import cStringIO
doc = Document()
ss = doc.StyleSheet
section = Section()
doc.Sections.append( section )
p = Paragraph(
The form is not accepted when it is first created, so you will always get
that error message. Instead, you want:
elif form.errors:
response.flash = 'There was an error..'
Anthony
On Monday, December 30, 2013 10:21:58 AM UTC-5, Avi A wrote:
Hi,
I have this on the view:
div
Hi. How do I define question_types (ie text, radio, checkbox) in a table?
db.define_table('question',
Field('title'),
Field('question_type', ??? ))
Do I list them somewhere or do I create a field for all three options?
I want to be able to choose the question type while creating a
nope. anyserver does not provide ssl capable webserver, 'cause most of the
engines leave SSL out of the picture (i.e. since usually you'd want them
behind a real webserver that acts as a proxy, like apache or nginx, SSL
is managed there and not by the python engine).
That being said, I think
On 30 Dec 2013, at 7:31 AM, Anthony abasta...@gmail.com wrote:
Sorry, a couple mistakes in the code. This should do it:
There's a pyrtf example in the book
http://web2py.com/books/default/chapter/29/10/services?search=pyrtf#PyRTF
that uses a helper (dumps) and apparently returns a string. I
# radio
Field('question_type', widget=SQLFORM.widgets.radio.widget, requires=
IS_IN_SET(['option A','option B'])
#checkboxes
Field('question_type', widget=SQLFORM.widgets.checkboxes.widget, requires=
IS_IN_SET(['option A','option B','option C'])
#textarea
Field('question_type', 'text')
#text
Thanks,
It solved the error getting after the form is loaded into the page,
but still nothing happen if I submit the form.
This is what I do:
if form.process().accepted:
response.flash = 'Success!'
elif form.errors:
response.flash = 'response errors'
On Monday, December
One other small problem, the field doesn't allow for nothing to be entered
now. How do I make it optional?
On Monday, December 30, 2013 8:33:34 AM UTC-6, Paolo Caruccio wrote:
Please try to add to the INPUT the class date:
form=FORM(TABLE(...TR(Admission Date: ,INPUT(_class='date',_name=
Nevermind, found it.
requires=IS_EMPTY_OR(IS_DATE())
On Monday, December 30, 2013 11:31:36 AM UTC-6, Keith Planer wrote:
One other small problem, the field doesn't allow for nothing to be entered
now. How do I make it optional?
On Monday, December 30, 2013 8:33:34 AM UTC-6, Paolo Caruccio
The form won't get submitted to the org_form_load action, but instead will
get submitted to the action of the parent page. You have to trap the form
submission and submit back to the org_form_load action. Rather than using
the ajax() function to load a form, you're better off loading the form
Thanks. I will look into it.
Happy new year! and thanks for all the awesome support!
On Monday, December 30, 2013 7:47:48 PM UTC+2, Anthony wrote:
The form won't get submitted to the org_form_load action, but instead will
get submitted to the action of the parent page. You have to trap the
thanks anthony!!
works!
but one more thing, is it possible create a rtf template and send
parameters to the template?
rgsd,
Diego
2013/12/30 Anthony abasta...@gmail.com
Sorry, a couple mistakes in the code. This should do it:
def generate_doc():
from gluon.contrib.pyrtf import *
How is the name (input value) is passed in this component template/case?
(i click the code and the form won't load into the page.).
On Monday, December 30, 2013 7:49:32 PM UTC+2, Avi A wrote:
Thanks. I will look into it.
Happy new year! and thanks for all the awesome support!
On Monday,
Fantastic indeed.
On Monday, 30 December 2013 06:14:29 UTC-6, Ramos wrote:
Fantastic
http://bramp.github.io/js-sequence-diagrams/
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
If you want more questions with different types in the same form you
could be interested to read this discussion
https://groups.google.com/forum/#!topic/web2py/FAvjWNUiC3Y
Il giorno lunedì 30 dicembre 2013 18:01:04 UTC+1, Paolo Caruccio ha scritto:
# radio
Field('question_type',
On Saturday, December 28, 2013 7:18:27 AM UTC-8, Cliff wrote:
Dave
Just wanted to give you an update. I have it working for now and will play
with some other features in the future. I tried uploading it to GAE but it
was being a pain so I threw it on a old web page of mine.
Oops, sorry. You'll need to do something more sophisticated. Create an
onkeyup handler that retrieves the value in the input and appends it to the
URL of the form action (i.e., /default/org_form_load.load/some_name). Then
call $.web2py.component() with that URL, and in the org_form_load action,
ok thanks.
On Monday, December 30, 2013 8:24:04 PM UTC+2, Anthony wrote:
Oops, sorry. You'll need to do something more sophisticated. Create an
onkeyup handler that retrieves the value in the input and appends it to the
URL of the form action (i.e., /default/org_form_load.load/some_name).
On Saturday, December 28, 2013 9:13:33 PM UTC-8, Massimo Di Pierro wrote:
Your application will be in a folder web2py/applications/yourapp. You
can use any version control system you like for the content of that folder.
this is orthogonal to web2py.
I do like the integration in the admin
If you generally don't want flash messages, you can remove the
response.flash code from layout.html. If you want to prevent specific
messages, you can do so via the arguments to SQLFORM. For Auth messages,
you can do things like:
auth.messages.logged_in = None
SQLFORM and Auth set the
Cool, thanks.
I have been using putty and winSCP pretty extensively for about a year now -
but I won't even need that to access the web2py app files, because I managed to
get a samba server up and running...
What I meant by 'accessing the admin app', was that when we have a
server-error, we
I have noted that mysql stores its dates as %Y-%m-%d, i would like to
know if the Field() or any DAL method is available to change the date to
%d/%m/%Y when doing a select?
--
...
Teddy Lubasi Nyambe
Opensource
I'm having the same problem, but I'm struggling with saving the database.
The corrupted field is a 'date' type.
On Wednesday, May 27, 2009 1:15:36 AM UTC-5, ニコノコ wrote:
I found the source of my problem. I have records with null values. And
since sqlite don't enforce data typing, I assume
stop right there, I see a lot of confusion going around :-P
unless in sqlite, where dates are stored as strings and parsed back,
datetimes in other engines are stored as datetimes (meaning, not strings).
the %Y-%m-%d notation is the ISO format (i.e. a default way to represent a
date as a
if you're using putty then why don't you use port forwarding ? that's
definitely the easier (and secure) way to go.
summary: using putty, go to connections--ssh--tunnels, put *8000* (or
whatever port gevent is listening to) into source port, put
*localhost:8000*into destination and voilà.
That sounds totally cool!
Didn't know this can be done...
On Mon, Dec 30, 2013 at 10:14 PM, Niphlod niph...@gmail.com wrote:
if you're using putty then why don't you use port forwarding ? that's
definitely the easier (and secure) way to go.
summary: using putty, go to
It works only till the alert...
script
function insert_component(org_code)
{
alert(org_code);
$.web2py.component('%s', 'org_form_target'); % URL('default',
'org_form_load.load/org_code');
}
/script
On Monday, December 30, 2013 8:27:00 PM UTC+2, Avi A wrote:
ok thanks.
On Monday, December
$.web2py.component('%s', 'org_form_target'); % URL('default',
'org_form_load.load/org_code');
is actually Python code that generates Javascript, so you cannot use it as
you are using it. Instead, I would create the url variable separately:
function insert_component(org_code)
{
alert(org_code);
I was in the direction in one of the tries...
Thanks.
On Monday, December 30, 2013 11:17:44 PM UTC+2, Anthony wrote:
$.web2py.component('%s', 'org_form_target'); % URL('default',
'org_form_load.load/org_code');
is actually Python code that generates Javascript, so you cannot use it as
you
Links I build with the anchor A html helper look like:
a href=/myapp/mycontroller/view/5 data-w2p_disable_with=defaultAnchor
Text/a
What is the purpose of the data-w2p_disable_with = default attribute and
how can I remove it?
--
Resources:
- http://web2py.com
- http://web2py.com/book
That's so the link can be temporarily disabled (the text will be replaced
with Working...) when it is used to trigger an Ajax request. However, I
don't know why it's included in the anchor tag in all cases -- seems like
it would only be needed when the cid, component, or callback
arguments are
Hi Niphlod,
Am building a one page Ajax app using dhtmlx and web2py as the backend
engine so for it's working excellent can share the code when done. So most
of the dhtmlx UI elements like talking in json. So I hv represented my
dates as %d/%m/%Y so the UI expects me to give back a date in that
I am trying to make a tiny example to login my app via google oauth2.
However, I always got This webpage has a redirect loop error from the
browser if I use @auth.requires_login() pragma.
Model Code:
from gluon.contrib.login_methods.oauth20_account import OAuthAccount
57 matches
Mail list logo