Sorry for bothering, solved
On Wednesday, December 5, 2012 9:28:54 AM UTC+2, Aurelijus Useckas wrote:
Hi Massimo,
One of my users gets an error: Bad Request (request.client=unknown)
Does it have anything to do with your update? Can I change the requirement
somewhere? Thank you
On
I think there is a problem with forward-referenced tables, at least when
using Postgres.
I tried the trunk release on Postgres today (for the first time) and
noticed that it would not take any tables defined with forward references
(using Field 'xxx' 'reference yyy' syntax). If I moved the
and why should you need it ?
you can always do:
newthing = {}
if something:
newthing = form.vars
dowhatever with newthing (it's an empty dict that in theory shouldn't hurt)
On Wednesday, December 5, 2012 1:49:00 AM UTC+1, Daniele wrote:
How can I blank out all the **form.vars in the
Thanks guys.
https://groups.google.com/forum/?fromgroups=#!topic/web2py/xN0813r58N
Tried to look at this thread, but the topic ID seems to be invalid or no
longer available.
But no worries, I was just checking if I was doing something incorrectly.
Thanks again.
Regards,
Rakesh
--
This is probably old news, but I noticed this evening that altering a table
which is used as a parent by another does not cause its child table to be
altered.
I have a table which I added a unique=True constraint on this evening and
its child table did not get the added constraint when web2py
uhm: are you sure that adding unique=True gets the created index also in
the parent table ? I think that the unique is enforced only on creation and
not in migration (but the requires=IS_IN_DB() gets added anyway). In any
case, what are you observing? (in other words, post a model and a
El martes, 4 de diciembre de 2012 23:16:08 UTC-3, Massimo Di Pierro
escribió:
````:comment
MARKMIN(text, extra=dict(comment=lambda t:''))
Thanks Massimo.
Is the comment kwarg used in the book app? If not, I belive this could be
handy for commenting translations (unless there's a
And what was the problem?
On Wed, Dec 5, 2012 at 6:12 AM, Aurelijus Useckas
aurelijus.usec...@gmail.com wrote:
Sorry for bothering, solved
On Wednesday, December 5, 2012 9:28:54 AM UTC+2, Aurelijus Useckas wrote:
Hi Massimo,
One of my users gets an error: Bad Request
Thanks for the reply. I will the section in the book to get a clearer
understanding of what is happening. Unfortunately both solutions posted
here didn't work, no redirection or verification.
On Monday, December 3, 2012 2:43:23 AM UTC+1, Anthony wrote:
Read through the CRUD section of the
Guys I know this sounds simple but I'm having a hard time displaying
uploaded images. I have an upload field in my model where logged in users
can upload an image. But in my views when I try to do
{{=IMG(_src=URL('uploads/', row.image))}} where row is a variable that
refers to
I do not recall what this is about and the link is broken? Where is this
pending patch?
On Tuesday, 4 December 2012 21:25:50 UTC-6, Roberto Perdomo wrote:
The solution to this problem was resolved by Mike Leone and wait for the
approval of Massimo.
Conversation can be found here:
I'm a beginner with python and wanted to make an attempt at web-dev. After
quite a while of searching I found web2py, but I'm having trouble wrapping
my head around a few things it does.
As of right now I have a simple login page designed that has some HTML
forms in it already:
Sorry, the conversation is here:
https://groups.google.com/forum/?fromgroups=#!searchin/web2py/reference$20web2py$20smartgrid/web2py/xN0813r58Nc/aSGonwPH580J
and the patch:
https://gist.github.com/ff543a5c6d3bc14b9079
2012/12/5 Massimo Di Pierro massimo.dipie...@gmail.com
I do not recall
You do not specify the uploads directory in the URL. Instead, you need to
define a function that calls response.download() and pass the filename to
that function via the last URL argument (i.e., request.args[-1]). In fact,
this function is already provided for you in the welcome app:
def
Thanks for the suggestion. An autocomplete widget is a good alternative. On
further thought, and in keeping with the spirit of web2py, perhaps a
threshold based on the count of the number of records (say 100 rows) may be
used to determine if SQLFORM selects an options widget or autocomplete
Hello Clinton.
You never redo the source of pages.
Say you want to create a page to edit thing.
You edit models/db.py file and append:
db.define_table('thing',Field('name',requires=IS_NOT_EMPTY())
Then you edit controllers/default.py and you add:
def manage_things(): return
I do not think we can make this automatic for two reasons:
- you would need an extra db query to figure out how many records
- the autocomplete widget needs extra parameters and they are not always
obvious, you may need to specify some of them manually.
On Wednesday, 5 December 2012 09:36:42
Check out the SQLFORM in
HTMLhttp://web2py.com/books/default/chapter/29/07#SQLFORM-in-HTMLsection of
the book. That's essentially your situation -- you already have
custom HTML for your form (which you should convert to a web2py view), and
you just need to handle the processing of the form
I use lazy tables so all the foreign keys in my model are defined with
forward reference syntax. I am using PostgreSQL for the database. I have to
qualify that the schema is unchanged and the tables are as they were before
trying trunk. Previous version in use was 2.2.1. The application I am
now it works, had to put everything in the right order:
crud.settings.create_next = URL('index')
post=db(db.blog.id==request.args(0)).select().first()
db.comments.post_id.default=post.id
form=crud.create(db.comments)
Thanks again
On Wed, Dec 5, 2012 at 12:55 PM, jonas
1. for textarea, set _rows and _cols.
2. press shift-enter instead.
3. _disabled?
On Wednesday, December 5, 2012 6:46:16 AM UTC-7, Francisco Barretto wrote:
Hi there, it might be (and probably is) a silly but I have a series of
questions concerning the following form:
I'd also like to add that you should be able to find this by looking at the
source code. In gluon/html.py. It is surprisingly readable.
On Wednesday, December 5, 2012 9:48:23 AM UTC-7, Derek wrote:
1. for textarea, set _rows and _cols.
2. press shift-enter instead.
3. _disabled?
On
I just closed this ticket but could not test it:
http://code.google.com/p/web2py/issues/detail?can=2start=0num=100q=colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summarygroupby=sort=id=265
Can some someboby help me check winservice is not broken in trunk?
--
If you want a textarea element, then don't use INPUT(_type='textarea') --
instead it should be TEXTAREA(). Once you do that, hitting enter will
insert a line break rather than submit the form, and you'll be able to set
the columns and rows if you don't like the default size.
Anthony
On
Hi, Derek!
Indeed the source is readable, thanks. I had to use TEXTAREA(...) instead
of INPUT(...) in order to get _cols and _rows attributes. Couldn't manage
to edit these parameters through INPUT. There is no main problem with this
change, just a format question. The second point, is that
Third question is still open. How to set an text type input non-editable?
_disabled does not work. It always fails on validation, even with a default
valid value.
Francisco Barretto
Doutorando PPG-Arte - Arte e Tecnologia
Laboratório de Pesquisa em Arte Computacional (Midialab)
Departamento de
Try INPUT(..., _readonly='readonly') -- I think that should work in most
browsers. Note, when you use SQLFORM with a writable=False field, web2py
simply displays the value by itself (i.e., not within an input /
element), so you could try that approach as well.
Anthony
On Wednesday, December
I have def download(): return response.download(request,db) in my
controller. But when I put {{=URL('default', 'download', args=row.image)}}
in my view I'm just getting a string. Perhaps because the file was not
saved to this directory?
On Wednesday, December 5, 2012 2:25:57 PM UTC, Anthony
hi
this is probably a trivial problem but I post it anyway:
I have an image model:
db.define_table('blog',
Field('date','datetime',default=request.now),
Field('image','upload'),
Field('imageTitle','text',default=image text),
Field('title','text'),
Field('text','text'))
#
ehm in html you need to do img src=/something/photo.png /.
{{=URL('default', 'download', args=row.image)}} is just the portion to put
into the img tag as the src's attribute value
{{=IMG(
_src=URL('default', 'download', args=row.image)
)
}}
is the right one!
On Wednesday, December 5,
hmm still not working. I think it's because I set the upload directory to
uploads/profiles/ so it's not finding the image. Maybe if I change that
setting it will work...
On Wed, Dec 5, 2012 at 5:43 PM, Niphlod niph...@gmail.com wrote:
ehm in html you need to do img src=/something/photo.png
do you have a def download(): in controllers/default.py ?
That one is the main handler for using URL('default', 'download',
args=row.something) as a downloader of an 'upload' record.
On Wednesday, December 5, 2012 6:41:58 PM UTC+1, jonas wrote:
hi
this is probably a trivial problem but I
Yeah I checked my controller and it's uploading images to
Field('image', 'upload',
uploadfolder=os.path.join(request.folder,'uploads/profiles/')
Is there a default directory where the download() function wants images to
be?
On Wed, Dec 5, 2012 at 5:55 PM, Daniele Pestilli
Works fine, Anthony!
Francisco Barretto
Doutorando PPG-Arte - Arte e Tecnologia
Laboratório de Pesquisa em Arte Computacional (Midialab)
Departamento de Artes Visuais
Instituto de Artes
Universidade de Brasília - UnB
Campus Universitário Darcy Ribeiro
Asa Norte
70910-900, Brasília - DF
Thanks to Ming Huang we now have the web2py book in Chinese in PDF:
https://dl.dropbox.com/u/18065445/web2py/web2py_manual_chinese_3rd.1.pdf
If you can help convert it to Markmin and ok generating a better PDF from the
ODT, please let me know.
Massimo
--
Maybe I did something odd at the same time. Like I say, I'm new to
Postgres. I'll try a clean pull of the trunk and my app and try again.
-- Joe
On Wednesday, December 5, 2012 8:14:17 AM UTC-8, Ron McOuat wrote:
I use lazy tables so all the foreign keys in my model are defined with
Ok, here is the setup. I have a table defined:
db.define_table(xxx,
Field(lastname,string,length=50,label=Last name,requires=
IS_NOT_EMPTY() ),
Field(firstname,string,length=50,label=First name,requires=
IS_NOT_EMPTY() ),
Field(middlename,string,length=50,label=Middle name ),
no I didn't have it. added this:
def download():
return response.download(request, db)
and now it works. thanks
On Wed, Dec 5, 2012 at 6:56 PM, Niphlod niph...@gmail.com wrote:
do you have a def download(): in controllers/default.py ?
That one is the main handler for using
I thought by deleting the _archive tables I would no longer be using it.
However now when I try and submit a change to the db I get this error:
table myTable_archive already exists
I'm just trying to learn this system and I don't feel I really need to
archive things just yet. getting
So I have been wanting to get JSON working in web2py and be able to pull
data from web2py and use it in some javascript. I made it work. Thought I
would share. See attached.
Note also that I am using YUI3 instead of jQuery, just for a little extra...
Next, I will need to find a way to send
seems that web2py is trying to create those tables: how exactly did you
deleted them ?
On Wednesday, December 5, 2012 8:18:57 PM UTC+1, pumplerod wrote:
I thought by deleting the _archive tables I would no longer be using it.
However now when I try and submit a change to the db I get this
I'm trying to use pytest (instead of unittest) to do unit testing for a
web2py app. I've written a script (attached: runtest.py) to launch py.test,
which then finds and executes my test files. I run this launcher script in
a web2py environment like this:
python ~/web/web2py/web2py.py -S
no, works perfectly fine with whatever uploadfolder you set: the important
thing is that you are showing an image that was uploaded when uploadfolder
was already set as your current one (in other words, uploads done with a
different uploadfolder will not be found because they reside into
I went through the admin interface and deleted from there. Then I went
into my models/*.py files and made sure no _Archive tables were being
created.
When I go back through the admin interface I no longer see the _Auth tables.
On Wednesday, December 5, 2012 11:59:03 AM UTC-8, Niphlod wrote:
Perhaps check your controllers to see if an update call is being made.
Seems I had an app created with the wizard that added update code to the
controllers.
On Wednesday, December 5, 2012 2:18:46 PM UTC-6, pumplerod wrote:
I went through the admin interface and deleted from there. Then I
thx. Just checked with stable and development, columns get migrated and a
costraint is applied both to the parent and the child table
On Wednesday, December 5, 2012 7:58:30 PM UTC+1, Joe Barnhart wrote:
Ok, here is the setup. I have a table defined:
db.define_table(xxx,
uhm, somewhere there is probably a form =
SQLFORM.smartgrid(db.yourtable,onupdate=auth.archive).
PS: removing a table from the models has the only effect to never be able
to access the table on the db by DAL: to delete the table you should delete
it right on the database (not from the web2py
Getting my feet wetter, I've been reading about generating forms. Very
cool stuff. Before I break things too badly though I thought I'd ask:
I see that when I create a new app, web2py automatically generates a user
view and user() function in the default.py file.
All that does is return
Hi monotasker.
I'm starting to run something like that and I'm giving
gluon/contrib/webclient.py a try.
I intend to prepare an environment to allow running tests using both
unittest2 or pytest.
I think next week I'll already have a decently running environment.
--
Vinicius Assef
On Wed, Dec
That would be great. I'd really appreciate seeing the code whenever you
have a working version. I'm also interested in figuring out why the module
imports aren't working in my existing script, since there's obviously
something I'm missing about running files in a web2py environment.
Best,
Ian
Sure you'll see it.
I'll put it in a github repo.
On Wed, Dec 5, 2012 at 7:14 PM, monotasker scotti...@gmail.com wrote:
That would be great. I'd really appreciate seeing the code whenever you have
a working version. I'm also interested in figuring out why the module
imports aren't working
Hi Folks,
I am trying to create some tables using DAL + Mysql and I got:
Ticket ID
127.0.0.1.2012-12-05.11-51-55.a267bd2c-0651-43c1-8194-56f3e5ee8fb8
class 'gluon.contrib.pymysql.err.InternalError' (1005, uCan't create
table 'frasesdb.frase' (errno: 150))
This is my model:
Could be this table 'frase' exists of is a mysql keyword?
On Wednesday, 5 December 2012 15:31:37 UTC-6, Tito Garrido wrote:
Hi Folks,
I am trying to create some tables using DAL + Mysql and I got:
Ticket ID
127.0.0.1.2012-12-05.11-51-55.a267bd2c-0651-43c1-8194-56f3e5ee8fb8
class
I am new to web2py and have been going through the books and examples and
was wondering if when creating foreign-key if 'reference tablename' or
db.tablename is better to use.
I looked in the 4th edition of the book and there is an example where a
table has multiple references to itself;
It will be good if you create a post it in web2pyslices.com (there you have
an option to upload files, but you can use any shared hosting and just put
the link there)
*Bruno Cezar Rocha** - @rochacbruno*
rochacbr...@gmail.com | Mobile: +55 (11) 99210-8821
www.CursoDePython.com.br |
Just solved the problem... I was declaring another table used by 'frase'
after the 'frase' declaration, when I moved it, it works!
Thanks!
Tito
On Wed, Dec 5, 2012 at 6:47 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Could be this table 'frase' exists of is a mysql keyword?
On
On Wednesday, December 5, 2012 8:35:38 PM UTC+1, len wrote:
I am new to web2py and have been going through the books and examples and
was wondering if when creating foreign-key if 'reference tablename' or
db.tablename is better to use.
I looked in the 4th edition of the book and there is
This indeed was happening. Thanks so much for helping understand.
On Wednesday, December 5, 2012 12:25:49 PM UTC-8, Bill Thayer wrote:
Perhaps check your controllers to see if an update call is being made.
Seems I had an app created with the wizard that added update code to the
Can you shed some more light on this? I checked into the custom forms, but
it doesn't really create the desirable effect I was going for. Here's what
I have for the view:
{{extend 'login.html'}}
{{=form.custom.begin}}
div id=userboxUsername: {{=form.custom.widget.username}}/div
br /
div
http://quepy.readthedocs.org/en/latest/
--
call for help. I almost managed to get a simple uwsgi emperor config
running on upstart (will post that script soon) on ubuntu. Hopefully it
should alleviate the problems and the intricacies of
managing/installing/upgrading the overcomplicated standard debian
distribution. Works on 12.04 and
On Thursday, 6 December 2012 04:03:41 UTC+11, Massimo Di Pierro wrote:
I just closed this ticket but could not test it:
Hmm for some reason it's not working for me. I took a look at the source
code and this is the HTML that is being generated:
img src=/download/image.a6e29a6f36771685.e58699e79c9f2e4a5047.JPG
view-source:http://127.0.0.1:8000/download/tutor.image.a6e29a6f36771685.e58699e79c9f2e4a5047.JPG
/
And
I have several apps running and am successfully able to add users to the
auth_user table during registration. I keep track of which app they
registered through to setup certain permissions. This all seems to work
fine. However, I am only able to login the user via one app (the initial
one I
I tested, the problem is that it generates all the html page, can not
render header.But it is Very good!
Ovidio Marinho Falcao Neto
Web Developer
ovidio...@gmail.com
ovidiomari...@itjp.net.br
ITJP - itjp.net.br
83
Your apps should have the same hmac_key
, there is a key file in /private folder.
On Wed, Dec 5, 2012 at 11:01 PM, pumplerod pumple...@gmail.com wrote:
I have several apps running and am successfully able to add users to the
auth_user table during registration. I keep track of which app they
El miércoles, 5 de diciembre de 2012 20:39:18 UTC-3, Massimo Di Pierro
escribió:
http://quepy.readthedocs.org/en/latest/
Would it be possible to create a natural language db query interpreter for
web2py with that? Or is there anything that does it already?
--
Why not use groups of users for each application?
Ovidio Marinho Falcao Neto
Web Developer
ovidio...@gmail.com
ovidiomari...@itjp.net.br
ITJP - itjp.net.br
83 8826 9088 - Oi
83 9336 3782 - Claro
And I just tried again and it definitely did NOT add the constraint to the
second table. Are you sure you added a constraint of unique=True? Maybe
it depends on the type of constraint added (notnull, unique, etc.).
-- Joe B.
On Wednesday, December 5, 2012 12:25:51 PM UTC-8, Niphlod wrote:
Wait! I figured it out! When lazy_tables=True the column structure is
migrated only when the table is built. Duh! I switched lazy_tables=False
and it migrated table 2 as you experienced.
Whew! I thought I was going crazy(er) for awhile!
-- Joe B.
On Wednesday, December 5, 2012 12:25:51
HI Massimo --
If we do this in the context of the Field(...) definition inside a Table,
does lazy_tables still work as expected? Or does it materialize the table?
-- Joe B.
On Tuesday, December 4, 2012 6:55:23 AM UTC-8, Massimo Di Pierro wrote:
If the value of B.A comes from a A.id
I am building an application that needs will need to import data from csv
from time to time. I hope that my question is a fairly simple one. I am
trying to determine if I should upload the file to a static directory or
load it in the DB using the DAL upload feature. Is there an advantage to
Hmm for some reason it's not working for me. I took a look at the source
code and this is the HTML that is being generated:
img src=/download/image.a6e29a6f36771685.e58699e79c9f2e4a5047.JPG /
And this is what I have in my view that is generating that code:
{{=IMG(_src=URL('default',
The web2py version is loading the web2py.css stylesheet, which among other
things sets the width of text boxes to 300px. Also, for the submit button,
web2py generates an input of type submit with no class, but yours is of
type button with class button -- so you should either create your own
Hello web2pyers,
During PyCon Brazil I talked to some people from Brasilian community
(@viniciusban and people at X4 agency) about a possible web2py conference
happening here in Brazil. After that I had the opportunity to speak
personally with Massimo about this subject and then he suggested we
Auth is a callable class, so auth() calls the __call__()
methodhttp://code.google.com/p/web2py/source/browse/gluon/tools.py#1219,
which then looks at request.args(0) to discern the particular Auth function
that was requested and then calls that function. In /default/user/register,
register is
Thanks, that is a really helpful explanation.
--
On Sunday, December 2, 2012 10:20:28 AM UTC-5, dlypka wrote:
One GOTCHA I found with WING IDE is that you must delete all .pyc files
before running, in order to have it correctly
stop on your breakpoints in non-module code, in the case where such .py
source has been subsequently modified
I think it should be April 27 or 28 (one day, 9am-7pm, ~10 20 minutes
talks, ~4 1hr talks, discussions + local parties at nighttime)
I suggest we create a web site where people can
* volunteer space
* volunteer to give a talk (20 mins - 1hr)
- demo something they built on web2py
- talk
Yes. Assuming the web2pycronservice works. I write it but did not try,
On Wednesday, December 5, 2012 6:00:50 PM UTC-6, Tim Richardson wrote:
On Thursday, 6 December 2012 04:03:41 UTC+11, Massimo Di Pierro wrote:
I just closed this ticket but could not test it:
In file wgsihandler.py
# change these parameters as required
LOGGING = False
SOFTCRON = True
What does i miss?
--
81 matches
Mail list logo