I believe (somebody can correct me if i'm wrong) that this is a browser
issue.
On 1/16/2011 2:22 AM, weheh wrote:
Anyone know how to prevent posting on reload? Right after submitting a
form, if I reload, I'm always asked whether or not I want to re-post
the previous form values. Is there a way t
Anyone know how to prevent posting on reload? Right after submitting a
form, if I reload, I'm always asked whether or not I want to re-post
the previous form values. Is there a way to override this behavior?
It's probably not a web2py issue, but maybe I'll get lucky ...
Hmm...still not quite sure what you're looking for. It's unlikely you want
separate tables for separate users. By default, users cannot access records
of other users. The built-in Web2py Access Control features may already do
what you are looking for.
To follow up on this issue, I think it might be related to db and/or
DAL.
+ I don't think it relates to exhausting RAM or too many open files.
Using lsof to monitor open files during stress test, with 200
concurrent channels (ab), I witnessed up to 11,000 open files (most
are apache2). There are
I works now (sort of) but i still have the issue (sort of)..
In the version that works, I create a one time reference obj, then use
it by running through its dict structure. This can be pickled and put
into a table with the older DAL, but not with the new:
dfo_objCmd =
self.dfo_bui
Aha, finally got this thing to work completely. My comments have been
added to Michelle's slice.
On Jan 15, 8:06 pm, weheh wrote:
> Actually, on closer inspection, this is not working just right. It
> seems as if the component form is not getting refreshed after pressing
> the submit button. I ex
Hurray, I'm getting somewhere now! Thanks pbreit, now I try to do what
I want to do without modifying the authentication functionality and it
works better. But I get the message "invalid function" when I try to
login. Here is the code:
===in the model file===
auth = Auth(globals(), db)
auth.define
In both versions, the following DAL activity is identical. But is
failing with the new DAL (the 1st was with sql.py, the 2nd with the
new dal.py. I just realized while copying and pasting that you have
the full file (was attached in an email and called "_blue.py"). The 2
type of objects that are f
...or maybe the problem lies int this function in the controller file:
def admin():
records = db().select(custom_auth_table.ALL,
orderby=custom_auth_table.username)
form = SQLFORM(db[auth.settings.table_user_name])
if form.accepts(request.post_vars, session):
if you have an RSS feed generator like this:
def feed():
w = db.plugin_wiki_page
return db(w.active==True)
(w.public==True).select(orderby=w.created_on).as_list()
it won't work for plugin_wiki_pages out of the box because it doesn't
respect the RSS format, being:
dict(title="my fe
Actually, on closer inspection, this is not working just right. It
seems as if the component form is not getting refreshed after pressing
the submit button. I expected that the form would self submit.
Perhaps I should reformulate the problem -- I want to make one table
for each auth-user, so that an auth-user can't see the records of
ohters auth-users.
On Jan 15, 11:52 pm, pbreit wrote:
> I may not understand either. The user authentication functionality is
> automatically provided by web2py
is there web conferencing?if yes, then it probably means free access
to the online version of the book? :)
On Jan 15, 5:47 pm, Massimo Di Pierro
wrote:
> I will personally reimburse $70 to the first 5 attendees from this
> list who sign up for the web2py tutorial, if they sign up by next week
> a
I may not understand either. The user authentication functionality is
automatically provided by web2py scaffolding. I would suggest using it without
modifications until you run into limitations.
hi, yes I can... I'll send you both snippets (although i think they
are the same, (but I'll do a diff)... although I just found this in
copy_reg:
except AttributeError:
if getattr(self, "__slots__", None):
raise TypeError("a class that defines __slots__ without "
Recommendation engines are relatively difficult to build. I think you are on
the right track starting with some simple, manual recommendations. You might
also look at something like Easyrec.
I will personally reimburse $70 to the first 5 attendees from this
list who sign up for the web2py tutorial, if they sign up by next week
and email me a proof of registration.
Plus everybody who registers within Feb 9 will get a free copy of the
printed book.
Massimo
On Jan 15, 2:49 pm, Anthony
Thanks for the replies. My problem is that with the code I can create
one account for all users, but I want to create one account for each
user.
>On Jan 4, 1:14 am, Martín Mulone wrote:
> Commonly in internet, the users create their accounts, via
> (/myapp/default/user/register/)
>
> But if you
I do not think anything has changed in this respect. Can you provide
an example of doe that worked and does not work anymore?
Massimo
On Jan 15, 3:29 pm, mart wrote:
> Hi,
>
> seems I used to be able to store pickles, and now ... well I can't...
> Has the API changed or have we decided to agains
Hi,
seems I used to be able to store pickles, and now ... well I can't...
Has the API changed or have we decided to against the practice (which
generally I may agree with) but... I need those pickles in there for
archive purposes, reproducibility and necessary references to them...
I store run t
And here's the link to sign up: https://www.cteusa.com/pycon4/ (rates are
shown here: http://us.pycon.org/2011/tickets/).
Note, the tutorials are separate from the main conference, so if you want
you can attend one or more tutorials without paying for the full conference.
On Saturday, Januar
Just signed up for the web2py tutorial. :)
Do it by Monday and save $50.
Anthony
On Saturday, January 15, 2011 3:00:47 PM UTC-5, Massimo Di Pierro wrote:
> If you are planning to attend, please sign up by next week.
>
> Tutorials that do not meet a minimum numbers of attendees by next
> w
Mind that this is old syntax:
r._extra['sum(panel_1hrs.Po_avg)']
it is equivalent and better to use:
r[db.panel_1hrs.Po_avg.sum()]
On Jan 15, 2:29 pm, Michael Toomim wrote:
> I find it easiest and cleanest to reformat data structures in python,
> using list comprehensions. Javascript sucks fo
I find it easiest and cleanest to reformat data structures in python,
using list comprehensions. Javascript sucks for loops. So instead of
jsonifying the raw database output, fix it first:
export_optimizer_records = [{'FreezeTime': r.panel_1hrs.FreezeTime,
'StringID': r.panel_1hrs.StringID, 'Po_
weather you're looking to distribute or even just for your self, You
can always use Distribute. The learning curb isn't huge and has many
bultin features (i.e. find_packages() which you may find helpful
here).
ANyways, here a link.
http://packages.python.org/distribute/setuptools.html#id3
Mart :
If you are planning to attend, please sign up by next week.
Tutorials that do not meet a minimum numbers of attendees by next
week, will be cancelled.
Massimo
hi
ok this is not a specific web2py problem but I intend to solve it
using web2py and I like you guys, so here it goes:
I have a DB with posts, links, comments and other interesting
contents.
These contents are generated from an App.
Let's say I use it to make a post.
It would be nice to have a s
Why can' t you use the already pre-defined id field? You don't need to
define a new one, every table already has and and id field with name
"id".
Fabiano.
On Sat, Jan 15, 2011 at 6:37 AM, Rick wrote:
> So the problem was that the controller file line creates an error when
> I
> add the 'id' f
I have another one question. How to interact with controller in shell?
ok narrowed down the problem, this IS working:
def index():
response.headers['Content-Type']='application/xml'
rows=[['6.0', u'pap\xe0', u'kloiuy', '1995.0']]
return export_xml(rows)
def export_xml(rows):
colnames=['prima','seconda','terza','quarta']
idx=range(len(colnames))
I use site-packages directory to put external libraries.
Because, I tried gdata (google data ) library to put in app modules folder.
But it breaks on import, because, gdata module has no knowledge of
local_import() and since they try to do imports with usual way, it'll break.
So, for complex lib
Michele, I tried out your slice and it works great. Thanks! I think
the problem I was experiencing is that I had not changed ajax=True to
ajax=False in the LOAD function.
On Jan 10, 5:35 pm, Michele Comitini
wrote:
> I made a slice:
>
> http://web2pyslices.com/main/slices/take_slice/114
>
> mic
>
Are you trying to do manual upload?
I remember I got such an error a while back. Can't recall exactly
what happened that time. I'll let you know if I can recall. (My Hg repo., of
that project is lost due to hdd malfunction :( )
No, blob is optional, and it'll work well without specifying a blob field.
(I use only upload and it works on GAE too)
Another example, same strange error:
File "C:\Python25\web2py\gluon\html.py", line 790, in xml
return '<%s%s>%s' % (self.tag, fa, co, self.tag)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
3: ordinal not in range(128)
Variables
fa ''
self
self.tagu'ti
Thanks Savio, I created a clean app to test this out and it works
great. Regards. >Jeff
On Jan 14, 12:28 pm, Savio Sabino wrote:
> Hi, the follow model is rigth to crud:
>
> db.define_table('category',iObj,
> Field('parent','reference category'),
> Field('name'),
> format='%(name)s')
It can.
http://web2py.com/cas
On Jan 15, 9:13 am, David Bain wrote:
> I believe web2py can act as a CAS authentication server. If you CMS does CAS
> then you're good. Maybe an easier place to start is to figure what CMSes out
> there can authenticate against CAS.
>
> 2011/1/15 Kenneth Lundström
for example:
def index():
"""
>>> request.vars.update(title='xxx'
>>> assert(len(index()['articles'].find(r:r['title']=='xxx'))==1)
>>> db(db.article.title=='xxx').delete()
1
"""
form = SQLFORM(db.article)
if form.accepts(request.vars): response.flash = "óÔÁÔØÑ
ÄÏÂÁ
I believe web2py can act as a CAS authentication server. If you CMS does CAS
then you're good. Maybe an easier place to start is to figure what CMSes out
there can authenticate against CAS.
2011/1/15 Kenneth Lundström
> I was thinking about using web2py as the authentication platform as it
> hol
This is my code
def index():
form = SQLFORM(db.article)
if form.accepts(request.vars): response.flash = "Статья добавлена"
articles = db().select(db.article.ALL)
return dict(articles=articles, form=form)
I can't understand how to test index? How to test articles value for
example?
Hi,
there is the file "web2py.fedora.sh" in web2py/scripts.
I want to use Python2.7 and I had to change some lines.
I have found that < and > must be escaped, python need the full path
(CentOS).
Changed from
ADMINPASS=""
...
PYTHON=python
to
ADMINPASS="*\*"
...
PYTHON=*/usr/local/bin/*python*2.
Thank you, I've fixed it with:
actividad_id=actividad[0].id
riesgo_id=riesgo[0].id
On 15 ene, 12:45, Massimo Di Pierro
wrote:
> perhaps
>
> (db.actividades_riesgos.riesgos==riesgo)
>
> should be
>
> (db.actividades_riesgos.riesgos==riesgo.first().id)
>
> On Jan 15, 5:24 am, luifran wrote:
>
>
I went through the treads. I cannot quite identify a bug. some of the
issues are most likely be related to web2py and db models being out of
sync. Are you using a legacy table? Do you have migrate=False?
On Jan 14, 2:41 pm, Kenneth Lundström
wrote:
> https://groups.google.com/group/web2py/browse_
Virtual Fields do not help you here because they are computed when
records are extracted not when stored. virtual fields are not stored
at all.
The 'input' table already has an auto-increment id field. You cannot
gave two autoincrement ids. It is bad design and would slow the
database a lot.
You
perhaps
(db.actividades_riesgos.riesgos==riesgo)
should be
(db.actividades_riesgos.riesgos==riesgo.first().id)
On Jan 15, 5:24 am, luifran wrote:
> db.define_table('actividades_riesgos',Field('actividades',db.actividades),F
> ield('riesgos',db.riesgos))
>
> actividad=db(db.actividades.nombre=
So the problem was that the controller file line creates an error when
I
add the 'id' field and 'migrate=False' to the day table. Here is some
more code:
===in the model file===
import datetime
now = datetime.date.today()
db.define_table('day',
Field('the_id', 'id'),
Field('thedate
db.define_table('actividades_riesgos',Field('actividades',db.actividades),Field('riesgos',db.riesgos))
actividad=db(db.actividades.nombre==request.args(0)).select(db.actividades.
id)
riesgo=db(db.riesgos.nombre==request.args(1)).select(db.riesgos.id)
record = db((db.actividades_riesgos.actividade
This is not the right syntax for decimal. Should be
Field('f_total_sum_all', type='decimal(5,10)', label=T('Total Sum')),
decimal(precision,scale) same syntax as SQL.
On 26 joulu 2010, 23:16, Kenneth Lundström
wrote:
> Aapche 2, wsgi, MySQL 5.0, web2py 1.91.4, python 2.6.5
>
> I have defined in
You seem to have a field which is data according to web2py but string
according to the db. What is the model? Did you keep migrations
enabled?
On 6 tammi, 06:34, Kenneth Lundström
wrote:
> What is wrong with this row:
> bill_sub_items[item_id]['items'] = db(db.t_receipt_item.f_bill_item ==
> item
Is there an oen issue here? I do no see a problem.
On 11 tammi, 08:20, Richard Vézina
wrote:
> You need a upload field to store the path and a field to store the name of
> the file... The book is not clear I think about upload particularly about
> blob storage...
>
> My model :
>
> Field('chroma'
File "/data/domains/web2py/applications/kenneths/controllers/
stuff.py",
line 49, in payment_receiver_update has (onaccept=crud.archive)
this means you are storing history for the records in a archive table.
Perhaps you have migrations disabled and the f_address field is
missing in that table. If
was spam. removed.
On Jan 15, 3:25 am, cjrh wrote:
> On Jan 14, 7:17 pm, sangeetha wrote:
>
> > *Position : QA Tester
>
> 1) This is connected to web2py how exactly?
>
> 2) I should be considerably shocked to find a QA tester reading posts
> in this forum looking for work.
>
> 3) If your company
I have this code:
myrows=[]
for r in range(riga+1,nrows):
myrow=[]
for c in range(ncols):
cell=mysheet.cell_value(r,c) ##reading some text, cell is
unicode object
myrow.append(cell)
myrows.append(myrow)
idx=range(len(colnames)) ##colnames=
On Jan 14, 8:46 pm, mattgorecki wrote:
> I like that it was all done with CSS. No images in sight.
Namaste.
(The geek in me greets the geek in you)
On Jan 14, 7:17 pm, sangeetha wrote:
> *Position : QA Tester
1) This is connected to web2py how exactly?
2) I should be considerably shocked to find a QA tester reading posts
in this forum looking for work.
3) If your company is run in the manner suggested by the act of
looking for such applica
I was thinking about using web2py as the authentication platform as it
holds the members database. Or then a LDAP that gets it information from
members database.
The intranet will hold a lot of information that should be visible on
the website via the CMS. Either lots of small info (names, tel
Thanks for your replies and explanations.
I tried:
> {{=INPUT(_type="submit", _value="Update data", _action="URL(r=request,
> f="update_form", args=company[0].id))}}
... this is rendered as:
... but doesn't work, whereas this:
Update
data
... being rendered as:
Update data
... does work.
57 matches
Mail list logo