Hi!
Can you suggest me how can I write a validator for sql table names?
I mean... I have a plugin that let me define tables and fields through
the web interface saving their name and parameters in the db itself. So
I have a "meta" table for the tables I want to define. I'm looking for a
good v
I am working on the cms part of an app. In the view I have
elements:
Adresboek
Uw adresboek card beheren.
When the user isn't logged in I want the elements to be
disabled, i.e not click able and set their opacity to .50
This is what I tried:
{{if not auth.is_logged_in():
Massimo,
About gzipping. It is not true that the webserver does the gzipping
at least not every combination of frontend/backend.
1) Rocket does gzipping?
2) Apache + wsgi does gzipping?
3) + fcgi does gzipping?
What I know for sure is + SCGI does gzipping: I wrote it so
that uses wsgitools w
look the code in dal.py referencing check_reserved, you can copy patterns
and dicts from there in to your validator.
http://zerp.ly/rochacbruno
Em 03/02/2012 06:41, "Manuele Pesenti" escreveu:
> Hi!
> Can you suggest me how can I write a validator for sql table names?
>
> I mean... I have a plug
Il 03/02/2012 11:03, Bruno Rocha ha scritto:
look the code in dal.py referencing check_reserved, you can copy
patterns and dicts from there in to your validator.
Hi Bruno,
thanks for the replay... I've already tryed to look inside dal.py but it
was not so clear how to translate it's behaviour
Also, look at this new integrated online debugger for web2py:
http://reingart.blogspot.com/2012/02/new-web2py-online-python-debugger.html
I've finished it recently, so let me know if you try it and have any issue.
if you are using apache (prefork, and to a lesser extent mpm worker) you
would hav
I want to start the translation to spanish of the book, 4th edition.
What's are the way to be syncronize with english version?. Any help?.
The problem seems to be a redirection loop between this two addresses:
1) http://web2py.com/demo_admin/default/site
2)
http://web2py.com/demo_admin/default/index?send=%2Fdemo_admin%2Fdefault%2Fsite
Both return 303 and redirect 1 -> 2, and 2 -> 1 until the browser gives up
with a message:
"Firef
I don't think the "disabled" attribute works with anchor tags (except in
IE) (it works with buttons, but in that case, it's supposed to be
disabled="disabled"). Instead, you could remove the href, add an
onclick="return false;" attribute, or do something like:
$('#addressbook a').click(function
nice !
On Thu, Feb 2, 2012 at 1:15 PM, Bruce Wade wrote:
> No, used cakephp for ethicaldeal, and used pyramid for youadworld, however
> for the last month I have been porting youadworld.com to web2py and the
> new version is much much much better then the current live one. I will
> update the de
Hi All,
just wondering... do you know any blog/page with some long term (at least 2
years) web2py projects experiences ?
It could be interesting to see how those projects have done so far in terms
of testing (unit/integration), scaling, upgrades (web2py upgrade),
refactoring etc
thanks
--
I am also interested in knowing this.
On Fri, Feb 3, 2012 at 6:14 AM, Sebastian E. Ovide <
sebastian.ov...@gmail.com> wrote:
> Hi All,
>
> just wondering... do you know any blog/page with some long term (at least
> 2 years) web2py projects experiences ?
>
> It could be interesting to see how thos
We have got inconsistent behaviors of web2py on 2 different servers
(same latest version 1.99.4).
Give this URL, app/controller/function/13/1///
On my personal computer, request.args is [13,1,'','']. This is what
I expected.
On my server, request.args is [13,1].
This messes up my controller l
I have the following situation.
There is a field A of type upload (image).
There is another field B of type compute, which depends on A.
I want to be able to process the image uploaded in field A and save
it, but before the compute in field B is executed. In other words,
field B will be compute
Furthermore, on the server, this URL app/controller/function/13/1//5/
results in request.args to be ['13','1','5'], which is seriously
wrong. The right answer of course should be ['13','1','','5'].
Can someone help?
Thanks.
On Feb 3, 8:55 am, VP wrote:
> We have got inconsistent behaviors of
On Feb 3, 2012, at 6:55 AM, VP wrote:
> We have got inconsistent behaviors of web2py on 2 different servers
> (same latest version 1.99.4).
>
> Give this URL, app/controller/function/13/1///
>
> On my personal computer, request.args is [13,1,'','']. This is what
> I expected.
>
> On my server
> Is it possible that you're invoking different routers on the two systems? Or
> enabling routes on one and not the other?
Jonathan,
One configuration difference between the server and the personal
computer is that on the server, I use routes.py, which routes www.mysite.com
and mysite.com to
On Feb 3, 2012, at 7:20 AM, VP wrote:
>> Is it possible that you're invoking different routers on the two systems? Or
>> enabling routes on one and not the other?
>
> Jonathan,
>
> One configuration difference between the server and the personal
> computer is that on the server, I use routes.
I suppose I could! But I'd like to understand the underlying issue -- why
the form seems to submit blank when the component loads (hence the else
condition firing).
I'm continuing to work in fits and starts on my ajaxselect plugin (I'll
post an update and bugfix soon, hopefully with a proper demo). In the
process, I came across the ListWidget method in sqlhtml. It's quite a nice
way to implement multi-reference field. But it's not documented in the 4th
edi
The form isn't submitting anything when it is first loaded. In post(), the
form is created and then processed (via form.process()). When the page is
first loaded (i.e., no form submission), form.process(...).accepted is
false (since no data have been posted), which is why it reaches the else
lo
It is actually exposed via SQLFORM.widgets.list.widget, and it is used
automatically in SQLFORMs for list: fields, so I assume it is safe to
use and here to stay.
Anthony
On Friday, February 3, 2012 10:35:42 AM UTC-5, monotasker wrote:
>
> I'm continuing to work in fits and starts on my ajaxsel
Thanks. I just emailed you my routes.py.
But routes.py might not be the cause, because I have just removed it
(without using routes.py), the problem still existed.
On Feb 3, 9:27 am, Jonathan Lundell wrote:
> On Feb 3, 2012, at 7:20 AM, VP wrote:
>
> >> Is it possible that you're invoking diff
On Feb 3, 2012, at 7:46 AM, VP wrote:
> Thanks. I just emailed you my routes.py.
>
> But routes.py might not be the cause, because I have just removed it
> (without using routes.py), the problem still existed.
Did you restart web2py? Until you do, it won't recognize the change.
I added unit tes
>
> Glad it's working! I've been having the same exact problem you described, but
> this fix didn't work for me. What are you using as your token URL?
> This concept is foggy to me. It's not mentioned in the web2py book, but is
> described on
> thejanrainsitehttps://rpxnow.com/relying_parties/res
That's good news. I'm a bit confused, though, since it doesn't seem to be
the default widget for list:reference fields, which are presented by
default in a multiple select widget (or does list:reference not fall under
list:?).
Also, the list widget isn't included in the list of available widget
Hi Folks,
I'm using login with ldap and login_next doesn't work...
from gluon.contrib.login_methods.ldap_auth import ldap_auth
auth.settings.login_methods=[ldap_auth(mode='company',server='mycompany',base_dn='ou=myou,o=
mycompany.com')]
auth.settings.actions_disabled=['register','change_password'
Ah. Now I understand. Thanks a lot for explaining. Sometimes it's the
basic structural things I miss!
If a list: field has an IS_IN_SET or IS_IN_DB validator, by default
it will get the MultipleOptionsWidget -- otherwise it will get the
ListWidget. By default, list:reference fields get an IS_IN_DB validator,
which is why you see the MultipleOptionsWidget by default for those fields
(list:intege
We have the spanish translation. The problem is in reST not markmin. I
will send it to you and you can help with conversion. ;-)
Then it would be easy to post it.
On Feb 3, 7:35 am, Martín Mulone wrote:
> I want to start the translation to spanish of the book, 4th edition.
> What's are the way
http://www.lungojs.com/
I want to provide import/export CSV file from a specific table for
users. All I want is just like appadmin works. I'm referencing
appadmin code trying to write the code below but I get error
messages. Does anyone can point out what's the problem ?
Example for auth_user table.
Model
-
Great. Thanks again. I really appreciate your help.
>
> Model
> -
> dba = DAL('sqlite://storage.sqlite')
> auth = Auth(dba, hmac_key=Auth.get_or_create_key())
>
> Controller
> --
> def import_csv(table, file):
> table.import_from_csv_file(file)
>
> def index():
> if request.va
Yes, I did restart and incorporated your fix. It still doesn't work.
I don't think it has to do with routes.py
On Feb 3, 9:52 am, Jonathan Lundell wrote:
> On Feb 3, 2012, at 7:46 AM, VP wrote:
>
> > Thanks. I just emailed you my routes.py.
>
> > But routes.py might not be the cause, because I
Hi Massimo and Martin,
where is planned to release the book: "web2py Application Development
Cookbook"?
(
http://www.packtpub.com/web2py-application-development-recipes-to-master-python-web-framework-cookbook/book?utm_source=web2py.com&utm_medium=link&utm_content=pod&utm_campaign=mdb_009617
)
i b
On Feb 3, 2012, at 9:46 AM, VP wrote:
> Yes, I did restart and incorporated your fix. It still doesn't work.
>
> I don't think it has to do with routes.py
Curious. What are the operating systems and Python versions on the working and
non-working systems? I think the most productive course righ
i don't know of any blogs that discuss the experiences of users over the
long term. i suspect this group history might be an indication. heck,
check my posts over the past couple of years - whenever i hit bumps in the
road i tend to ask questions here.
are there specific things we can help an
My personal pc is Mac Leopard Python 2.7.2. The parsing works as
expected on this pc.
The server is Debian squeeze, ngnix, uwsgi, Python 2.6.6. The parsing
messed up as described above.
On Feb 3, 12:00 pm, Jonathan Lundell wrote:
> On Feb 3, 2012, at 9:46 AM, VP wrote:
>
> > Yes, I did rest
On Feb 3, 2012, at 10:38 AM, VP wrote:
> My personal pc is Mac Leopard Python 2.7.2. The parsing works as
> expected on this pc.
>
> The server is Debian squeeze, ngnix, uwsgi, Python 2.6.6. The parsing
> messed up as described above.
Looking at the parametric router code, I don't see any log
> Another thing that might help is to put =BEAUTIFY(request) into a template
> somewhere and compare the two when given URLs of the form you're having
> trouble with.
This is interesting. On the server, path_info and web2py_original_uri
got it wrong.
If say, the url is app/controller/functio
To clarify, given URL controller/function/a/b//c,
on the server, path info is:
controller/function/a/b/c
This is wrong. The correct is shown on my pc as
controller/function/a/b//c
On Feb 3, 2012, at 10:49 AM, VP wrote:
>> Another thing that might help is to put =BEAUTIFY(request) into a template
>> somewhere and compare the two when given URLs of the form you're having
>> trouble with.
>
>
> This is interesting. On the server, path_info and web2py_original_uri
> got it
It works great. Thanks a lot !!
On Feb 3, 11:23 am, Anthony wrote:
> > Model
> > -
> > dba = DAL('sqlite://storage.sqlite')
> > auth = Auth(dba, hmac_key=Auth.get_or_create_key())
>
> > Controller
> > --
> > def import_csv(table, file):
> >
I run my app with migrate=migrate_enabled=False, because when migrations
_are_ needed, they are nontrivial, and the default logic is never what I
want.
I would like to have some "migration needed" response from the database, so
that when a user of the app runs a new version of the app on an old
For some reason my nginx does not keep log, but I think it's unlikely
that nginx will remove slashes in the middle of a URL (e.g. app/con/
func/a/b//c).
It's probably a problem at the server level since web servers generally
ignore empty path segments (are they even valid?).
On Feb 3, 2012, at 11:29 AM, VP wrote:
> For some reason my nginx does not keep log, but I think it's unlikely
> that nginx will remove slashes in the middle of a URL (e.g. app/con/
> func/a/b//c).
Unlikely, but *somebody* is doing it. How about a uwsgi log?
If you want to nail down conclusivel
"empty path segments are normally ignored"
http://docs.python.org/library/wsgiref.html
"they can decide to ignore empty path segments. Both IIS and Apache work
this way"
http://davescoolblog.blogspot.com/2011/11/uri-empty-path-segments-matter.html
Yeah, I'd like to see more explicit migrating and more visibility into
what's happening. Auto migrations are great in development but scary in
production.
On Feb 3, 2012, at 11:46 AM, pbreit wrote:
> "they can decide to ignore empty path segments. Both IIS and Apache work this
> way"
> http://davescoolblog.blogspot.com/2011/11/uri-empty-path-segments-matter.html
Apache might when mapping a URL to a filesystem path, but it does normally pass
the U
Hello, it was discussed earlier but with no result. I would like to use
ember.js http://emberjs.com/documentation/ which uses {{}} for its
template language. This conflicts with web2py template and causes errors. I
there a way how to incorporate some special web2py tag, that will allow
web2py
Im using nginx, but can someone with ngnix, apache, see if this is
indeed the case?
I am not sure which config files of nginx to look for these rewrite
rules. /opt/nginx/conf/nginx.conf has not rewrite rules.
On Feb 3, 1:46 pm, pbreit wrote:
> "empty path segments are normally
> ignored"http://
> "they can decide to ignore empty path segments. Both IIS and Apache work
> this
> way"http://davescoolblog.blogspot.com/2011/11/uri-empty-path-segments-mat...
If this is true, it'll be a bummer for web2py, as its default behavior
differentiates empty and non-empty path segments.
I want to export the specific table data to csv. I tried the code
after appadmin but I got a "TypeError: 'str' object is not callable"
error. Can you guys help ?
I also want to export the csv file with " " for characters.
Model
--
db.define_table('IQWAGFTY',
Field('TYPRCD
You could do
this: https://groups.google.com/d/topic/web2py/4IFFE-7vq1I/discussion. The
only downside is you have to call the special render() function in each
controller instead of relying on web2py's default handling of the rendering.
Another option is to create a special helper for your embe
Take your query out of quotes -- a query has to be a DAL Query object, but
you have simply passed in a string.
Anthony
On Friday, February 3, 2012 3:31:23 PM UTC-5, Omi Chiba wrote:
>
> I want to export the specific table data to csv. I tried the code
> after appadmin but I got a "TypeError: 's
Oh my god, it worked again!!
>I also want to export the csv file with " " for characters.
Do you know if we can do this ? I want do quotechar='"' just like the
following link.
http://www.web2py.com/books/default/chapter/29/6?search=csv#Data-representation
On Feb 3, 2:54 pm, Anthony wrote:
>
OK. Can you send me the 4th ed markmin files ?
On Fri, Feb 3, 2012 at 3:03 PM, Omi Chiba wrote:
> Oh my god, it worked again!!
>
> >I also want to export the csv file with " " for characters.
> Do you know if we can do this ? I want do quotechar='"' just like the
> following link.
>
>
> http://w
On Friday, February 3, 2012 4:03:47 PM UTC-5, Omi Chiba wrote:
>
> Oh my god, it worked again!!
>
> >I also want to export the csv file with " " for characters.
> Do you know if we can do this ? I want do quotechar='"' just like the
> following link.
>
>
> http://www.web2py.com/books/default/ch
Anyone come across this product in the wild? Seems good, and it has a
report writer, which is a missing piece I've been looking for. Has no
Python binding, does support SQL. http://www.valentina-db.com/
Do I need to rewrite this "export_csv" function completely ? or Can I
just add import csv and set QUOTE_ALL ?
Controller
--
def export_csv():
import gluon.contenttype
response.headers['Content-Type'] = \
gluon.contenttype.contenttype('.csv')
db = reques
On Friday, February 3, 2012 6:16:09 PM UTC-5, Omi Chiba wrote:
>
> Do I need to rewrite this "export_csv" function completely ? or Can I
> just add import csv and set QUOTE_ALL ?
>
>
> Controller
> --
> def export_csv():
> import gluon.contenttype
> response.he
Why would you ever have empty path segments?
On Feb 3, 2012, at 4:00 PM, pbreit wrote:
> Why would you ever have empty path segments?
Suppose that args is a list of strings and you have some empty string.
I do not know. They are in the editing phase.
On Feb 3, 11:48 am, Albert Abril wrote:
> Hi Massimo and Martin,
>
> where is planned to release the book: "web2py Application Development
> Cookbook"?
> (http://www.packtpub.com/web2py-application-development-recipes-to-mas...
> )
> i bought an eboo
66 matches
Mail list logo