Is it true that SQLFORM autocomplete widget doesn't work with non-
ascii characters?
Or is there any adaptations to the codes shown in web2py book that'll
make it work?
Hi Denes,
Thanks for your reply, removing the else: ... solved the problem. I
followed the if: .. elif: .. else: .. pattern used in the chapter on
forms and validators in the web2py manual. Why does it work in a
single form function and why doesn't it work in a multiple form
function?
> Since yo
Hello all,
for testing purposes I want to create a bunch of users with a script. How
can I do this ?
I found nothing in the book, but maybe I searched for the wrong keywords ...
Thanks
Norbert
Thanks.
On Mar 1, 2:08 pm, Massimo Di Pierro
wrote:
> fixed in trunk now.
>
> On Mar 1, 11:13 am, surfnet3 wrote:
>
>
>
>
>
>
>
> > The newest.
>
> > On Mar 1, 9:17 am, Massimo Di Pierro
> > wrote:
>
> > > what web2py version? they should be the same.
>
> > > On Mar 1, 1:19 am, surfnet3 wrote:
Massimo,
I am finally getting around to implementing upload fields that store the
actual uploaded file in Rackspace Cloud Files instead of in the local
filesystem or in the database. Thank you for adding custom_retrieve to
Field in 1.92.
I will need custom_delete, too, of course. (Sorry for
+1 for the buttons
2011/3/2 Massimo Di Pierro :
> we included in the welcome app in trunk. Martin did all the work. Ic
> consists of a revised base.css and two png files. Nothing more that
> makes the app more complex.
>
> On Mar 1, 3:55 pm, Martín Mulone wrote:
>> see attach, Today I was playi
Yes we are talking about the buttons. Nothing else changed.
Can used if you want, for example if you want to add a link - button -search
add this to the view:
{{=A(SPAN(_class='magnifier icon'),'Search',_href='#',_class='button')}}
2011/3/2 Michele Comitini
> +1 for the buttons
>
>
>
> 2011/3/
OMG I have fallen into a very deep deep deployment rabbit hole and
just when I thought for sure I was finished Sebastien gave a talk at
Montreal Python on Monday on Fabric and two of his creations, Cuisine
and Watchdog. Cuisine adds Chef like abilities to Fabric and Watchdog
is monitoring system th
Hi. I'm new with Web2py and have a question.
I have a table with a boolean, and the user can add or remove
checkboxes. The table is updated with the new value, but I need my
form re-populated so that it shows the changes.
My code is the following:
def sucursales():
records=db(db.auth_sucursa
I am looking at the following example here located
http://web2py.com/AlterEgo/default/show/106
If you go to the heading
PHP files and web2py views
Further down there is a web2py example. Now i create a controller
called loop and a html page called loop but how do i call the
controller in the
I am a newbie wrt web2py , but I think it is just the other way round. You
place the loop.html in the views/default directory and the controll calls it
automagically.
Probably making your own is easier.
On Mar 2, 12:28 am, Kenneth Lundström
wrote:
> I m trying to create a form where user enters a reference number from
> bills. I have three criterias:
>
> IS_EMPTY_OR
> IS_NOT_IN_DB
>
> this two works great, but to check that user hasn t done a mistaken when
> i
or simply
URL('static','images/filename')
the f= and c= are no longer necessary.
On Mar 2, 1:41 am, Jonathan Lundell wrote:
> On Feb 22, 2011, at 11:47 PM, Johann Spies wrote:
>
> > Without the routes.py file I can work with the image in static/images but
> > not when routes.py is active.
>
>
I'll check.
On Mar 2, 1:54 am, surfnet3 wrote:
> Is it true that SQLFORM autocomplete widget doesn't work with non-
> ascii characters?
>
> Or is there any adaptations to the codes shown in web2py book that'll
> make it work?
On Mar 2, 3:27 am, annet wrote:
> Hi Denes,
>
> Thanks for your reply, removing the else: ... solved the problem. I
> followed the if: .. elif: .. else: .. pattern used in the chapter on
> forms and validators in the web2py manual. Why does it work in a
> single form function and why doesn't it
just loop and
for i in range(n):
db.auth_user.insert(first_name=...,
...
password=db.auth_user.password.validate('password')[0]
registration_key='')
On Mar 2, 2:28 am, Norbert Klamann
wrote:
> Hello all,
> for testing purposes I want to create a bunch of users wit
Please open an issue in googlecode and I may add it tomorrow.
On Mar 2, 4:25 am, Art Zemon wrote:
> Massimo,
>
> I am finally getting around to implementing upload fields that store the
> actual uploaded file in Rackspace Cloud Files instead of in the local
> filesystem or in the database. Thank
#
# CREATE USERS
#
def new_user(first_name, last_name, email, passw):
my_crypt = CRYPT(key=auth.settings.hmac_key)
crypt_pass = my_crypt(passw)[0]
id_user= db.auth_use
You call the action/function in the controller via
http://host:port/app_name/ctl_name/action_name
and if the action returns a dict then the corresponding view is called
/app_name/views/ctl_name/action_name.html
On Mar 2, 8:41 am, stargate wrote:
> I am looking at the following example here loc
Is there a example of this showing what code goes in what file.
On Mar 2, 8:56 am, Norbert Klamann
wrote:
> I am a newbie wrt web2py , but I think it is just the other way round. You
> place the loop.html in the views/default directory and the controll calls it
> automagically.
On Wednesday, March 2, 2011 8:41:48 AM UTC-5, stargate wrote:
>
> I am looking at the following example here located
>
> http://web2py.com/AlterEgo/default/show/106
>
>
> If you go to the heading
>
> PHP files and web2py views
>
> Further down there is a web2py example. Now i create a control
Yes, there are lots of examples in the book: http://www.web2py.com/book.
Start with chapter 3.
Also, more examples here: http://web2py.com/examples/default/examples
You should also explore the 'welcome' app to see how things are set up, and
you can download and explore plenty of other applica
all is what i need to know is what goes in the .py file and what goes
in the .html file i am a novice. Thanks for all the help
On Mar 2, 9:46 am, Anthony wrote:
> Yes, there are lots of examples in the book:http://www.web2py.com/book.
> Start with chapter 3.
>
> Also, more examples here:http://
Another simple option -- web2py includes a Bayesian classifier that can be
used to populate a database table with dummy data -- takes just two lines of
code:
http://web2py.com/book/default/chapter/12#Populating-Database-with-Dummy-Data.
I think it will fill the password field with empty strings
The only I problem I see is that MSSQL 2000 will not understand
varchar(max). For reference, there is a StackOverflow question that relates
to
this:
http://stackoverflow.com/questions/737755/varcharmax-ms-sql-server-2000-problems
I am finding myself using auth.has_membership() and auth.has_permission()
quite often in a module. Are either of these cached? I looked through the
Auth code a bit and didn't see anything, so I was wondering it if did it
somewhere else. If not then I should probably write my own
has_membership/
How can I check if there is file in the sent form?
if request.vars.image:
redirect(URL('structure',args=['it', 'works']))
doesn't work
if request.vars.image.file rises an error, when no file sent
On Mar 2, 2011, at 12:27 AM, annet wrote:
>
> Hi Denes,
>
> Thanks for your reply, removing the else: ... solved the problem. I
> followed the if: .. elif: .. else: .. pattern used in the chapter on
> forms and validators in the web2py manual. Why does it work in a
> single form function and why
I want a controller function (or several controller functions) to
generate several forms and view them one after another in the
index.html page. I'm confused about what setup is the best to use? In
the web2py examples I see in the controller's
default.py automatically generate form views in the de
I have made some changes to plugin wiki. They should not break
anything (although I do not promise backward compatibility) but fix
some issues with
- rating
- maps
- add a feed aggregator
- portability
I posted everything in googlecode under cube2py.
I did not fully check it. Can you help with t
if isinstance(request.vars.image, cgi.FieldStorage) and
request.vars.image.file:
redirect(URL('structure',args=['it', 'works']))
On Mar 2, 9:23 am, LightOfMooN wrote:
> How can I check if there is file in the sent form?
>
> if request.vars.image:
> redirect(URL('structure',args=['it', '
Hello,
I don't know if this slice had passed through without any attention,
but don't see any mail on the list about it...
Site search plugin
http://web2pyslices.com/main/slices/take_slice/115
https://bitbucket.org/hc/plugin_h_search
Does it anyone has tried it out and want to report experience?
They are not cached.
On Mar 2, 9:22 am, Ross Peoples wrote:
> I am finding myself using auth.has_membership() and auth.has_permission()
> quite often in a module. Are either of these cached? I looked through the
> Auth code a bit and didn't see anything, so I was wondering it if did it
> somewher
On the same thematic... Does it anyone had seen or make a profiles
implementation for web2py??
Richard
On Wed, Mar 2, 2011 at 10:00 AM, Anthony wrote:
> Another simple option -- web2py includes a Bayesian classifier that can be
> used to populate a database table with dummy data -- takes just tw
Let's create a mssql3 that does it by the book (or do you think MS
will keep changing the API?)
On Mar 2, 9:11 am, Ross Peoples wrote:
> The only I problem I see is that MSSQL 2000 will not understand
> varchar(max). For reference, there is a StackOverflow question that relates
> to
> this:http:/
thanks!
On 2 мар, 20:56, Massimo Di Pierro wrote:
> if isinstance(request.vars.image, cgi.FieldStorage) and
> request.vars.image.file:
> redirect(URL('structure',args=['it', 'works']))
>
> On Mar 2, 9:23 am, LightOfMooN wrote:
>
>
>
>
>
>
>
> > How can I check if there is file in the sent f
Read the book, chapter 3. Don't read the php page.
You need to work with semaphores.
How about creating a table to control this traffic?
Your background app will query and update it.
Your online app will show statuses.
Let's think lean. ;-)
--
Vinicius Assef.
On Fri, Feb 25, 2011 at 1:22 PM, mika wrote:
> Hello, My application needs to downl
Well, varchar(max) was introduced in SQL 2005, and it will be like that
going forward. Text will be removed in a future version of MSSQL, though
they do not mention when. Here is the actual MSDN page about the text data
type: http://msdn.microsoft.com/en-us/library/ms187993.aspx
Actually thinking about this a bit more, mssql should be used for MSSQL 2000,
and mssql2005 instead of mssql2, and mssql3. The mssql will be compatible with
2000, 2005, and 2008, while mssql2005 will be compatible with 2005, 2008, and
up. What do you think about that?
On Mar 2, 2011, at 10:52 A
whats the diff between
### case 1 #
db.define_table('branch',
Field('name','string', unique = True, notnull = True),
Field('content','list:string'))
## case 2 ###
db.define_table('branch',
Field('name','string'),
Field('content','list:string'))
db.branch.name
#2 ignores
db.branch.name.unique = True
db.branch.name.notnull = True
because they are set after the table definition. You can only override
attributes that are not used at table definition.
On Mar 2, 11:09 am, goutham wrote:
> whats the diff between
>
> ### case 1 #
> db.define_t
Not much difference except space in your model.py file... With the
seconde case you can override constrain in the controller when needed.
Richard
On Wed, Mar 2, 2011 at 12:09 PM, goutham wrote:
> whats the diff between
>
> ### case 1 #
> db.define_table('branch',
> Field('name','s
Makes sense. The name is not the issue. The issue is what should the
mssql2005 types be:
types = {
'boolean': 'BIT',
'string': 'VARCHAR(%(length)s)',
'text': 'TEXT',
'password': 'VARCHAR(%(length)s)',
'blob': 'IMAGE',
'upload': 'VARCHAR(%(length)s
I'd like this feature, but in some way I echo the sentiment by
Plumo. Maybe there should be 2 scaffold apps, to be chosen by the
user?? One is really bare-bone and the other is rich in feature.
The bare-bone app simply generate what's needed (as minimal as
possible) so as for the users to know
This may be a dumb question - Is there a way to type a short python
script into a prompt to execute within an application? I want to
import (once) a number of csv files with a shared dictionary (so
uploading them one at a time through app admin won't work). It seems
a little strange to write a new
This example is taken from the web2py manual.
model:
db.define_table('client',
Field('name'))
db.define_table('address',
Field('client',db.client,writable=False,readable=False),
Field('street'),Field('city'))
controller:
def register():
form=SQLFORM.factory(db.client,db.addres
Good question. If web2py is using unicode and going for internationalization,
then NVARCHAR is the way to code. It stores all text as unicode, but it
requires twice the storage space of VARCHAR because it uses two bytes to encode
each character.
And I have to ask: what is the motivation for usi
OK,
Here is a Fabric skeleton that I will be adding to over the next
little while. Right now it is a bit boring but well organized...
http://code.google.com/p/voa-deploy/
Step 1) Installing virtualenvs via virtualenvwrappers. - needs testing
More interesting things around the corner, feel free
+1 for what VP says - minimal should be default with easy access to
scaffolding for those who want it.
On 2 March 2011 18:00, VP wrote:
> I'd like this feature, but in some way I echo the sentiment by
> Plumo. Maybe there should be 2 scaffold apps, to be chosen by the
> user?? One is really b
+1 agree
2011/3/2 Richard Vézina
> On the same thematic... Does it anyone had seen or make a profiles
> implementation for web2py??
Did you mean that http://askvalue.com/user/rochacbruno ?
or are you talking about another kind of profile?
Yeah, I like a think scaffold. I want to pull lots of stuff out of base.css
but I'm very nervous.
Maybe the buttons could go in appadmin or admin? Admin still seems like it
could use a re-design to be more modern and less "chunky".
I've just started with mssql
(after using sqlite, postgresql and mysql, I'm not very happy at the moment ;-)
I guess utf-16 would be the best way to go for the future.
(as my current database is quit large, I think at the moment I'll stick to
windows-1252 coding ;-)
further more in my humble opin
That should be "thin" scaffold.
two things about askvalue, give me an error when go to dashboard and second,
the site have an old web2py logo.
2011/3/2 Bruno Rocha
>
> 2011/3/2 Richard Vézina
>
> On the same thematic... Does it anyone had seen or make a profiles
>> implementation for web2py??
>
>
> Did you mean that http://as
Looks like a good start. Here's what I use. Not as well organized. It sets
up a fresh Ubunutu 10.04 and installs Cherokee, UWSGI, Postgres, Web2py,
Postfix and my project from Bitbucket. I also have "deploy" for pushing out
changes. There doesn't seem to be any collection of Fabric recipes anywh
Not exactly... We have RBAC to manage access to the differents
tables... So I have group or role that have a certain access that I
define in the RBAC tables, say : User, Group, Membership,
Permission...
I would like to define a default technician role with it "absolute"
permissions that will ultim
Yes I do with this command:
python web2py.py -S appname -M -N -R
/home/martin/web2py/applications/appname/private/myscript.py
2011/3/2 Philip
> This may be a dumb question - Is there a way to type a short python
> script into a prompt to execute within an application? I want to
> import (once)
See keepvalues in book, it should help with this objective...
Richard
On Wed, Mar 2, 2011 at 1:06 PM, annet wrote:
> This example is taken from the web2py manual.
>
> model:
>
> db.define_table('client',
> Field('name'))
> db.define_table('address',
> Field('client',db.client,writable=Fal
Wow! web2py even has a webpage at
http://pythonsecurity.tumblr.com/post/807089821/web2py-a-framework-that-cares-about-security
Anyway, I just came across this
http://www.owasp.org/index.php/Projects/OWASP_Secure_Web_Application_Framework_Manifesto/Releases/Current/Manifesto
I guess it is a read f
On Wednesday, March 2, 2011 1:53:32 PM UTC-5, Martin.Mulone wrote:
> Yes I do with this command:
>
> python web2py.py -S appname -M -N -R
> /home/martin/web2py/applications/appname/private/myscript.py
>
You can also just do:
python web2py.py -S appname -M -N
which will launch an interacti
Lets say i create a form using html and I am going to use Jquery to do
a ajax post to a web2py url
In the form there is two fields username and password.
The web2py controller will request the username and password and store
them in varaibles.
How would you do this.
This returns me to /default/index with the flash of "Logged out". My
response.flash, specified below the auth.logout() is never seen.
I also tried it with the response.flash= statement ABOVE the
auth.logout().
The user gets logged out, but I have no control over what he sees
next.
If you have fu
"Web frameworks are typically categorized as one of two types: A
"glued" framework is built by assembling (gluing together) several
third-party components. A "full-stack" framework is built by creating
components designed specifically to be tightly integrated and work
together"
>From above, I gues
Thanks! - I figured there was an easy answer, but somehow I didnt find
it in the web2py book.
On Mar 2, 2:36 pm, Anthony wrote:
> On Wednesday, March 2, 2011 1:53:32 PM UTC-5, Martin.Mulone wrote:
> > Yes I do with this command:
>
> > python web2py.py -S appname -M -N -R
> > /home/martin/web2py/a
FYI
Begin forwarded message:
From: "Simmons, Bruce"
Date: March 2, 2011 3:34:23 PM CST
To: "mdipie...@cs.depaul.edu"
Subject: Python help
Massimo,
I noticed a recent posting from you on the Chicago Python board and
wanted to share a job opening with you.
We are Zoro Tools -- a young, en
Thanks for the upgrade. My immediate issues are...
*** Reserved fieldname 'file' is still a problem (change to filename?)
*** check_reserved=['all'] -- not working in DAL??
I did notice that you'd changed the field 'public' to 'is_public'.
I'm not sure what happened with 'active' but that problem
Thanks for the responses. Anthony, you're explanation is one of the
clearest I've seen, and makes sense, or maybe some of these points are
starting
to finally sink in.
Now if only this message would get out a bit more. If I ever get
sufficiently experienced with this, I'll present web2py at my
I think you may have deleted field 'active' by mistake. If you re-
instate it, could you call it something else please :)
On Mar 2, 10:02 pm, villas wrote:
> Thanks for the upgrade. My immediate issues are...
>
> *** Reserved fieldname 'file' is still a problem (change to filename?)
> *** check
Hi,
I've had some problems with the 'user' exposed actions (profile, register,
request_reset_password, etc.) where it fails in "self.user.id".
I've checked and I can see that the problem is the "auth.is_logged_in"
function, which returns True (because session.auth does exist), but
auth.user is
Bottle, Pylons, Pyramid, Werkzeug, Flask.
Joomla is even more full stack than the average framework since it also
includes a content management capability.
Joomla is a *CMS* not a framework, just lile Plone which is a CMS based in
Zope framework, and Radiant which is a CMS based in Rails, and InstantPress
or Kpax which are CMS based in web2py.
*some examples in Python*:
*Micro Frameworks* - Flask, Bottle, Tipfy, Werkzeug
*Glued Frameworks* - Pylons,
Hi,
Boolean fields are automatically toggling in forms when validation fails.
(model)
db.define_table('xxx', Field('xstring',requires=IS_NOT_EMPTY()),
Field('xboolean','boolean'))
(controller)
def xxx(): return dict(form=crud.create(db.xxx))
(url)
http://localhost:8000/test/default/xx
Great, as far as I am concerned more is better, organization will come
with time. I "skipped" my Ubuntu deploy script and focused Webfaction
so your script is helpful for me as well. I went a little over the top
and although I am happy with the results it took a lot longer than I
was expecting and
Looks good, I will give it a shot on my Ubuntu VM
On 2 mar, 13:45, pbreit wrote:
> Looks like a good start. Here's what I use. Not as well organized. It sets
> up a fresh Ubunutu 10.04 and installs Cherokee, UWSGI, Postgres, Web2py,
> Postfix and my project from Bitbucket. I also have "deploy" fo
I don't want to sound like your mother but, why would you want to do this?
Web2py already does logins for you in a standardized way that users are
familiar with. Why not use what Web2py gives you and start working on the
unique aspects of your application? Or at least use what Web2py gives you
Is there a setting or feature to store a user's email address in a cookie
for pre-filling whenever the login form displays? Or would I need to code
that?
And defaulting the "Remember Me" box to be checked?
It is nice to have as much features as we like at disposal, but a more
modular approach would be nice.
Web2py should have a directory containing all js , css , artwork
like this buttons css framework.
When a new application is created there should be a way to choose only
the needed pieces. The c
On Mar 1, 2011, at 8:28 AM, Lorin Rivers wrote:
>
> @jonathan: Yes, a more detailed error messages than "no json" would be
> awesome.
generic.json now says:
{{
###
# response._vars contains the dictionary returned by the controller action
###
try:
from gluon.serializers import json
respon
Yes, as pbreit points out, web2py already has functionality to handle this
kind of thing for you.
First, you generally won't need to create a form in HTML. Instead, read the
book to learn about web2py's multiple options for creating and processing
forms: http://web2py.com/book/default/chapter/
For Python frameworks specifically, look here:
http://wiki.python.org/moin/WebFrameworks. Note, I think Pylons is
mis-categorized on that page -- it has no templating engine or ORM (or other
full-stack goodies), so I think it belongs in the basic category. Werkzeug
probably also belongs in the
I just voted this up too. Pycharm is a great IDE and having web2py support
would be a nice feature.
Thanks for the help. No its just I am use to creating
The form manually then doing a jquery Ajax post using php.
On Mar 2, 8:33 pm, Anthony wrote:
> Yes, as pbreit points out, web2py already has functionality to handle this
> kind of thing for you.
>
> First, you generally won't need to create a
But you do understand that registration and login are already provided by
web2py and you don't need to write a single line of code?
If I was going to make another rant, I would say that it can be beneficial to
forget some of the old ways that you used to do things.
If you're just doing this for
The following code got me a socket timeout error:
for trip in session.trip_cart:
t_id = trip['trip_instance']
num_trav = trip['quantity'] - 1
while num_trav > 0:
new_trav = dict()
for k, v in request.vars.items():
#get the field's trip_instance number
Let me also add that I have:
num_trav -= 1
in the appropriate place to prevent an infinite loop that might be
causing this. But according to the debugger, the function isn't
making it past:
for k, v in request.vars.items()
anyway.
On Mar 2, 11:58 pm, Lennon wrote:
> The following code got me
PROBLEM SOLVED
Stupid Mistake.
Please close/delete thread if possible or let me know how I can
accomplish that.
On Mar 3, 12:07 am, Lennon wrote:
> Let me also add that I have:
>
> num_trav -= 1
>
> in the appropriate place to prevent an infinite loop that might be
> causing this. But accordin
Totally agree. Vote counted
On Mar 2, 9:54 pm, mikech wrote:
> I just voted this up too. Pycharm is a great IDE and having web2py support
> would be a nice feature.
Hallo Jonathan,
On 2 March 2011 01:42, Jonathan Lundell wrote:
> On Feb 17, 2011, at 10:37 AM, Johann Spies wrote:
>
> src="/kb/static/DSC_1403.png" (I moved the image from /kb/static/images to
> /kb/static - now it works.
>
> I would still like to know how to get imgages in static/images to w
On Mar 2, 2011, at 10:24 PM, Johann Spies wrote:
> No. It is a production server so I do not want to experiment a lot. When I
> remove routes.py the server serves the pictures in the subdirectory
> /static/images/ but when I use routes.py the images have to be in /static.
> So I just moved t
Hi Massimo and everybody else,
sorry for my late reply. I was out for two days presenting a prototype
based on web2py on a conference and just came back to the office. As a
quick feedback: Attendees were really impressed and excited about,
what they saw.
Now back to my problem:
I am a bit embarr
On 3 March 2011 08:39, Jonathan Lundell wrote:
>
> The fix (until the next version, anyway) is to change calls like
> URL('static/image', 'file') to URL('static', 'image/file'). The reason is
> that 'static' is treated as the name of the controller directory, and
> 'static/image' isn't recognized
On Mar 2, 2011, at 11:10 PM, Johann Spies wrote:
> On 3 March 2011 08:39, Jonathan Lundell wrote:
>
> The fix (until the next version, anyway) is to change calls like
> URL('static/image', 'file') to URL('static', 'image/file'). The reason is
> that 'static' is treated as the name of the contro
Hi *,
I got an sqlform created with SQLFORM.factory and I want to assign a
validator to a field of theirs that depend to the value of another field
so I have do asign validators outside the form definition such as is
done in this example I found that use a table:
db.define_table('t','Field('a
Il 03/03/2011 08:14, Manuele Pesenti ha scritto:
Hi *,
I got an sqlform created with SQLFORM.factory and I want to assign a
validator to a field of theirs that depend to the value of another
field so I have do asign validators outside the form definition such
as is done in this example I found
What is it doing and what are you expecting?
I don't understand exactly what you are trying to achieve. You have two form
fields, a and b? And whatever is entered in b must match what is entered in
a?
98 matches
Mail list logo