On Tuesday, April 25, 2017 at 9:19:59 AM UTC-5, Anthony wrote:
>
> On Tuesday, April 25, 2017 at 3:20:23 AM UTC-4, Jim Russell wrote:
>>
>> I worked around this by setting the wltype field to string and adding
>> a requires=IS_IN_SET. This makes the editing page have a d
I worked around this by setting the wltype field to string and adding
a requires=IS_IN_SET. This makes the editing page have a dropdown with the
set members instead of a free-form text field.
So it's working, but it's not the most elegant solution.
--
Resources:
- http://web2py.com
- http://we
Hi all.
I'm having an issue with an SQLFORM.gird query. I have a table where one of
the columns references another table. Here are the table definitions:
db.define_table('osrwhitelistpool',
Field('id', type='id'),
Field('pool', type='string', length=255, unique=True),
Field('wltype',
In your example, list_chart is not a list of strings, it is a list of
tuples.
In my code, hostnames is just a list of hostnames. e.g.
('hostname1.example.com','hostname2.example.com')
I assume that you are trying to make the checkboxes default to true. For
me, they defaulted to being checked.
Rob,
I used this code to get a list with checkboxes.
form=SQLFORM.factory(
Field('hostnames',"list:string",
default=hostnames,widget=SQLFORM.widgets.checkboxes.widget,requires=[IS_IN_SET(hostnames,multiple=True),IS_NOT_EMPTY()]))
hostnames is a list containing strings.
--
Resource
ot;amazon","localhost"]
>>
>> marcados = request.post_vars["host"]
>>
>> return dict(host_names=host_names,marcados=marcados)
>>
>> The view:
>>
>>
>> {{for host in host_names:}}
>> {{=host}}
>>
Hi.
I have created a form which takes a list of hostnames and shows the
hostnames with checkboxes next to it. The idea is to be able to uncheck any
hostnames and pass the still checked hostnames to another function which
will then act on that list of hostnames. The problem is that it just
retu
>
> $ ps aux | grep "uwsgi"
> richard 1044 0.0 0.1 4276 1824 pts/0S+ 10:54 0:00 grep
> --color=auto uwsgi
>
That is the grep process, not uwsgi. So uwsgi is not running.
Check in /var/log/nginx/ for any messages about uwsgi
--
Resources:
- http://web2py.com
- http://web2py.
Yea I have the user/pw correct, the smtp settings seem pretty straight
forward as well so not sure what the root cause is.
On Friday, February 12, 2016 at 4:10:20 PM UTC-5, Dave S wrote:
>
>
>
> On Friday, February 12, 2016 at 12:17:57 PM UTC-8, Tom Russell wrote:
>>
>>
:
>
> web2py uses smtplib. as long as on the other side there's an
> smtp-compatible interface, there's no reason to blame web2py :P
>
> On Friday, February 12, 2016 at 8:38:38 PM UTC+1, Tom Russell wrote:
>>
>> I have since my last time trying to get email
I have since my last time trying to get email sending working with the
built in registration process moved to Amazon AWS SES mail services which I
know works well with other people. I have put in all the required info in
db.py needed but still cannot send an email. I have tried gmail, a few
oth
service
> use the site and the problem
>
> Il giorno sabato 9 gennaio 2016 22:52:17 UTC+1, Tom Russell ha scritto:
>>
>> Yea I have a premium account with pythonanywhere.
>>
>> On Saturday, January 9, 2016, Alessio Varalta wrote:
>>
>>> Maybe is a pr
gt; Il giorno sabato 9 gennaio 2016 21:41:31 UTC+1, Tom Russell ha scritto:
>>
>>
>> Hi,
>>
>> I have everything in place according to the docs to do the email
>> registration process. However every time I try it in the error log it just
>> says email not sen
Hi,
I have everything in place according to the docs to do the email
registration process. However every time I try it in the error log it just
says email not sent and then a print out of what the email would have
looked like had it been sent. I have no idea why I cannot get this to work.
I
>
> On Monday, August 18, 2014 11:09:37 AM UTC-4, Tom Russell wrote:
>>
>> I have some simple code that is suppose to grab data from a row in my db
>> table.
>>
>> I do it like:
>>
>> row = db(db.voltrin.startdate == mydate).select()
>> vwtrin = r
I have some simple code that is suppose to grab data from a row in my db
table.
I do it like:
row = db(db.voltrin.startdate == mydate).select()
vwtrin = row.vw_trin
I have run this and verified mydate and whatever other variables I have are
something other than null but I cannot seem to get th
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
I want to use a few parts from a layout for web2py
here
http://www.web2py.com/layouts/static/plugin_layouts/layouts/CorporateOffice/index.html
Mainly I just want the for my layout.html. I tried
adding this but it does not seem to work. Is there an easy way to do this?
Thanks.
--
Resources:
e and their associated actions.
>
> On Wednesday, June 4, 2014 11:00:06 AM UTC-4, Tom Russell wrote:
>>
>> I have implemented the scheduler per the info and examples in Chapter 4
>> of the book. I am trying to start the workers but my problem is I am not
>> sure how to si
I have implemented the scheduler per the info and examples in Chapter 4 of
the book. I am trying to start the workers but my problem is I am not sure
how to since my app is hosted on pythonanywhere and according to the book I
need to do it from the interface from where you set the ip and port.
awesome, worked.
On Thursday, May 29, 2014 3:41:12 PM UTC-4, Niphlod wrote:
>
> drop the table and recreate it. It's a known issue with sqlite.
>
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#SQLite
>
> On Thursday, May 29, 2014 9:34:28 PM U
I am getting the following error when inserting a new record for a table I
have. I cannot seem to pinpoint what the cause is at this time.
The error is:
Traceback (most recent call last):
File
"/home/tsrdatatech/web2py/applications/ttheorydataextractor/controllers/appadmin.py",
line 270, in
gt; there would be any benefit over the simple approach above.
>
> Anthony
>
> On Wednesday, May 28, 2014 11:00:13 AM UTC-4, Tom Russell wrote:
>>
>> I have read through the docs but have not come across what I am trying to
>> do, if its possible.
>>
>> I have
I have read through the docs but have not come across what I am trying to
do, if its possible.
I have a table with 40 columns of data, I want to use a decorator or
similar to only allow some of them viewable while others in a different
membership group can see all of the columns.
Is this somet
w if this doesn't work and I'll code up a test of my own to see
> what happens.
>
> Anyone have a more efficient way of doing this?
>
> -Jim
>
>
>
> On Tuesday, May 27, 2014 11:32:28 AM UTC-5, Tom Russell wrote:
>>
>> Jim,
>>
>> Yes I have a gri
, Jim S wrote:
>
> When you say that you want to go to the 'grid' page, do you mean a page
> with a SQLFORM.grid on it and you want to go into 'edit' mode on a specific
> record on the grid?
>
> -Jim
>
>
> On Tuesday, May 27, 2014 10:42:31 AM UTC-5, Tom
I have a simple form where I have a submit button that runs some code.
After the code runs and the data is inserted into my table I do a simple
redirect like so:
redirect(URL('voltrin_data'))
That just goes to a page I have set up with a grid. I notice if I am
editing a record and press submit
Woks perfect, thank you.
On Tuesday, May 20, 2014 11:17:12 AM UTC-4, Anthony wrote:
>
> It is a Rows objects, so yes, you can iterate over it.
>
> Anthony
>
> On Tuesday, May 20, 2014 11:06:34 AM UTC-4, Tom Russell wrote:
>>
>> Thanks.
>>
>> What would l
Thanks.
What would last_five_records be, a list or something I could iterate over?
Tom
On Tuesday, May 20, 2014 10:16:54 AM UTC-4, Johann Spies wrote:
>
>
>
>
> On 20 May 2014 16:11, Tom Russell >wrote:
>
>> I have a table which I insert data from the internet,
ou explain in more detail what you are actually trying to do?
>
> Anthony
>
> On Tuesday, May 20, 2014 9:32:27 AM UTC-4, Tom Russell wrote:
>>
>> Thanks for the comments. I read Chapter 6 which is where I got the bit of
>> code to access the records. Specifically the fetch
e one it is grabbing to do a
calculation on it.
It is not too clear in the book how I should be getting a record by the id
is what I think my problem is.
Thanks,
Tom
On Tuesday, May 20, 2014 4:53:13 AM UTC-4, Johann Spies wrote:
>
> On 19 May 2014 22:06, Tom Russell >wrote:
>
> I
Hi,
I have some records in my db that I need to access to get them and perform
some calculations on.
My code to access the records is:
rows = db(db.voltrin.id > 0).count()
currentrow = rows - 4
for x in range(currentrow, rows):
record = db.voltrin(db.voltrin.id==x)
I have a form that is not connected to a db table. Its a simple form:
def getdata_form():
form=FORM('Start Date:', INPUT(_id='startdate', _name='date',
_class='date'), 'End Date:', INPUT(_id='enddate', _name='date',
_class='date'),INPUT(_type='submit'), _action=URL('grabvoltrindata'))
I have in my default.py this code for a button to call appadmin:
{{=A(T("App Admin"), _href=URL('appadmin', scheme='https'), _class='btn',
_style='margin-top: 1em;')}}
But when I click on the button it defaults to /default/appadmin instead of
just appadmin. How do I set this properly?
Also
I used csvstudio to process data to the existing sqlite db in web2py. It
all went very well and now the data is there. The dates however for a date
column only show up with the word None. Is there something else I am
missing for the date not to be showing correctly or at all?
Thanks,
Tom
--
At onvalidation the file is "inside" the form as cStringIO.StringO
instance. Specifically: form.vars.{{upload_fieldname}}.file.
You can get the contents like this:
contents = form.vars.{{upload_fieldname}}.file.getvalue()
It is then up to you to throw an error (or not as the case may be) with
f
I could be wrong and am still new here but maybe SQLFORM.Factory? Thats
what I use on a form that has 2 tables.
On Fri, Jun 28, 2013 at 1:41 PM, Cliff Kachinske wrote:
> I have two tables something like this:
>
> db.define_table('item',
> Field('name'),
> Field('on_hand', integer),
> )
>
>
Nice, I will check that out.
On Fri, Jun 28, 2013 at 1:37 PM, Anthony wrote:
> Yea thanks I tried that as well with no luck.
>
>
> Then you're doing something else wrong. It might help if you show all of
> the code. If you have a model file that does:
>
> db = DAL(...)
> ...
> auth = Auth(db)
>
UTC+2, Tom Russell wrote:
>>
>> Yea thanks I tried that as well with no luck.
>>
>
> That's impossible. But never mind, hang in there, after you finish your
> first project, you'll be remembering this beginnings with a smile.
>
>
>> I ended up just
I have a smartgrid with a link in it like this:
links = [lambda row: A(T('Create Appointment'),_href=URL("default",
"appointment_create",args=[row.id]))]
And I pass that to this function:
@auth.requires_login()
def appointment_create():
record = db.patient(request.args(0))
db.appointment
auth in
> one database, then you stop using it and use another database, which has no
> auth set up. That can't work.
>
> Simply define db just once, not twice. Use the definition web2py has
> suggested for you and change the database name if you want to.
>
> Regards,
>
I am confused about how I have my db.py set up for tables etc.
At the top I have what is generated for me:
if not request.env.web2py_runtime_gae:
## if NOT running on Google App Engine use SQLite or other DB
db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
else:
t; 2013/6/28 Tom Russell
>
>> Here's the rest of my code doing what I posted before...
>>
>> if form.process().accepted:
>> id = db.patient.insert(**db.patient._filter_fields(form.vars))
>> form.vars.patient=id
>> id =
>> db.
tyle,form))
On Thu, Jun 27, 2013 at 5:31 PM, António Ramos wrote:
> Using this suggestion , my submit button is inside the last fieldset.
> How do i take it outside?
>
>
> 2013/6/26 Tom Russell
>
>> To group inside a field I do something like this with 3 different tables:
>&
on in
> your page (with javascript) that is preventing the execution of your stuff
> later on.
>
> -Jim
>
> On Thursday, June 27, 2013 10:26:56 AM UTC-5, Tom Russell wrote:
>
>> So If I do something like:
>>
>> jAlert('This is a custom alert box',
I have 2 apps and one I want to use the model/db from it in the other in a
SQLFORM.grid. I have read through and googled and cannot find a way to do
this.
Is this possible and how?
Thanks,
Tom
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" gr
So If I do something like:
jAlert('This is a custom alert box', 'Alert Dialog');
and nothing shows up, could it be that the jquery lib is not being made
available?
On Thu, Jun 27, 2013 at 11:00 AM, Tom Russell wrote:
> k thanks I will try that
>
>
>
> On
k thanks I will try that
On Thu, Jun 27, 2013 at 10:58 AM, Jim Steil wrote:
> I'd try putting some alert() messages in to try to trace the flow and
> check the values of variables.
>
>
>
> On Thu, Jun 27, 2013 at 9:53 AM, Tom Russell wrote:
>
>> Thats wei
#x27;).hide();
>});
> });
> });
>
>
> On Wednesday, June 26, 2013 9:09:00 PM UTC-5, Tom Russell wrote:
>>
>> I cannot seem to get some jquery code to work right and not sure why.
>> Basically when I click a checkbox I want another field to appear below that
&
I cannot seem to get some jquery code to work right and not sure why.
Basically when I click a checkbox I want another field to appear below that
one.
This is my form code:
@auth.requires_login()
def register_patient():
mark_not_empty(db.patient)
mark_not_empty(db.emergencycontacts)
m
>> "{{=T('October')}}",
>> "{{=T('November')}}",
>> "{{=T('December')}}"],
>> dayNames: ["{{=T('Sunday')}}",
>>
Another solution can be:
{{extend 'layout.html'}}
Education CV {{=education_form}}
Student {{=student_form}}
School {{=school_form}}
On Wed, Jun 26, 2013 at 12:47 PM, Tom Russell wrote:
> Saved mine too, got it originally from
> http://www.web2pyslices.com/slice/show/1457
>> a simple json feed function returning a well formatted json object with
>> simplejson dump.
>>
>> Richard
>>
>>
>> On Wed, Jun 26, 2013 at 12:55 PM, Tom Russell wrote:
>>
>>> I am using the appointment manager from
>>> https://gith
I am using the appointment manager from
https://github.com/mdipierro/web2py-appliances/tree/master/AppointmentManager
.
I have tweaked it to my needs and works well so far but there is an issue
trying to use SQLFORM.grid.
I get an error
() takes exactly 1 argument (2 given)
by doing this:
def
Saved mine too, got it originally from
http://www.web2pyslices.com/slice/show/1457/adding-fieldset-and-legend-to-forms
On Wed, Jun 26, 2013 at 12:39 PM, António Ramos wrote:
> That is a very clever solution.
> Saved my day.
>
> Thank you
>
>
>
>
> 2013/6/26 Tom
How would I do this:
I need to create an appointment for a patient so from my list of patients i
have a link to call another app to do the appointment. I have the link set
so it looks like this:
links = [lambda row: A(T('Create
Appointment'),_href=URL("AppointmentManager","default",
"appointment_
To group inside a field I do something like this with 3 different tables:
form=SQLFORM.factory(db.patient, db.emergencycontacts, db.dependents)
fs0=form[0][:26] #patient rows
fs1=form[0][26:37] #emergency contacts
fs2=form[0][37:41] #dependents
fs3=form[0][-1] # submi
I need to add a button to the smartgrid but not like doing create=True
because I have a form factory that has 2 other tables associated with the
one. I know in html I can simply add a line for a button but since I am not
using html for this how would I add a button to that page to reference my
own
"represent" attribute
> for any reference fields that reference this table.
>
> Anthony
>
>
> On Wednesday, June 26, 2013 10:24:32 AM UTC-4, Tom Russell wrote:
>
>> db.define_table('patient',
>> #db.patient.id.readable=False # Since we
7;Son', 'Daughter', 'Other'])),
)
db.define_table(
'emergencycontacts',
Field('patient','reference patient', writable=False, readable=False),
Field('em_first_name', label='First Name'),
Field('em_mi
IN_DB(db,'field.id
> ','%(patient)s')),
>
>
> On Wednesday, 26 June 2013 10:36:03 UTC+5:30, Tom Russell wrote:
>>
>> Another question on the smartgrid.
>>
>> I have linked tables in my smartgrid like:
>>
>> grid = SQLFORM.smartgri
Another question on the smartgrid.
I have linked tables in my smartgrid like:
grid = SQLFORM.smartgrid(db.patient, deletable=True, editable=True,
create=False, maxtextlength=64, paginate=25, links=links,
links_in_grid=True, linked_tables=['emergencycontacts','dependents'])
When clicking on t
("AppointmentManager", "yourcontroller", "appointment_create", args=[
> row.id])
>
> You can also used keyword arguments "a", "c", and "f" with URL().
>
> Anthony
>
> On Tuesday, June 25, 2013 12:08:57 PM UTC-4, Tom Russell wr
Ah, I forgot to add the following line to my consumer app:
auth = Auth(db,cas_provider = '
http://127.0.0.1:8000/welcome/default/user/cas')
On Tue, Jun 25, 2013 at 10:12 AM, Tom Russell wrote:
> Well agreed, but I set that up in the welcome app so it would seem like
> that sho
I have a smartgrid with a link like so:
links = [lambda row: A(T('Create
Appointment'),_href=URL("AppointmentManager","appointment_create",args=[
row.id]))]
grid = SQLFORM.smartgrid(db.patient, deletable=True, editable=True,
create=True, maxtextlength=64, paginate=25, links=links,
links_i
ect has no attribute 'auth_user'
On Tue, Jun 25, 2013 at 11:14 AM, Anthony wrote:
> On Tuesday, June 25, 2013 11:04:22 AM UTC-4, Tom Russell wrote:
>
>> Yes I customized welcome and then added a new app via the admin
>> interface. I did not directly copy the welc
did implement the CAS stuff but now I get an error saying 'DAL' object
has no attribute 'auth_user' for the app I have.
On Tue, Jun 25, 2013 at 10:53 AM, Anthony wrote:
> On Tuesday, June 25, 2013 10:12:32 AM UTC-4, Tom Russell wrote:
>
>> Well agreed, but I set
I have the following form that uses 3 different tables and when I submit
the data it all seems to submit correctly but when I view the data in a
smart grid with linked tables in the columns clicking on the link does not
show any record for the row of linked data.
My smartgrid code:
def manage_pat
> http://web2py.com/books/default/chapter/29/09#Central-Authentication-Service
>
> Il giorno martedì 25 giugno 2013 07:51:08 UTC+2, Tom Russell ha scritto:
>
>> So I took and modified the welcome app to my needs and added another app.
>> If I login with the welcome app and
So I took and modified the welcome app to my needs and added another app.
If I login with the welcome app and with a link, open the other app and
have it set with auth.requires_login(), it requires the user to login
again. How does one handle this stuff in web2py? Do I need another app the
way I ha
ome_value
> db.mytable.myfield.writable = False
>
> Anthony
>
> On Tuesday, June 25, 2013 1:02:40 AM UTC-4, Tom Russell wrote:
>
>> Yes I understand that. What would be the best way to handle this?
>> Seemingly, the couple of items suggested did not work for me s
l submit
> a value for that field if they are determined, so you might want to check
> for that variable on the server and delete it if submitted.
>
> Anthony
>
>
> On Tuesday, June 25, 2013 12:15:04 AM UTC-4, Tom Russell wrote:
>
>> I ended up doing this in the
t; use the method I showed (i.e., set the default value for the field before
> creating the form).
>
> Anthony
>
>
> On Monday, June 24, 2013 11:23:01 PM UTC-4, Tom Russell wrote:
>
>> Yes I tried that:
>>
>> Field('medical_record_number', label=
readable at True in order to show the value but not allow it to be
> edited.
>
> Anthony
>
>
> On Monday, June 24, 2013 11:00:59 PM UTC-4, Tom Russell wrote:
>>
>> I have a form and I load a pre existing value that I generate internally
>> before I call the form. Wh
I have a form and I load a pre existing value that I generate internally
before I call the form. What I want to see on the form is the value shown
up but just as plain text so the user cannot modify it. If I do
readable-False then it just shows None for the value rather than the value.
How would I
Ah yes both readable and writable have to be defined. Thanks again
On Mon, Jun 24, 2013 at 6:12 PM, Anthony wrote:
> Try writable=False.
>
>
> On Monday, June 24, 2013 6:04:43 PM UTC-4, Tom Russell wrote:
>
>> Thanks for the tip.
>>
>> I did set one f
individual fields instead of entire tables:
>
> SQLFORM.factory(db.mytable.myfield, db.mytable.myotherfield, db.wholetable
> )
>
> Anthony
>
>
> On Monday, June 24, 2013 11:49:43 AM UTC-4, Tom Russell wrote:
>
>> I tried doing the specific fields like:
>>
>> f
ctory() can take a list of specific fields rather than entire tables.
>
> Anthony
>
>
> On Monday, June 24, 2013 11:15:28 AM UTC-4, Tom Russell wrote:
>>
>> If I have a form factory with 3 tables, how would I define the fields I
>> wanted shown for each?
>>
>>
If I have a form factory with 3 tables, how would I define the fields I
wanted shown for each?
This is the code for my controller. I have tried to set it in several spots
but all of them throw an error.
def register_patient():
mark_not_empty(db.patient)
mark_not_empty(db.emergencycontacts
Ah, I see now.
Thanks
On Mon, Jun 24, 2013 at 10:50 AM, Anthony wrote:
> No, 3 columns means:
>
> Col 1 Col 2 Col 3
> label widget comment
>
> It's still one field per row. When in doubt, try it out. :-)
>
> Anthony
>
>
> On Monday, June 24, 201
LFORM(..., formstyle=myformstyle)
>
> Anthony
>
>
> On Monday, June 24, 2013 10:07:49 AM UTC-4, Tom Russell wrote:
>
>> Thanks for the responses.
>>
>> The formstyle looks interesting but I cannot make heads or tails out of
>> the way to use it. Are there any examples
>
>
> On Monday, June 24, 2013 9:35:31 AM UTC-4, Tom Russell wrote:
>
>> Thanks for the response. So now I am really confused because I have no
>> idea where to put this code if I am using a SQLFORM.factory?
>>
>> Basically I just want to add row fluid to make t
/d/msg/web2py/QmoRmapiOwA/tZqeEbii6QgJ
>
> Anthony
>
>
> On Monday, June 24, 2013 8:53:16 AM UTC-4, Tom Russell wrote:
>>
>> I have a SQLForm and use the formset DIV for it but its not what I really
>> want. Rather than having just one column with all of the fields req
I have a SQLForm and use the formset DIV for it but its not what I really
want. Rather than having just one column with all of the fields required to
be filled out, how do I set it so its like 3-4 columns?
For example:
Name Address City State
Instead of:
Name
Address
City
State
aha that would be it.
On Wed, Jun 19, 2013 at 5:26 PM, Niphlod wrote:
> are you logged-in ?
> For security reasons any modification to tables in grids is prevented on
> anonymous access.
> You can still give "write permissions" using user_signature=False, but
> it's highly discouraged
>
> On We
Yes I am using smartgrid elsewhere, very nice. I did do the 3 forms but
used the factory to do it. Works nicely so far.
On Tue, Jun 18, 2013 at 1:24 PM, villas wrote:
> I don't believe you can use SQLFORM in that way, you'll have to create
> your own form - maybe try SQLFORM.factory. Better s
Yes I was just reading and understood that the reason for my fields not
showing up was because the fields in many of the tables have the same
names. Changing that resolved that issue.
It's actually a great book too, just wished I could read faster.
Thanks.
On Tue, Jun 18, 2013 at 1:04 PM, Richa
It works for me.
2011/11/5 Kenneth Lundström
> Hi Russell,
>
> Have you defined nyroModalRemove somewhere? I'm getting
> "parent.$.nyroModalRemove is not a function" when using your suggested
> three lines.
>
>
> Kenneth
>
> return_sc
Looks like the form.accepts is trying to update the database with the
is_administrator value. You may need to deal with the update
explicitly. Have you tried form.accepts(request.vars, session,
dbio=False)?
On Jun 14, 1:21 pm, Ross Peoples wrote:
> I am trying to provide an editor for auth_use
Yes, I have two lines in the crontab. A five minute one, and a daily
one...
*/5 * * * * python /home/www-data/web2py/web2py.py -S init -M -N -R /
home/www-data/web2py/applications/init/modules/scripts/cron_fivemin.py
1 22 * * 1-5 python /home/www-data/web2py/web2py.py -S init -M -N -R /
home/www
This works for me. I have a system crontab like this...
*/5 * * * * python /home/www-data/web2py/web2py.py -S init -M -N -R /
home/www-data/web2py/applications/init/modules/cron.py
And cron.py runs just like it should. Here's a basic layout that you
can use to test it's working...
==modules/cr
I think that a simple system cron is the most reliable (per minute,
per hour, per day). Then use some type of locking mechanism in your
web2py script (either database or file). For example:
locked = db((db.report_queue.status=='SystemLock')).select().first()
if not locked:
locked = db.report
I've just been struck by the same issue when upgrading to Version
1.94.6 (2011-03-27 18:20:38).
To be clear, this used to work, but does NOT work anymore:
form=SQLFORM.factory(Field('document', 'upload'))
This works on the current version:
form=SQLFORM.factory(Field('document', 'upload',
uploadfo
This JavaScript will refresh the page without reposting the data:
window.location = window.location;
On Jan 17, 4:04 am, weheh wrote:
> I'm using components, not typical web2py way of doing things.
>
> On Jan 16, 3:51 am, Kenneth Lundström
> wrote:
>
> > But isn t web2py taking care of this alr
Hi,
I've had this problem come up quite a few times. It appears to be a
migration issue and is usually fixed by this...
auth.define_tables(migrate=False)
Thanks
Russell
On Nov 17, 8:48 am, Carlos wrote:
> Hi Massimo,
>
> I'll send you the requested files if/when I get
;',limitby=(0,3))
> form=SQLFORM.factory(*[Field('a%s'%i, label = a.question) for i,a
> in enumerate(asked)])
> if form.accepts(request.vars,session):
> score = sum((check(a.answer,request.vars.get('a%s'%i,''))
> for i,a in en
In my experience, it is a bit awkward to do this using SQLFORM. You
could try something like this:
db.define_table('q_and_a',
Field('question'),
Field('answer'))
rows = db(db.q_and_a.id>0).select()
import random
random.seed()
asked = random.sample(rows, 3))
form=SQLFORM.factory(
Fi
Use 'T' or 'F' rather than 'True' of 'False'. Web2py saves boolean
data as 'char' with length 1.
On Aug 19, 1:49 am, Narendran wrote:
> Hi,
> I added a new boolean field to a table. And I manually updated the
> value of the field outside web2py. Now, I get zero rows for any
> condition I put on
As an aside, the mixing of \\ and / is unsightly but does not seem to
cause a problem on widows. If you want to tidy it up, it's around
line 786 of main.py:
request.folder = os.path.join(request.env.web2py_path,
'applications', request.application) + '/'
On Jun 25, 11:15 am, Y
I would create a form with all 10 rows, hide all but the first 2 rows,
and then use jquery to progressively display the rest of the rows.
Add something like this to each of the rows...
form.element(_id=this_reference_id).append( A(' add', _href='#',
_onclick="jQuery('#%s').show()" % next_reference
1 - 100 of 140 matches
Mail list logo