There is another way:
project_id=2&elem=forms&elem_id=2
That "fixes" this "problem".
mdipierro wrote:
> I think the issue is that they changed the behavior of the cgi module
> (http://bugs.python.org/issue1817) so that if the same variable
> appears both in the URL and in the submitted form it
Thanks for showing me how the db would be constructed in web2py.
My big question is how do I code to display the patient in dropdown
menu on a web page.
The user would select a patient and then all the prescriptions for the
patient would be displayed on the web page.
I could code in Django the vi
I what to create an manage groups in my application with auth , but
some groups are automatically created "user_id" when a new user
register...So when I want to list my groups I have to filter them for
exclude the "users" ones.
The second solution is to delete the groups automatically created ?
M
> Just a comment: I don't see any link to web2py ...and you should (cf
> licence)
Please explain this.
I cannot see such a request:
http://www.web2py.com/examples/default/license
This means you can redistribute web2py in binary or other closed source
form together with the applications you dev
I have been playing around with web2py to see what I can do or not do.
I must say I like what I see. It seems very intuitive and easy to work
with.
I am using windows XP SP3, python 2.5.4, web2py 1.64.4
It would seem that the default format for forms is to output them as
tables.
So I have look
> There is the Python Imaging Library (PIL) that lets you open and
> manipulate images from Python applications. Maybe it would be useful
> in this context?
many PHP projects use gd for such purposes.
It is normally supported on apache webservers.
Here is a python interface:
http://newcenturycom
>> Just a comment: I don't see any link to web2py ...and you should (cf
>> licence)
>
> Please explain this.
Sorry ,I missanderstood the string:
"We allow the redistribution of unmodified binary versions of web2py
provided that they contain a link to the official web2py site."
My English is ver
You need a group for each user if you want to be able to give
permissions to individual users. I guess I can add a flag to prevent
these from being created.
Massimo
On Jun 28, 8:32 am, Fauché JM wrote:
> I what to create an manage groups in my application with auth , but
> some groups are autom
This code in model:
db.prescription.patient.requires=IS_IN_DB(db
(db.auth_user.is_patient==True),
db.auth_user.id,'%(first_name)s %(last_name)s')
makes sure that a reference is always represened by the name of a
patient. You could make a search action like this:
def search_prescri
Actually the best way to customize forms is using the method explain
in slide 72 (slides are not at www.web2py.com).
Error messages normally are in form.errors and they get displayed
below the corresponding widgets but you can do the following in views
for example:
{{(errors,form.errors)=(form.e
O yes my bad, my bad... I wasn't running from source...
Sorry again for a bad report, I just install web2py on a new Linux
box...
Thanks,
Yannick P.
On Jun 27, 11:56 pm, mdipierro wrote:
> Did you install MySQLdb? If so, make sure you are running from
> source
> since the binary versions will
Hello,
I would like to share some web2py code snippets about making model
definitions reusable and allowing to manage user-defined fields.
First the model definition is swapped out to functions, which are used
in the db.define_table statement. So model-definitions are composed of
what I call a "
Hi Massimo,
Sorry for the late reply... This scenario is still not working on the
latest Web2py... I just email you the application that will help
debugging...
Thanks,
Yannick P.
On Jun 25, 8:53 am, Trollkarlen wrote:
> Can this be the same problem as I described in the "web2py 1.64.3"
> mail.
I have thought about using imagemagick something I have grown used to.
Let's see if I can't implement my ideas with PIL.
Regards,
Jason
On Sun, 2009-06-28 at 16:21 +0200, Tim Michelsen wrote:
> > There is the Python Imaging Library (PIL) that lets you open and
> > manipulate images from Python a
Yeah, that would probably be best. There are really several different
models for using groups, and the "make a group for every user" is only
one. When I am using groups explicitly, I usually do not want an
automatic group for every user.
On Jun 28, 7:48 am, mdipierro wrote:
> You need a group
I don't believe the redistribution of code applies in this case since
there is none. I downloaded web2py to my server, developed the app,
and then let other people use the app. All executables and python
programs are on my server and will not be redistributed to anyone. I
would like very much to h
Mind you can also do:
person=db.Table('person',SQLField('name'))
db.define_table('doctor',person,SQLField('specialty'))
On Jun 28, 10:40 am, phecker wrote:
> Hello,
>
> I would like to share some web2py code snippets about making model
> definitions reusable and allowing to manage user-defined
nevertheless it would be beneficial to the community (and ths to your
long term support interest) to have a "powered by web2py" sticker. You
can fine many at the bottom of this page:
http://www.web2py.com/examples/default/download
Massimo
On Jun 28, 12:50 pm, mdipierro wrote:
> The license doe
This code looks much cleaner, but the doctor table contains only the
speciality-column.
I looked at the source of class SQLTable in sql.py and the
documentation says, this should work:
"...
If a field is of type Table, the fields (excluding 'id') from
that table
will be used inst
Ok, I got it:
The first parameter of db.Table must be None. So this work:
person=db.Table(None, 'person',SQLField('name'))
db.define_table('doctor', person, SQLField('specialty'))
And this works also with multiple "table-fields":
table1 = db.Table(None, 'table1', SQLField('table1_field1'), SQL
I have been using web2py now since 2007 and i have found the framework
to be exceptional. My only grouse with it is that it is not too
designer friendly. I come from a web designer back ground and i always
like to design the interface first but with web2py, it seems that
Massimo who is an exceptio
I do not know if you are right or wrong since I never used dreamweaver
of photoshop to design forms.
Can you provide an example of what "gets in the way" and perhaps we
can find a better way.
massimo
On Jun 28, 2:26 pm, Pystar wrote:
> I have been using web2py now since 2007 and i have found th
OK but there is nothing wrong with the suggestion in your blog and it
is really good that you posting suggestions that can help other users.
Feel free to add an alterego entry that links to the web2py recipes on
your blog or copy your recipe directly in AlterEgo.
On Jun 28, 2:25 pm, phecker wrot
the only framework/templating I found very html-designer friendly is
tapestry (a java one), now an apache project.
On Sun, Jun 28, 2009 at 9:26 PM, Pystar wrote:
>
> I have been using web2py now since 2007 and i have found the framework
> to be exceptional. My only grouse with it is that it is no
Thanks for the reply. I'll try it out and see where I get to.
Regards
John Aherne
On Jun 28, 4:01 pm, mdipierro wrote:
> Actually the best way to customize forms is using the method explain
> in slide 72 (slides are not atwww.web2py.com).
>
> Error messages normally are in form.errors and the
I am not sure I understand what you mean by "designer friendly" could
you explain?
On Jun 28, 3:16 pm, Hans Donner wrote:
> the only framework/templating I found very html-designer friendly is
> tapestry (a java one), now an apache project.
>
> On Sun, Jun 28, 2009 at 9:26 PM, Pystar wrote:
>
>
tapestry works with html compliant files, enabling using normal html
tags with some special tapestry added attributes, thus enabling using
normal html tools
The html files can contain mock-ups that can be displayed during
design, but are replaced by real content when in a running
environment, Aga
tip:
if you use a Mac, try the tool Picturesque.
There are many tools that can do batch resizing on images and adding
suffixes like this. I think gimp also does it.
On Jun 28, 4:57 pm, Jason Brower wrote:
> I have thought about using imagemagick something I have grown used to.
> Let's see if I
By saying designer friendly i mean being able to design my forms, web
pages with whatever tool i want (e.g dreamweaver, photoshop) and still
have access to web2py's validators and other helpers without using a
walk around like "custom forms"
Pystar
On Jun 28, 9:52 pm, mdipierro wrote:
> I am not
I believe this is fixed in trunk.
On Jun 28, 4:29 pm, "mr.freeze" wrote:
> I get this error when trying to navigate to the change_password method
> exposed by auth:
>
> NameError: global name 'password_field' is not defined
>
> This is my custom auth table:
>
> from gluon.tools import *
> auth=A
I get this error when trying to navigate to the change_password method
exposed by auth:
NameError: global name 'password_field' is not defined
This is my custom auth table:
from gluon.tools import *
auth=Auth(globals(),db)# authentication/authorization
auth.settings.table_user = db.
The code in trunk does not pass this test.
I do not understand what this test tests and I do not recall who wrote
it.
Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to
In trunk you can do
auth.settings.create_user_groups=False
please give it a try
On Jun 28, 11:42 am, Joe Barnhart wrote:
> Yeah, that would probably be best. There are really several different
> models for using groups, and the "make a group for every user" is only
> one. When I am using gr
fixed and uploading
On Jun 28, 5:33 pm, "mr.freeze" wrote:
> The latest trunk won't start and gives me this on python25, winxp:
>
> Traceback (most recent call last):
> File "web2py.py", line 17, in
> import gluon.widget
> File "C:\web2py\gluon\widget.py", line 29, in
> from main i
This seems like it should be trivial, but I can't seem to get web2py
to play an audio file. If my audio file is
wav_file="c:/web2py/applications/test/uploads/test.wav"
mp3_file="c:/web2py/applications/test/uploads/test.mp3"
Then why doesn't this controller work?
def test_embed():
embed_wav=
I understand the general concept but I still miss the point. the HTML
generated by {{=form}} can be replaced by the HTML generated with
dreamweaver (*) and this is decoupled from the validation process that
happens in the controller.
(*) you have to make sure your form includes {{=form.hidden_fie
Thanks for straightening me out ... again and again. I promise I will
comprehend this some day. When the new doc comes out I will pledge to
read it carefully cover to cover.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
That's what I'm hoping to be able to do. I was looking over the
stickers the other day and thinking they looked good. I'll see what I
can do, but like I said, the site's public face is written in Ruby,
lives on a separate server, and is out of my direct control. But we'll
see ... I can be quite pe
This works now, but only if written exactly as you wrote it above --
separating the requires clause from the define_table clause. I wonder
why you can't combine the two into a single
db.define_table('x', db.Field(...), ... x.name.requires=[...])?
--~--~-~--~~~---~-
The latest trunk won't start and gives me this on python25, winxp:
Traceback (most recent call last):
File "web2py.py", line 17, in
import gluon.widget
File "C:\web2py\gluon\widget.py", line 29, in
from main import HttpServer, save_password
File "C:\web2py\gluon\main.py", line 37,
You can but not if the latter (requires) uses a variable (db.x) is not
yet defined (you are inside db.define_table('x',...)
On Jun 28, 5:49 pm, weheh wrote:
> This works now, but only if written exactly as you wrote it above --
> separating the requires clause from the define_table clause. I won
Understood. Makes sense. Now I understand why you've adopted the style
of putting all the requires outside the table definitions. Keeps
things honest.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framew
you do not expose real file paths, only urls.
1) You do not put your files under upload (SQLFORM does that), so I am
going to assume you move the two files under 'static'
2) the code should be
wav_file=URL(r=request,c='static',f='test.wav')
mp3_file=URL(r=request,c='static',f='test.mp3')
now t
Along this line of using URLs and joins, I'm doing the following but
it's not working for me:
input_file = URL(r=request,a='static',c='temp',f='test.txt')
ifile=open(input_file,'w')
This doesn't work, either:
input_file = os.path.join(request.folder,URL
(r=request,a='static',c='temp',f='test.tx
I don't see the author's point. I'm able to easily do things that are
visually pleasing, are information dense, yet easy to understand.
Things that would have taken me a lot longer to hack together without
web2py.
--~--~-~--~~~---~--~~
You received this message beca
I think that is what i need. A tutorial about how to create custom
forms using web2py. I really need it badly and i guess some other
people do too.
Thanks
Pystar
On Jun 29, 12:14 am, mdipierro wrote:
> Perhaps we should make some video on how to create custom forms. I am
> not the right person t
I believe the only two pending patches are from Hans and Alexey
related to tickets support on GAE.
I will try take care of those tonight.
Am I forgetting anything?
Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
Thanks. change_password is working now.
On Jun 28, 5:46 pm, mdipierro wrote:
> fixed and uploading
>
> On Jun 28, 5:33 pm, "mr.freeze" wrote:
>
> > The latest trunk won't start and gives me this on python25, winxp:
>
> > Traceback (most recent call last):
> > File "web2py.py", line 17, in
>
Perhaps we should make some video on how to create custom forms. I am
not the right person to do this since i do not even have dreamweaver.
On Jun 28, 5:58 pm, weheh wrote:
> I don't see the author's point. I'm able to easily do things that are
> visually pleasing, are information dense, yet eas
Can you patch tools.py random_password so that it generates a password
that meets any possible complexity requirement of the new IS_STRONG
validator? Something like this maybe:
def random_password(self):
import string
password = ''
specials=r'!...@#$*?'
for i in range(0,3):
I don't test it but what do you think about something like this?
in tools.py in the class Auth:
in __init__:
auth.settings.create_user_groups=True
in function register:
...
if form.accepts(request.vars, session, formname='register',
onvalidation=onvalidat
No. Let's step back for a sacond.
Say you have a file in path="/home/you/somewhere/file.txt" the path
allows you to identify the file and web2py server side can access the
file using
open(path,'r').read() or open(path,'w').write()
nevertheless this file cannot be requested remotely. There is
what is implemented is basically the same even if implemented slightly
differently because the issue appears in two places.
Massimo
On Jun 28, 7:10 pm, Fauché JM wrote:
> I don't test it but what do you think about something like this?
> in tools.py in the class Auth:
>
> in __init__:
> auth.s
Or better yet, make it configurable:
def my_random_pw():
auth.settings.random_password = my_random_pw
On Jun 28, 6:48 pm, "mr.freeze" wrote:
> Can you patch tools.py random_password so that it generates a password
> that meets any possible complexity requirement of the new IS_STRONG
>
Thank you, samwyse!
On Jun 27, 4:47 am, samwyse wrote:
> On your fist page: "We firmly beleive" => "We firmly believe"
> I'd fix it ASAP.
>
> On Jun 26, 10:11 am, Vidul wrote:
>
>
>
> > Congratulations!
>
> > Though a lot simpler than yours, here is my first WEB2PY application
> > (runs on GAE
It is configurable
class MyAuth(Auth)
def random_password(self): return 'a'
Massimo
On Jun 28, 7:49 pm, "mr.freeze" wrote:
> Or better yet, make it configurable:
> def my_random_pw():
>
>
> auth.settings.random_password = my_random_pw
>
> On Jun 28, 6:48 pm, "mr.freeze" wrote:
I do not understand what does the web2py does vs what RoR does.
Massimo
On Jun 28, 5:39 pm, weheh wrote:
> That's what I'm hoping to be able to do. I was looking over the
> stickers the other day and thinking they looked good. I'll see what I
> can do, but like I said, the site's public face is
Hi Massimo,
Thank you very much!
The images in the "about" page are fixed.
Regards,
Vidul
On Jun 26, 7:20 pm, mdipierro wrote:
> Hi Vidul,
>
> since this is a consulting company, let me know if you want to be
> listed as an "affiliated company" on the web2py site, i.e. a company
> that does we
Oh yeah, inheritance :)
On Jun 28, 8:34 pm, mdipierro wrote:
> It is configurable
>
> class MyAuth(Auth)
> def random_password(self): return 'a'
>
> Massimo
>
> On Jun 28, 7:49 pm, "mr.freeze" wrote:
>
> > Or better yet, make it configurable:
> > def my_random_pw():
> >
> >
> > a
I think there are several things mixed in here, and it would be good to
separate them, talk about them one at a time:
--> Photoshop design: This presumably talks about layout of html or flash
user interface;
> what is needed here?
Perhaps:
-- standard naming of css fields (for htm
I personally feel this falls in the lines of IDE or fancy plugin.
Perhaps something for Gimp if you want photoshop like, or a plugin for
Geanery or Bluefish.
Regards,
Jason
On Sun, 2009-06-28 at 14:39 -0700, Pystar wrote:
> By saying designer friendly i mean being able to design my forms, web
I guess one think that is not documented is the css naming convention
follwed by web2py
for a table "table" and a field "field" of type "type" the
tag must have:
name="field" -> required for form submission and processing
id="table_field" -> required for css
class="type" -> required f
Yeah, I could use gimp, but I was hoping on a system where it would
create a thumb for me. That way when I use an image it would have a
perameter I could send to it to tell it to resize before sending to
server.
Regards,
Jason
On Sun, 2009-06-28 at 14:40 -0700, Francisco Gama wrote:
> tip:
> if
That would be one thing
I saw this today, a form defined in "wikiform" -
http://sandbox.jspwiki.org/Wiki.jsp?page=BugReportSystem
For this to be interesting, you should "edit" this sandbox page which holds
the description of the form.
The fields are described here:
http://sandbox.jspwiki.org
I think imagemagic is the best way. It is in every unix system and it
very easy to use form the shell. You could even make your own
validator that calls os.system('convert ') on upload.
Massimo
On Jun 28, 10:04 pm, Jason Brower wrote:
> Yeah, I could use gimp, but I was hoping on a system w
Page 72 of the slides in web2py.com. It maps one to one.
Massimo
On Jun 28, 10:21 pm, Yarko Tymciurak wrote:
> That would be one thing
>
> I saw this today, a form defined in "wikiform"
> -http://sandbox.jspwiki.org/Wiki.jsp?page=BugReportSystem
>
> For this to be interesting, you should "
Is this just me, maintenance, or some problem?
I cannot find this site/domain; nslookup on the spinyc.com domain also
can't find the domain.
Registry entry for spinyc.com shows it belongs to Spin NYC LLC, so I thought
I'd report this.
Regards,
Yarko
On Fri, Jun 26, 2009 at 9:51 AM, weheh wro
the gd library code looks stagnant since 2007... is this correct?
On Sun, Jun 28, 2009 at 9:21 AM, Tim Michelsen
wrote:
>
> > There is the Python Imaging Library (PIL) that lets you open and
> > manipulate images from Python applications. Maybe it would be useful
> > in this context?
> many PHP
Thanks!!
Here is the reason why I am asking... where CSS / HTML5 / JS files are
place within Web2Py framework.
It is now possible to build outstanding and fully functional iPhone
applications that take full advantage of all native iPhone ObjectiveC
calls.
What is the correct way to incorporate recaptcha into a form_factory
form? I keep getting this in form.errors.
Storage: . The captcha validates
fine as there is no 'recaptcha':'invalid!' pair in form.errors but
form.accepts fails. As always, thanks for any help.
def contact():
captcha = Rec
Too bad the article you refer to does not mention web2py which is the
ONLY development environment that allows you to write code that runs
on the iPhone and on Google App Engine without modifications.
This is the web2py folder structure
\web2py
README
LICENSE
TODO
def contact():
form = SQLFORM.factory(
SQLField
('auth_user',db.auth_user,default=auth.user.id,writable=False,readable=False),
SQLField('subject','string',length=128,requires=IS_NOT_EMPTY
()),
SQLField('message','text',requires=IS_NOT_EMPTY()))
form[0].insert(-1,
Markus,
sorry for my delay about this issue. Two questions:
1) will this make sqlite files created by web2py windows binary
incompatible with web2py osx binary and or web2py running form source?
If so how bad is the incompatibility?
2) Can you send me step by step instructions for including the f
I'd also be interested in this. I want to prepend a timestamp [with
strftime('%y%m%d%H%M%S')] to the upload filenames so when I browse
them they are in alphabetical order.
Richard
On Jun 4, 11:51 pm, mdipierro wrote:
> I have no objection in taking the code out in a function.
> But if one over
h
I do not see it; certainly not from slide 72 - in fact, I'm not sure what
this slide tells me.
Perhaps there are things on this slide that are obvious to some, but not to
others (?)
On Sun, Jun 28, 2009 at 10:38 PM, mdipierro wrote:
>
> Page 72 of the slides in web2py.com. It maps o
This is a very delicate mechanism. There are many parts that need to
cooperate to make this work. I will look into it but I cannot make
promises.
Massimo
On Jun 28, 11:32 pm, Richard wrote:
> I'd also be interested in this. I want to prepend a timestamp [with
> strftime('%y%m%d%H%M%S')] to the
WikiForm
[{FormOpen}] add your own wiki text in here
[{FormInput name="test"}]
[{Form element='submit' name='x' value='Update'}]
[{FormClose}]
web2py custom form (assuming a form object passed from the action):
{{=form.custom.begin}} add your own html text in here
{{=form.custom.widget.test}}
{
Hi, there
In the trunk head,
There is a "print..." in gluon/restricted.py line 1, which commit in
the last -r1085, which cause mod_wsgi module failed to run web2py.
Remove the 'print' make web2py running happy.
--~--~-~--~~~---~--~~
You received this message b
78 matches
Mail list logo