Should I create a sudoer user = www-data with all root priveleges in my
Ubuntu machine?
Would that fix the pymongo not found and the permission problems when
running web2py with nginx server?
Thanks
On Tuesday, May 20, 2014 11:11:07 PM UTC-6, Cynthia Butler wrote:
Finally - It works if I run
Hi,
In Firefox, I tested your TAG in one of my views and it displays both the
glyphicon and 'test'.
The glyphicon and 'test' weren't aligned properly, which is solved making
'test' a
button attribute:
{{= TAG.BUTTON(
SPAN(_class='glyphicon glyphicon-th'),
'test',
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():
You can pass group names with the -K argument, when you start the process.
When you queue a task, you must pass in the group_name parameter to
reserve that task for a specific worker.
BTW: did you at least tried to
read http://web2py.com/books/default/chapter/29/04/the-core#web2py-Scheduler
In the URL() call, add scheme=True, host=True.
--
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
Does the sys.path looks right to you?
It does if the pymongo driver is installed at one of the folders listed. As
you have described in late posts, you seem to have an issue with directory
permissions. I belive that running web2py with root permissions can solve
it.
--
Resources:
-
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
Thanks, Annet. I helps to know that it works for you. Since I'm not
starting raw, but rather trying to migrate from jQuery UI, I wouldn't be
surprised if something else was interfering with the code. I've tried to
rip out all the old jQuery UI stuff, but maybe there's something lurking in
the
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)
-
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
I'am trying to login to the web2py admin interface but my password is not
been accepted. I'm pretty sure that the password is correct. Can anyone
help me with this issue.
Thanks
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py
Hi,
I am trying to access the contents of a post request made to a url on my
website.
To test this I have been trying to send post requests to a url on my
website to see I if am able to get the data from the post.
Does anyone know how I can access the post data? am I accessing it correctly
by
I have problem that on the admin login page my password is not been
accepted. I'm pretty sure that I've entered the correct password. If anyone
have faced the similar issue and can help me with this.
Thanks
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
thank you stifan, represent is what I needed to know and your example
worked perfect.
My primary problem is that i am not able to see my other table in
SQLFORM.grid. Here I try to create two columns; one from db.contact and the
other from db.task.
Can my error be noticed?
On Tuesday, May
Actually, I've created this form factory to upload 1 to 4 images at the
same time and that's why I named the field image_1, image_2, ... After
form passes validation, I manually insert the file in db.imagebiens table.
The new file name being stored in image field.
So how can I achieve this
When I iterate through the controller as this:
def return_post:
form = SQLFORM(db.post)
for c in form:
form1= post.body
form2 = form1.split()return dict(form2=form2)
I get an error that form2 is not defined in the view{{=form2}}.
How do i define this form2?
--
Hi Andrew,
The JSON output is attached (I just grabbed the first 250 lines of some
public data).
My controller code:
def dashboard_data():
dashboard_data = db().select(db.com_house_stock.CompanyNumber,
db.com_house_stock.IncorporationDate, db.com_house_stock.CompanyCategory,
How did you started web2py?
2014-05-21 2:36 GMT-03:00 shubham agarwal shubhamagarwal...@gmail.com:
I'am trying to login to the web2py admin interface but my password is not
been accepted. I'm pretty sure that the password is correct. Can anyone
help me with this issue.
Thanks
--
El Tue, 20 May 2014 15:27:29 -0700 (PDT)
Cory coryb...@gmail.com escribió:
Hi,
I am trying to access the contents of a post request made to a url on
my website.
To test this I have been trying to send post requests to a url on my
website to see I if am able to get the data from the post.
El Wed, 21 May 2014 03:01:46 -0700 (PDT)
Maurice Waka mauricew...@gmail.com escribió:
When I iterate through the controller as this:
def return_post:
form = SQLFORM(db.post)
for c in form:
form1= post.body
form2 = form1.split()return dict(form2=form2)
I get
please try (not tested), the bold are the change of your initial code above
Model
db.define_table('contact',
Field('email',
*represent = lambda email, field: \A(email, _title = T(View
email), _target = _blank, _href = mailto:%s; % email) if email else ''*),
Many thanks for your talk Anthony. It was really very useful for me.
Particularly with the addition of these files. Working inside ipython
notebook will be a real asset. By the way for windows users the magic
python file should go in
c:/users/your_name/.ipython/profile_default/startup
Thanks, Annet. It helps to know that it works for you.
You're welcome.
Since I'm not starting raw, but rather trying to migrate from jQuery UI, I
wouldn't be surprised if something else was interfering with the code. I've
tried to rip out all the old jQuery UI stuff, but maybe there's
Here is what I want to do.
I have several divs with date field inside them. It uses the Web2py
calendar widget.
I want to trap the onSelect event for the calendar widget and trigger an
ajax call when that happens. I know I can put a fake submit button next to
the calendar widget and trigger
Yes I did read the docs several times. And I'm not doubting you since you
have been right every time I've asked a question haha...but I still don't
see it. From the documentation the prototype when scheduling a task is:
scheduler.queue_task(
function,
pargs=[],
pvars={},
Hi, I need some help, when I call a view with .pdf this:
html
head
titleReport/title
/head
body
table
tr
td width=50%name/td
td width=50%pepe/td
/tr
/table
/body
/html
or this:
body
table
It uses pyfpdf to convert it.
But there are some restrictions as I remember.
You check it here https://code.google.com/p/pyfpdf/
2014-05-21 12:13 GMT-03:00 Carlos Cesar Caballero Díaz
desarro...@spicm.cfg.sld.cu:
Hi, I need some help, when I call a view with .pdf this:
html
head
Yes, pyfpdf has a basic html parser (based on python stdlib) and needs some
conventions to translate tables to PDF.
Could you make a minimal example to test and debug it?
That way it would be easy to reproduce and see how to adapt the html to be
rendered.
You can look at the documented examples,
maybe the cool line is this
- all other scheduler_task columns can be passed as keyword arguments;
the most important are shown.
however. a task has group_name (it can be assigned to one and only one
group), while the scheduler has group_names (multiple groups allowed).
if you
I'm still getting nowhere. I've gotten rid of all the jquery UI stuff so
I'm down to some raw Bootstrap. I suspect it's not picking up the
glyphicons files. Where are your glyphicon .png files residing?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Solved - it depends on how I start/restart web2py with the nginx server (on
ubuntu machine)
Wrong - Don't do this:sudo /etc/init.d/nginx start
Correct - DO THIS WAY:touch/etc/uwsgi/web2py.ini
I had forgotten this. I found it by looking at the last 4 lines of the
Thanks Mariano and Carlos, there is a simple code:
controller default.py:
def pdf_test:
return dict(hello=hello)
view default/pdf_test.html:
body
h1{{=hello}}/h1
pThis is a text/p
table width=100%
thead
tr
th width=40%name/th
I've seen this. My leaky memory says pyfpdf doesn't like percentages. Try
absolute units and I think it will work.
On Wednesday, May 21, 2014 1:04:58 PM UTC-4, Carlos Cesar Caballero Díaz
wrote:
Thanks Mariano and Carlos, there is a simple code:
controller default.py:
def pdf_test:
It seems to be a web2py issue: generic view is sanitizing the html to much,
so it is removing needed attributes (align, widht, etc.).
A workaround to bypass generic html sanitization is calling pyfpdf directly:
def pdf_test():
import os
from gluon.contrib.fpdf import FPDF, HTMLMixin
Hello,
I am searching a way to make URL() return an address with HTTPS instead
of plain HTTP. I didn't find a way to do that...
There is :
request.is_https
request.requires_https()
But they seem to be for preventing access to plain HTTP.
So, that mean that URL() always redirect to HTTP and
URL() generates relative links by default. No http or https...plain
/app/controller/function links.
that being said, URL has scheme and host parameters that can generate
absolute links.
Back to the performance side. Usually the redirection from http to
https is required at the very first
Hello All
I am running my web2py app over apache. At backend I start a a web2py
scheduler using *python web2py.py -K my-app*. When I do a *ps -ef* on
my console, before adding any task to the queue, I see a single process
being created for the scheduler. When I add task to the queue and as
I see in this forum that some folk have wanted to migrate uploads stored
in the file system to uploads stored in the database.
Massimo has shown a simple piece of code to assist that migration.
I think I have the opposite requirement.
Firstly
I had assumed that storing uploads in the file
Yes, the posted variables should be in request.vars (more specifically, you
should use request.post_vars, as request.vars also combines data from
request.get_vars, which are the query string variables).
Anthony
On Tuesday, May 20, 2014 6:27:29 PM UTC-4, Cory wrote:
Hi,
I am trying to access
def post_sender():
redirect(URL('youController','post_receiver',
vars=dict(myvar=someValue)))
return dict()
Note, that will not make a post request -- it just puts the variables in
the query string. Also, the return line is unnecessary, as it will never
be
Update, as a test, I pulled one banner image like this
def pullimage():
row=db(db.myimages.id==100).select().first()
filen=open(os.path.join(request.folder,'static',row.banner),'a')
filen.write(row.banner_image)
filen.close()
return
This seems to have stored the image just
Hi,
I am using cascading drop-down based on the slice posted on
http://www.web2pyslices.com/slice/show/1526/cascading-drop-down-lists-with-ajax-2;.
In my application, the number of sub-records for drop-down are typically in
range of 50-60, so every-time I change the first option in drop down,
Thanks Mariano, I am working with your solution right now.
El 21/05/14 14:25, Mariano Reingart escribió:
It seems to be a web2py issue: generic view is sanitizing the html to
much, so it is removing needed attributes (align, widht, etc.).
A workaround to bypass generic html sanitization is
43 matches
Mail list logo