ursday, 6 September 2018 13:16:32 UTC+1, Simona Chovancová wrote:
>>
>> Hello.
>> I have a backend function that is supposed to stream a pdf file, but not
>> instantly download it. It's being called like this
>> .../function_to_create_pdf/323, where the number is som
Hello.
I have a backend function that is supposed to stream a pdf file, but not
instantly download it. It's being called like this
.../function_to_create_pdf/323, where the number is some ID. I create a
FPDF stream and make function return this
response.headers['Content-Type'] = None
return
Hello, I am trying to use scheduler for the first time in my app and I
cannot get it to work. Tables for scheduler are never really created. This
is my model scheduler.py:
from gluon.scheduler import Scheduler
from gluon import current
scheduler = Scheduler(
storage.mailer_db,
Hello, I have a problem with select.. I have these tables defined:
db.define_table(
'email',
Field('recipient', 'string', notnull=True),
Field('subject', 'string', length=256, notnull=False),
Field('body', 'text', notnull=False),
solved, ran worker in different application than the task was sent from
On Tuesday, February 6, 2018 at 2:34:24 PM UTC+1, Simona Chovancová wrote:
>
> Hello,
>
> I'm having trouble using the scheduler. I have managed to set it up to
> queue tasks and successfully complete
Hello,
I'm having trouble using the scheduler. I have managed to set it up to
queue tasks and successfully complete them. Although, that only works if I
do not use database. If I include db in function that is tasked, I get this:
Traceback (most recent call last):
File
figured out no longer needed
On Wednesday, November 22, 2017 at 12:49:23 PM UTC+1, Simona Chovancová
wrote:
>
> Hello.
>
> I have a form in web2py that controls editing and adding new user. But
> some fields need different requirements based on when user is being added
>
Hello.
I have a form in web2py that controls editing and adding new user. But some
fields need different requirements based on when user is being added or
edited. Can I somehow change field requirements in view? I can only detect
this in view. So far I came up with something like this, but it
I need to make a select like this:
*db(db.table.id == 1).select(db.table.name, db.table.date).first()*
but what attributes need to be selected always change so I'd need something
like this:
*selects = (db.table.name, db.table.date, ..)*
*db(db.table.id == 1).select(selects).first()*
But this
Update: My mistake, I had bad routes, solved
On Monday, September 11, 2017 at 9:18:56 AM UTC+2, Simona Chovancová wrote:
>
> I am trying to use *response.optimize_js = 'concat,minify,inline' *and
> *response.optimize_css
> = 'concat,minify,inline' *in 10_db.py in order to opti
I am trying to use *response.optimize_js = 'concat,minify,inline' *and
*response.optimize_css
= 'concat,minify,inline' *in 10_db.py in order to optimize my code, but it
gives me this error:
Traceback (most recent call last):
File "/srv/www/web2py/gluon/restricted.py", line 227, in restricted
nvalid_password).
>
> Anthony
>
> On Wednesday, September 6, 2017 at 6:08:00 AM UTC-4, Simona Chovancová
> wrote:
>>
>> I have a table defined like this:
>>
>> form_change_password = auth.change_password()
>> form_change_password.element
I have a table defined like this:
form_change_password = auth.change_password()
form_change_password.element(
'input', _name='old_password')['_id'] = 'form-4'
form_change_password.element(
'input', _name='new_password')['_id'] = 'form-5'
form_change_password.element(
in -- you must log in again
> to be re-authenticated.
>
> Anthony
>
> On Friday, August 25, 2017 at 2:00:55 AM UTC-4, Simona Chovancová wrote:
>>
>> Apparently some other code I had in controller was breaking functionality
>> of this, now I reached the point when it a
Apparently some other code I had in controller was breaking functionality
of this, now I reached the point when it actually displays the remember
button, although upon successful login and log out it doesn't actually
remember my info and nothing gets filled into the login form.
On Thursday,
Hello, I'm trying to add remember_me option to my auth login form and so
far it looks like this:
controller.py
def index():
auth.settings.remember_me_form=True
auth.settings.long_expiration = 3600*24*30
form = auth()
return dict(form=form)
view.html
{{=form.custom.begin}}
I need to change selected option in the view, I know that to change input
value I do it like this: {{form.element('input', _name='field')['_value'] =
"new_value"}}, but how do I do this with select? Also, this needs to be
done in view, not controller so I cannot use default='some_option'.
Any
Thank you!
On Wednesday, August 9, 2017 at 1:08:12 PM UTC+2, Leonel Câmara wrote:
>
> requires=ANY_OF([IS_LENGTH(minsize=9, maxsize=9), IS_LENGTH(minsize=13,
> maxsize=13, error_message='Must be 9 or 13 characters')])
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
I need to set my tel_num field requirement to be of length 9 or 13, yet I
only found a way how to do this from 9 to 13 or specifically just one of
these.. How can I set it to 9 or 13?
Thanks!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
entire page into the f2 div and
inserted no dict... Where did I go wrong?
On Thursday, August 3, 2017 at 11:01:00 AM UTC+2, Simona Chovancová wrote:
>
> Hello!
>
> I need to call controller function from a jquery script in view and store
> the returned dict into some variable. Looks
Hello!
I need to call controller function from a jquery script in view and store
the returned dict into some variable. Looks something like this:
controller.py
def my_function():
return dict()
my_view.html
jQuery(document).ready(function(){
var my_dict = ...
});
Any help
Thank you so much!
On Thursday, July 27, 2017 at 3:03:17 PM UTC+2, Leonel Câmara wrote:
>
> You need to set content-type to pdf.
>
> response.headers['Content-Type'] = 'application/pdf'
>
> before returning response.stream
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book
I need to place a button which opens an online PDF and so far I have this
in reg.py controller
def streamable():
data = urllib2.urlopen("http://www.pdf995.com/samples/pdf.pdf;)
return response.stream(data, 4096)
And this in the view
{{=A('open file', _class="btn btn-sm",
So I have a form with field which looks like this. I want the error message
to display in red though, how do I do it? Thanks.
edit_user_form= SQLFORM.factory
(
Field('name', 'string', requires=IS_NOT_EMPTY(error_message='Enter
your name'))
)
--
Resources:
- http://web2py.com
-
24 matches
Mail list logo