Now 100% certain about causing reserved keyword conflict with mysql.
Thanks again for the reminder.
I successfully migrated the data to mysql from sqlite, but did it 1
table at a time. Is there a convenient way to move all the data from
all tables at once? I figured tar and detar just brings back
All I can say about Rails app is that they are going to use "basic
authentication". I imagine there could be multiple ways to implement
an authentication scheme between web2py and ruby. My question is
whether there is one tested and secure way?
--~--~-~--~~~---~--~~
I'm using the linkto field in SQLTABLE to create a hypertexted link to
a record in the db. Since there are many records, I need to paginate
the results. So I create a page_offset var that gets passed along.
Here's the SQLTABLE:
records = SQLTABLE(db().select(db.table.ALL),linkto=URL
(r=reque
In my model I have:
db.define_table('utility',
db.Field('utility',label='Utility *
',length=12,default='',notnull=True,unique=True),
db.Field('content',type='text'),
migrate=False)
In a controller I have:
def privacy():
response.functionname=T('Privacy')
content=db(db.utili
Oups actually is a copy and paste... I don't have ":" after the
decorators...
I just sent you a zip file containing the controller and view...
Thanks for your help !
Yannick P.
On Jun 21, 12:19 am, mdipierro wrote:
> I see lots of errors in the first 4 lines:
>
> @auth.requires_login() :
> de
Hurray :)
/R
On Jun 20, 3:13 am, mdipierro wrote:
> By the end of july there will be auto upgrade. ;-)
>
> On Jun 19, 6:43 pm, Eddie Eyles wrote:
>
> > I like the pace of new releases of web2py, but it is a pain to
> > download each one (the Windows distribution takes an hour on my
> > connect
Hey, I have just installed apache + web2py + mod_wsgi.
Now results are very comparable to django results.
Great !
I'm going to test it a bit more.
Thanks
Daniel
On Sun, Jun 21, 2009 at 2:01 AM, AchipA wrote:
>
> You didn't say what web server you used for Django, whether you
> benchmarked com
On Jun 20, 11:23 pm, mdipierro wrote:
> The code you have below works fine. I guess the question is how to do
> IS_IN_DB and IS_NOT_IN_DB at the same time for the same field. Is that
> the question?
Yes, that is the question.
Sorry, it was not stated explicitly.
On Jun 21, 12:36 am, mdipierro
linkto in SQLTABLE is used for creating URLs to edit individual
records.
What you want is under "pagination" in the book.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to thi
Also FYI for me its started working again =)
On Sun, Jun 21, 2009 at 1:24 PM, mdipierro wrote:
>
> good point. I will ask.
>
> On Jun 21, 12:16 am, JohnMc wrote:
> > Massimo,
> >
> > I notice in this discussion that the dates that many of the failures
> > seem be to occuring on the weekends 7th
here you can find some details about autoincrement in SQLIte:
http://www.sqlite.org/autoinc.html
as you can see ROWID is a 64 bit signed number and my conclusion is
you never should worry about the 'id gaps'.
carlo
On 21 Giu, 00:01, Fauché JM wrote:
> Annet ,has clearly explain the "problem".
Hi Annet,
you can't have double nested template language code, which is the end
result of inserting a piece of a template in a view using template
language.
The template gets parsed into python code before it is executed, so:
{{=XML(content.content)}}
will insert the piece of the template as
maybe I am not fully up to date with the latest web2py releases so
chech this out:
db structure: if you have an existing mysql db with the same structure
as the sqlite db, it is just a matter of changing the connect string
in the model
db data: I think web2py does not care for migrating data fro
you always have to set a user in mysql: if you never set a user before
I suppose you always accessed as 'root' and a blank password but these
have yet to be present in the connection string (not a web2py issue
here).
carlo
On 21 Giu, 07:00, weheh wrote:
> I had to do some mucking around with se
On Jun 20, 11:02 pm, mdipierro wrote:
> "officially" we say we only support 2.5 because if people use 2.6 only
> syntax they app will not work on 2.5. "technically" web2py runs on 2.6
> with only one known issue: The cgi module that parses form variables
> behaves differently in 2.5 and 2.6. If y
Me too! For the first time in two weeks!
On Jun 21, 8:20 am, Adon Metcalfe wrote:
> Also FYI for me its started working again =)
>
> On Sun, Jun 21, 2009 at 1:24 PM, mdipierro wrote:
>
> > good point. I will ask.
>
> > On Jun 21, 12:16 am, JohnMc wrote:
> > > Massimo,
>
> > > I notice in this
Hello there,
I have a problem, validating the form does not react.
The code in the controller inputform is defined global):
inputform=FORM(TABLE(TR(B(T('Date:')),INPUT
(_type="text",_name="new_date",_class="field-width-80 field-padding-
right-10",_id="new_datepicker_id",requires=[IS_NOT_EMPTY()
When I change my SQLFORM for a table record to readonly, all of the
IS_IN_DB relationships go back to their foreign keys instead of the
values defined by the validator (for example: IS_IN_DB
(db,'categories.id','%(name)s')). What am I missing?
--~--~-~--~~~---~--~---
Annet,
change this --
{{=A(event.event,_href="javascript:eventlistdetails('%s')"%URL
(r=request,f='eventdetails',args=[event.id]))}}
to this --
{{=A(event.event, _onmouseover="this.style.cursor='pointer';",
_onclick="javascript:eventlistdetails('%s')"%URL
(r=request,f='eventdetails',args=[even
Nevermind, represent did the trick:
db.things.category.represent = lambda id: SPAN(db.categories[id].name)
On Jun 21, 10:33 am, "mr.freeze" wrote:
> When I change my SQLFORM for a table record to readonly, all of the
> IS_IN_DB relationships go back to their foreign keys instead of the
> values
http://127.0.0.1:8000/a1/default/_TEST
returns
ValueError: line 2 of the docstring for junk lacks blank after >>>:
'>>>junk()'
On Jun 21, 1:57 am, weheh wrote:
> Here it is again. The controller runs fine. The doctest does not.
>
> def junk():
> """
> >>>junk()
> 'hell
You only told us that your rails app provides basic auth and so I
indicated how you can used web2py to authenticate uses using Rails'
basic auth. This is tested and it works. It is not the most secure way
but it is the only way until we know more about the rails app.
Does the rails app exposes ot
Thanks for letting us know. Please make sure the web2py app is
compiled (click [compile]). We desperately need independent comparison
banchmarks like yours. Please post some numbers when you can.
Massimo
On Jun 21, 5:11 am, Daniel Guryca wrote:
> Hey, I have just installed apache + web2py + mod
I think the solution may be changing the OptionsWidget validator. I
will work on it. If you have any advice, let me know.
On Jun 21, 5:12 am, DenesL wrote:
> On Jun 20, 11:23 pm, mdipierro wrote:
>
> > The code you have below works fine. I guess the question is how to do
> > IS_IN_DB and IS_NOT
Hello Mate,
I seem to have a problem to upload Image file in the view... Here is
an example of how I implement it...
### In the Controller ##
def download():
import os
path=os.path.join(request.folder,'uploads',request.args[0])
return response.stream(path)
def index():
photoSet
yes you can migrate an entire database from the shell with one
command:
1) have a model that connects to the sqliite db
2) python web2py -S yourapp -M
3) in the shell type
db.export_to_csv_file(open('somefile.csv','wb'))
4) quit, edit the model to connect to the other db instead
5) python we
I am uploading a fix to this problem for authentication now. It will
be in trunk in a couple of minutes, please give it a try.
Massimo
On Jun 21, 9:39 am, Faye wrote:
> On Jun 20, 11:02 pm, mdipierro wrote:
>
> > "officially" we say we only support 2.5 because if people use 2.6 only
> > synta
John,
Thanks for helping me solve the problem and giving the explanation for
its cause, I copied and paste it to my log. problem solved in both
Firefox and Safari.
> One of these days I will get around to loading Safari on Wine. But let
> me know if this works on Safari.
Your solutions works o
I checked your form with this:
def insert_flexiblecost():
if inputform.accepts
(request.vars,session,formname='form_newflexiblecost'):
print 'done'
return dict(form=inputform)
and your form works great. he problem is somewhere else.
In particular I do not see in your code the pl
How did you insert the images in the database? Which Python version
are you using?
It seems your fileupload field contains a serialized FieldStorage
object and not the web2py filename. This is very wrong.
The problem is not in the code you show but in the data you have in
db. Please show us more
Hello, I'm new to web2py (I know django) and I decided to give a try.
I bought the book, but I don't find detailled documentation about
auth. I want to create several apps (for a classroom organization)
sharing the same users, but with different profiles, for example
teachers, students, visitors..
Hi Massimo ,
first of all, I hated python, cause I was trying to totally reprogram
a webapp. Then a friedn of mine, Peter (writting an article bout
web2py), I think you also know him :o), told me about your framework -
and now I love python :o)
REALLY GREAT/BRILLIANT WORK!!!
Now to the problem:
Hi Denes,
Thanks for your reply.
> One way to obtain the desired result would be to write content.content
> out to an html file in the views folder and instead of:
> {{=XML(content.content)}}
> have :
> {{include 'content_file.html')}}
So, in the controller, instead of return dict(cont
auth_table must have a "email" and optionally a "username". If
username is present it will be used for login.
If your users do not have an email, then you do not need to fill the
field since only username will be used for login.
massimo
On Jun 21, 11:38 am, alain31 wrote:
> Hello, I'm new to we
Thanks for your comments.
You can fix your problem by replacing:
if inputform.accepts
(request.vars,session,formname='form_newflexiblecost'):
with
if inputform.accepts(request.vars,formname=None):
This is because web2py does some "magic" to prevent double form
submission and this is achie
when I edit a table that has fields from other tables using appadmin,
showed me the id (number) of the table, I would like to display the
field name and not the id. Can you do to show me the field name using
appadmin?. maybe work with a query as a table, becose I tried to
export a query as a table
As promised:
Cookbook for how I installed a console-less-and-DOS-black-window-less
web2py service on a Windoze Server 2003, Standard Edition - Build 3790
(Service Pack 2).
Step One, change C:\web2py\options.py to:
import socket, os
ip = socket.gethostname()
port = 8000
password = '' ### means
As promised:
Cookbook for how I installed a console-less-and-DOS-black-window-less
web2py service on a Windoze Server 2003, Standard Edition - Build
3790
(Service Pack 2).
Step One, change C:\web2py\options.py to:
import socket, os
ip = socket.gethostname()
port = 8000
password = '' ### mean
Extra special cool. I will have to try this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, s
I got it, and yeah, it's worth it.
If your having trouble, and need to do your thesis, don't do anything
until you get this.
It's too bad I couldn't get the newer version. ;) I wanted to have
details about auth and other nifties.
Thanks M.
Regards,
Jason Brower
--~--~-~--~~
I just need the info how i can get the session ID from the session
object.
And then on the other page from the get-data set the session-id back
to the session, so its seams like that person is logged in.
Like this in poseido code:
@auth.requires_login()
def upload_image()
sessionid = session.
I have read every where and on same places iread that the T2 plugin
can/should be used and in some places that some of the functionality is
moved in to web2py itself.
So whats the status of it what should i use ?
/R
--
__
Robert Marklund
Phone: +46 (0
Hi Kyo,
appadmin ignores db.table.field.readable and db.table.field.writable
but it always displays the id field.
I am not sure I understand what behavior you want to change.
Massimo
On Jun 21, 12:06 pm, __Kyo__ wrote:
> when I edit a table that has fields from other tables using appadmin,
> s
?
On Jun 21, 1:38 pm, Jason Brower wrote:
> I got it, and yeah, it's worth it.
> If your having trouble, and need to do your thesis, don't do anything
> until you get this.
> It's too bad I couldn't get the newer version. ;) I wanted to have
> details about auth and other nifties.
> Thanks M.
>
Almost everything in T2 is now in web2py and much more powerful. T2 is
deprecated and will not be supported.
Massimo
On Jun 21, 2:55 pm, Robert Marklund wrote:
> I have read every where and on same places iread that the T2 plugin
> can/should be used and in some places that some of the function
The requested session id is in request.sesssion_id and the response
session id is in response.session_id. The two should match if the
requested session is found.
Anyway, why don't you explain what you are trying to accomplish. I do
not see why one would ever need to access this.
Massimo
On Jun
Hi Massimo,
I'm that unbelievable stupied!!! It absolutely clearly described in
your ebook... I've always skipped it, don't know why... ;o)
Greetings and thanks a lot!!!
matthew
On 21 Jun., 19:42, mdipierro wrote:
> Thanks for your comments.
>
> You can fix your problem by replacing:
>
> if
I am trying to show the detail for a foreign key, but I really do not
know how to do it.
My model is:
db.define_table('currency',
SQLField('code',length=3),
SQLField('name',length=100))
db.currency.code.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB
(db,'currency.code')]
db
How can I append a class to one of the fields in a SQLFORM ? I would
prefer to do it when the form is generated and not with jQuery on
document.ready.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Frame
Thanks for your note...
Here is the code for uploading the image... I'm Using Python Version
2.5
@auth.requires_login()
def upload():
from gluon.sqlhtml import form_factory
albumNameList = [y.id for y in db(db.album.buacct_fk ==
session.auth.user.id).select(db.album.id)]
formPic = for
my guess is that currently do not change often so I would use cache
the mapping:
currencies=cache.ram('currencies',lambda: dict([(row.code,row.name)
for row in db(db.currency.id>0).select()]), 5000)
db.cache_account.currency.represent=lambda id: currencies[id]
Massimo
On Jun 21, 3:57 pm, "Franc
You can customize the widget:
db.table.field.widget=lambda a,b:StringWidget.widget
(a,b,_class='yourclass')
On Jun 21, 3:59 pm, "mr.freeze" wrote:
> How can I append a class to one of the fields in a SQLFORM ? I would
> prefer to do it when the form is generated and not with jQuery on
> docum
You're the man.
On Jun 21, 4:27 pm, mdipierro wrote:
> You can customize the widget:
>
> db.table.field.widget=lambda a,b:StringWidget.widget
> (a,b,_class='yourclass')
>
> On Jun 21, 3:59 pm, "mr.freeze" wrote:
>
> > How can I append a class to one of the fields in a SQLFORM ? I would
> > pref
Actually thought it was a though one to debug. I am sure it may have
helped other users as well.
Massimo
On Jun 21, 3:43 pm, matkolbe wrote:
> Hi Massimo,
>
> I'm that unbelievable stupied!!! It absolutely clearly described in
> your ebook... I've always skipped it, don't know why... ;o)
>
> Gr
I just released my first web2py application. It connects writers with
editors. The rates are very, very cheap for simple text correction.
http://morrisdecode.com
Please let me know what you think and what I can improve. Big thanks
to all the web2py coders here.
--~--~-~--~~--
I think this is an excellent idea.
You may want to consider a better layout. you can generate one here
http://www.web2py.com/layouts
or use a free one for example:
http://www.freelayouts.com/templates/Paperova
Massimo
On Jun 21, 5:40 pm, "nathan.ms" wrote:
> I just released my first
http://www.appliedstacks.com/Popularity/
report your side to
http://www.appliedstacks.com/NewestFirst/web2py
Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to th
On Jun 21, 8:11 pm, Daniel Guryca wrote:
> Hey, I have just installed apache + web2py + mod_wsgi.
>
> Now results are very comparable to django results.
> Great !
that's a relief! I was getting a worried about web2py performance
after reading another thread on performance.
>
> I'm going to tes
> Can we get a discount on the updated Lulu version if we previously
> bought the original Lulu ebook version?
> A one-time deal, maybe??
+1!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" gro
Massimo,
what do you think of allowing file-like objects (stringio et al.) to
be used in includes?.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email
On Jun 21, 4:26 pm, mdipierro wrote:
> my guess is that currently do not change often so I would use cache
> the mapping:
>
> currencies=cache.ram('currencies',lambda: dict([(row.code,row.name)
> for row in db(db.currency.id>0).select()]), 5000)
> db.cache_account.currency.represent=lambda id: cu
Hello,
I'm trying to make a connection to a Firebird db file, but I keep
getting this error:
Traceback (most recent call last):
File "/var/www/alvinru/data/www/bilingsoft.ru/gluon/restricted.py",
line 98, in restricted
exec ccode in environment
File
"/var/www/alvinru/data/www/bilingsoft.ru/a
Consider this:
model:
db.define_table('x',db.Field('y_id',db.y,requires=IS_NULL_OR(IS_IN_DB
(db,'y.id','%(name)s'
db.define_table('y',db.Field('name','string',requires=[IS_NOT_EMPTY
(),IS_NOT_IN_DB(db,'y.name')]))
controller:
try:
records = db(db.x.id==int(request.args[1]))
valid_
Interesting site. It would be helpful to describe your service more
completely. I don't really understand what you are offering by just
looking at the site.
On Jun 21, 3:40 pm, "nathan.ms" wrote:
> I just released my first web2py application. It connects writers with
> editors. The rates are
>db.x.y_id.requires=IS_IN_SET(valid_y_ids)
IS_IN_SET takes a second parameter with the names you want to display
(or one parameter where the values and their displanames are provided
as a dictionary)
db.x.y_id.requires=IS_IN_SET(valid_y_ids, display_names)
On Mon, Jun 22, 2009 at 5:04 AM,
ok ok I got da buukn = ok ok I got the book.
:) It's very nice.
On Sun, 2009-06-21 at 13:25 -0700, mdipierro wrote:
> ?
>
> On Jun 21, 1:38 pm, Jason Brower wrote:
> > I got it, and yeah, it's worth it.
> > If your having trouble, and need to do your thesis, don't do anything
> > until you get
Massimo, I tried your migration suggestion but got an error message on
reading the 'somefile.csv' file:
Traceback (most recent call last):
File "", line 1, in
File "gluon/sql.py", line 997, in import_from_csv_file
ValueError: Mixing iteration and read methods would lose data
--~--~-~
How would it be different from?
{{=XML(filelikeobject.read())}}
Massimo
On Jun 21, 8:07 pm, DenesL wrote:
> Massimo,
>
> what do you think of allowing file-like objects (stringio et al.) to
> be used in includes?.
--~--~-~--~~~---~--~~
You received this message
Use this string instead. It seems some version is Firbird do not like
setting the default encoding to UTF8.
db = SQLDB('firebird://sysdba:passw...@localhost/employee.fd?
set_encoding=None')
On Jun 21, 9:54 pm, Alexei Vinidiktov
wrote:
> Hello,
>
> I'm trying to make a connection to a Firebird
It is quote old and primitive. You just select the colors, the fonts
etc. and then there is a "click here" to download the "layout.html" to
replace the default one.
Massimo
On Jun 21, 10:32 pm, Joe Barnhart wrote:
> Interesting site. It would be helpful to describe your service more
> complet
You must have an old version of web2py. That error cannot come form
line 997.
Massimo
On Jun 21, 11:24 pm, weheh wrote:
> Massimo, I tried your migration suggestion but got an error message on
> reading the 'somefile.csv' file:
>
> Traceback (most recent call last):
> File "", line 1, in
>
Ahh. Makes sense. Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
web2p
Now I receive an error message that says:
"'isc_attach_database: I/O error for file "employee.fdb?set_encoding=None"
Error while trying to open file. No such file or directory'"
On Mon, Jun 22, 2009 at 1:18 PM, mdipierro wrote:
>
> Use this string instead. It seems some version is Firbird d
I downloaded the latest version. Now the error message is:
Traceback (most recent call last):
File "", line 1, in
File "gluon/sql.py", line 1034, in import_from_csv_file
ValueError: Mixing iteration and read methods would lose data
--~--~-~--~~~---~--~~
You re
I've also tried commenting the lines
if charset != 'None':
self._execute('SET NAMES %s;' % charset)
in sql.py but then I got this error message:
Traceback (most recent call last):
File "/var/www/alvinru/data/www/bilingsoft.ru/gluon/restricted.py",
line 107, in restricted
exec ccode in
I am working on a view which will display a timetable. So far, this is
what I have got:
day
time
program
level
location
{{for program in timetable:}}
{{=program.day}}
{{=program.time}}
76 matches
Mail list logo