models for two tables that need to be shown
db.define_table('worker',
Field('id', type ='id'),
Field('w_organisation', type ='integer'),
Field('w_user', type ='integer'),
Field('w_status', 'reference status'),
Field('w_first_name',type='text'),
Field('w_last_name',type='text'),
Field('w_nick_name'
Rahul you use the XML helper. For instance, let's suppose I have a table
'page' with a field 'body' which I have set with ckeditor. In the view I
can do:
{{=XML(page.body, sanitize=False)}}
If you can trust the input "sanitize=False" is a good idea (for instance if
it can only be changed in the
To clean up session on my production environment I thought of calling the
sessions2trash.py this way:
nohup python ~/webapps/w2p/web2py/web2py.py -S admin -R
scripts/sessions2trash.py -A -o -x 3600 -f -v -s &
nohup python ~/webapps/w2p/web2py/web2py.py -S myleonexus -R
scripts/sessions2trash.py
14 MB is "over your limit" ?
change hosting provider.
On Wednesday, July 16, 2014 10:46:58 AM UTC+2, Annet wrote:
>
> To clean up session on my production environment I thought of calling the
> sessions2trash.py this way:
>
> nohup python ~/webapps/w2p/web2py/web2py.py -S admin -R
> scripts/sess
No, all these lines added up to 549 MB, my limit is 512 MB.
I commented out:
*/5 * * * * ~/webapps/w2p/web2py/web2py.py -S admin -R
scripts/sessions2trash.py &
*/5 * * * * ~/webapps/w2p/web2py/web2py.py -S mypynex -R
scripts/sessions2trash.py
in my cron tab, which solves the issue, however, I
Also, how do I costumize the edit view (etc. drop down menus, filed size).
The input text fields are enormous. Using set max length does not work. It
prevents the text larger then set to be inserted (but only on submit button
click it rases an error - is it possibel to create an on the fly valid
Hello! I'm having a problem: I upload a file with the following code in my
application "static" folder (I'm using PythonAnywhere):
http://fonts.googleapis.com/css?family=Nunito";>
#font {
font-family: 'Nunito', sans-serif;
font-size: 48px;
}
Text here!
Well, when I open the html fi
Hi All,
I have to install web2py as part existing VirtualHost. It is serving a few
directories, and web2py folder is one of them.
this is my settings under
WSGIScriptAlias /newstatus /srv/www/hostRoot/web2py/wsgihandler.py
AllowOverride None
Order Allow,Deny
Hello, there is a little trouble.
When I hide some fields from output by db.table.field.readable=False,
and are not rendered (as it must), but in for this
field is still rendered so it breaks the layout.
пятница, 8 ноября 2013 г., 1:01:48 UTC+4 пользователь Anthony написал:
>
> In trunk, SQ
This is not the problem. You should not close connections in web2py. web2py
may need to recycle them in the connection pool.
Can you connect to your database via other means? For example the python
shell or the web2py shell?
On Tuesday, 15 July 2014 14:08:22 UTC-5, Copper Lark wrote:
>
> I foun
did you try to inspect the log of the cron job adding a -v , i.e.
web2py.exe -S mypynex -M -R scripts/sessions2trash.py -A -o -x 3600 -f -v
?
On Wednesday, July 16, 2014 11:48:36 AM UTC+2, Annet wrote:
>
> No, all these lines added up to 549 MB, my limit is 512 MB.
>
> I commented out:
>
> */5 *
I don't see anything wrong with it (well you could use https instead of
http so it also works if you're browsing it using https). Can you clarify
exactly when does it not work? What do you mean by "when I open the page of
the uploaded file"?
--
Resources:
- http://web2py.com
- http://web2py.co
>
> workers = db(db.worker.w_organisation == 10).select(db.worker.w_id_w,
> db.worker.w_organisation, db.worker.w_first_name,
> db.worker.w_last_name,db.worker.w_nick_name,db.worker.w_email,db.worker.w_status,db.worker.w_note).as_list()
>
What is the above for? It is not used below.
> #Defin
Thanks Ron - My preferred way has always been to "log now, look later" to not
interupt the flow of the transaction/unit of work processing. Most of my "day
work"
is database programming where debugging is very limited or non-existent, and
that's the only way. (Nothing worse than staring at code an
Hell
I changed to SQLFORM.grid.
It kind of works now.
I even managed to include status as drop down in my edit view.
I created a left join on my status table.
The problem I am facing now is that when a user selects a status for worker
and clicks submit I get an error. looks like it is trying to
I am trying to run a script that I have in my app. While the log files seem
to show my script ran, it does not update the db I have for my app. On the
schedule tab in pythonanywhere I have this set up so not sure if it is
correct:
python2.7 /home/tsrdatatech/web2py/web2py.py -S ttheorydataextra
>
> #Validators
> * db.worker.w_status.requires = IS_IN_DB(db,db.status.s_code) # This
> created drop down but does not insert the right value into field*
>
Because w_status is a reference field, it must store the record ID from the
db.status table, not the s_code value (which is a text field).
Since I have access to my system's own cron service I use *external cron*
The issue seems to be that
*/5 * * * * ~/webapps/w2p/web2py/web2py.py -S admin -R
scripts/sessions2trash.py &
*/5 * * * * ~/webapps/w2p/web2py/web2py.py -S mypynex -R
scripts/sessions2trash.py &
are starting web2py and i
I have a development and a deployment environment. In development all URLs
are relative.
The issue is I have 2 applications, 1 over http and 1 over https. When I
move my
applications to production I have to add scheme= ...and host=... to all
URLs that are links
between the 2 applications. Which
Hey,
I'm doing something similar to this example:
http://examples.ractivejs.org/comments
I'm having a problem because my comment form submit button gets set to
"working..." and disabled. I sort of like it but I'd like to be able to
re-enable it.
What I have tried to do is, in the bottom of my
May this help :
http://stackoverflow.com/questions/10073434/find-this-when-using-jquery-on-with-dynamically-created-elements
??
Richard
On Wed, Jul 16, 2014 at 1:28 PM, Leonel Câmara
wrote:
> Hey,
>
> I'm doing something similar to this example:
> http://examples.ractivejs.org/comments
>
> I'
I'm not sure what all those command line parameters mean,
so I don't know if this helps,
but I run the same script on my Desktop, Raspberry Pi and PythonWhyWhere
without parameters in the following way:
# detect if I'm on PythonAnyWhere
import platform
Uname = platform.uname ()
CurDir = os.curd
I'm a great fan of LOAD, and i'm using it quite a bit to generate cool ajax
pages.
I got one issue so far though : can't seem to *cleanly* detect a mobile
device in a .load view.
For example I have a "result.load" view and I want a special mobile display
in "result.mobile.load".
I've tried to
I'm starting to think we talk two different languages (and there's a little
bit of lack of shell scripting on your side).
cron syntax is a taddle bit universal that being said there is a subtle
difference between web2py's cron and a "normal" cron (explained in the
book).
Cron is made specifi
Please show your code and the exception.
On Wednesday, July 16, 2014 4:15:27 PM UTC-4, Louis Amon wrote:
>
> I'm a great fan of LOAD, and i'm using it quite a bit to generate cool
> ajax pages.
>
> I got one issue so far though : can't seem to *cleanly* detect a mobile
> device in a .load view.
Sure. It's fairly simple tho since the Exception gets raised on line 1 of
my LOADed view.
Views/default/search.html:
...
{{ =LOAD('service', 'serv1') }}
...
Controllers/service/serv1:
response.view = "service.load"
def serv1():
return dict()
Views/service.load :
{{ is_mobile = request
Hi Annet,
I'm also with webfaction and do my session cleanups like this: (this is one
line in the crontab):
# Delete sessions that are older than 1 day from the disk.
18 1 * * * /usr/local/bin/python2.7 /home/my_username/webapps/my_w2p_app_dir
/web2py/web2py.py --nogui --no-banner -S myweb2pyap
On Tuesday, July 1, 2014 6:46:29 AM UTC-7, Andrey K wrote:
>
> Dear web2py users,
> I have a straight forward need in trigger submit action of sqlform outside
> of form div - by clicking other button and hide original submit button on
> the form.
> Can I do it and how?
>
I'm going to guess th
Pydev on top of eclipse is very strong. Pydev is evolving fast. I use pycharm
pro (which is web2py aware), the community edition is worth trying. The web2py
book has tips on using IDEs which are not web2py -aware.
Web2py's IDE is improving too, every time I look it is getting better.
--
Resour
Note, you are using a non-Ajax component. I'm not sure why
request.user_agent isn't defined in that case, but there are some funky
things going on with non-Ajax components, so I would instead recommend
using Ajax components:
{{=LOAD('service', 'serv1', ajax=True)}}
Feel free to file a Google C
You could use "display:none" but what if the user hits enter instead?
On Tuesday, July 1, 2014 9:46:29 PM UTC+8, Andrey K wrote:
>
> Dear web2py users,
> I have a straight forward need in trigger submit action of sqlform outside
> of form div - by clicking other button and hide original submit b
you might need to db.commit() after the delete().
versioning might be doing a commit() for you.
On Tuesday, July 15, 2014 9:05:09 AM UTC-5, samurai wrote:
>
> No, I hadn''t. But it worked on turning it on. Thanks
> But I don't get it. Record versioning just creates an archived db for the
> modifi
Thanks! Leonel. That helps. :-)
Cheers, Rahul.
On Wednesday, July 16, 2014 1:55:50 PM UTC+5:30, Leonel Câmara wrote:
>
> Rahul you use the XML helper. For instance, let's suppose I have a table
> 'page' with a field 'body' which I have set with ckeditor. In the view I
> can do:
> {{=XML(page.
http://www.reddit.com/r/Python/comments/2awyjd/web2py/
--
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 subscribe
Hello Austin,
I apologize I have overlooked your message and I would like to help with
the problem. There seem to be thre distinct problems:
1) In your original post the "web2py_session_runstone.table" was there but
the database had no knowledge of the table. This can only happen if the
table i
I will try this, i already have a python script that parsers a file and
converts to dsv to then add to db, this is the script i am trying to run,
once a upload a file.
On Saturday, July 12, 2014 3:40:10 AM UTC-4, Massimo Di Pierro wrote:
>
> for example, let's say you want to upload text files.
>
> well you could use https instead of http so it also works if you're
> browsing it using https
I'm not sure if it's what you are talking about, but the url already is
https, If I try delete this final s and reload the page, the url backs to
be https. Moreover I uploaded the same file in two
Hello,
I at one point had smart_query working correctly (at least it seemed) with
SQLFORM.grid but after having some issues with my database I had to rebuild
some parts and it seems I cannot for the life of me get the smart_query
functionality working again to have it show with SQLFORM.grid. B
I have developed a web2py application that I want to run as a native
windows app. Meaning when they click an icon, it launches a browser and
runs the application. I was wondering if there is instructions somewhere on
how to do this. Also, I have two local files that I call into my app. Right
no
Hi all,
I started using web2py a week ago with little MVC experience. I have a
page displaying a database table using a SQLFORM.grid() where each row has
buttons to extend a time variable or delete the row. I want to add a
pop-up prompt which asks the user why they are extending the time vari
Thanks to a guy from the Stack Overflow, I tried change the third line to
**, removing "http" from
href, and it worked. Thank you anyway Leonel.
Em terça-feira, 15 de julho de 2014 19h37min49s UTC-3, Thiago Duarte
escreveu:
>
> Hello! I'm having a problem: I upload a file with the following cod
name 'step' is not definedVersionweb2py™Version
2.9.5-stable+timestamp.2014.03.16.02.35.39PythonPython 2.7.8:
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
(prefix: /Library/Frameworks/Python.framework/Versions/2.7)Traceback
1.
2.
3.
4.
5.
6.
7.
42 matches
Mail list logo