OK, I'll make sure I can reproduce first.
On Friday, 19 April 2013 22:42:03 UTC+10, LightDot wrote:
>
> Please open a bug report if this still looks like a bug to you... Sure
> sounds like one, but since I didn't see the code...
>
>
>
--
---
You received this message because you are subscrib
They both worked beautifully, thanks Anthony.
(Note to anyone copying this, Google Groups formatted a hard return that
should be removed to make Anthony's examples work).
Alex
On Fri, Apr 19, 2013 at 10:15 PM, Anthony wrote:
> Or slightly shorter:
>
> db.PartyPhoneNumberIntersection.countryTel
Or slightly shorter:
db.PartyPhoneNumberIntersection.countryTelephoneCode.represent = lambda id,
row:
db.Country(countryTelephoneCode=row.countryTelephoneCode).countryName
Anthony
On Saturday, April 20, 2013 1:13:19 AM UTC-4, Anthony wrote:
>
> Oh, yeah, forgot the code is not the id field o
Oh, yeah, forgot the code is not the id field of the Country table -- you
need a full query:
db.PartyPhoneNumberIntersection.countryTelephoneCode.represent = lambda id,
row:
db(db.Country.countryTelephoneCode == row.countryTelephoneCode).select
().first().countryName
Anthony
On Saturday, Ap
it looks good Anthony but this error is raised:
'NoneType' object has no attribute
'countryName'
thanks,
Alex
On Friday, April 19, 2013 9:47:55 PM UTC-7, Anthony wrote:
>
> Notice that the current row is passed into the lambda, and
> countryTelephoneCode is a field in that row, so you have
The Crud methods automatically handle processing, so you should not call
form.process on a Crud form. Review the book section on Crud.
Anthony
On Saturday, April 20, 2013 12:09:39 AM UTC-4, lucas wrote:
>
> how come this code doesn't update the text to upper()? thanx in advance,
> lucas
>
> de
Notice that the current row is passed into the lambda, and
countryTelephoneCode is a field in that row, so you have to refer to it as
row.countryTelephoneCode:
db.PartyPhoneNumberIntersection.countryTelephoneCode.represent = lambda id,
row: db.Country(row.countryTelephoneCode).countryName
Antho
Looks like you have broken up your string into multiple lines without using
the line continuation character ("\"). Should be:
chartoptions = "{type: 'bar', barColor: 'green', 'chartRangeMin':\
Anthony
On Friday, April 19, 2013 9:11:16 PM UTC-4, greaneym wrote:
>
> In trying the sparklines slic
What is the syntax for having countryName appear in place of
countryTelephoneCode using the represent feature?
Notice in the above situation that countryTelephoneCode is not the primary
key of the Country table.
db.define_table('Party', ## super-type for people and organizations
Field('partyTyp
how come this code doesn't update the text to upper()? thanx in advance,
lucas
def xyz():
#stuff
if cidi:
form = crud.update(tCt, cidi, onvalidation=county_check)
else:
form = crud.create(tCt, onvalidation=county_check)
if form and form.process().accepted:
thanx again anthony, perfect. lucas
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://g
In trying the sparklines slice, I am getting an error. Using osx with
web2py v2.3.2,
here is the error:
EOL while scanning single-quoted string
(index.html, line 83)VERSIONweb2py™(2, 3, 2, datetime.datetime(2012, 12,
17, 15, 3, 30), 'stable')PythonPython 2.5.1:
/Applications/web2py/web2py.ap
I just found out there was a mistake in the csv file i used when importing.
The problem was i open the csv exported from admin in libreoffice,
but i didnot notice that the separator converted to tab.
--
---
You received this message because you are subscribed to the Google Groups
"web2py-user
Apologize everyone, and Niphlod,
I forgot to restart my browser, and now the 2 values are consistent ..
my bad for the disturbance.
On Sat, Apr 20, 2013 at 9:16 AM, fun man wrote:
> Hi Niphlod,
>
> def index():
> # when people first login, they will get their timezone set.
> tz = f
The problem is that the script makes some assumptions, since it is a very
simple port of analogous mysql script.
One problem with sqlite is that .schema extracts the DDL statements in the
exact form they where issued, there is not any attempt to reverse db table
to a sequence of DDL statements. Th
Hi Niphlod,
def index():
# when people first login, they will get their timezone set.
tz = fast_tz_detector()
print
print 'Hi, you should save this returned by request.vars',
request.vars # if you debug, uncomment this line, and make sure return
tz=tz below
print "plugin_t
http://web2py.com/books/default/chapter/29/07#Custom-forms
You can also write a custom formstyle function -- not documented yet, but
for an example, see
https://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#780.
Anthony
On Friday, April 19, 2013 6:04:54 PM UTC-4, lucas wrote:
>
> hel
Good points. I think this is roughly the approach taken in web3py:
https://github.com/mdipierro/web3py/blob/master/web3py/forms.py.
Anthony
On Friday, April 19, 2013 4:49:57 PM UTC-4, RHC wrote:
>
> Thinking about this some more, what I would like would be for a controller
> to generate this js
hello one and all,
i am quite used to using SQLFORM to present my database tables. say i have
two fields, the normal SQLFORM will show those two fields as two rows in a
table, that is fine, but i have a modification i need on that.
how can i present those same two fields as a single row in the
Pardon me if I'm telling you things you already know. For the short
version, skip to the bottom two paragraphs.
You can think of a db driven application as having several layers. The
bottom layer is the database engine and the rdbms. For this simplicity I'm
discussing them as one unit, thoug
I'm working on a script to generate UPS shipping labels and save them on
our server. The shipping labels are passed as binary data in an XML file
from UPS. I am using the ClassicUPS library to parse the XML file and save
the data.
I wrote a simple script to test the library, and it works OK w
Thinking about this some more, what I would like would be for a controller
to generate this json:
{ form:
{ fields:
[ {name: 'id', type: 'int', value: 234, error: '', comment: ''},
{name: 'title', type: 'string', length: 100, value: 'My Test
Record', error: '', comment: '
well that was my personal trial to get a 400 error. I just want to find out
why there are about 5-10 400 errors on my webpage per day. and if they are
caused by some bad bots or something. So I can lock them out with my
firewall.
If its just typos I won't do a thing. Right now I'm saving the req
it should be a problem related to regexes finding the right things in your
database.
the script starts issuing the query
select name,sql from sqlite_master
where type='table'
and
not name like '\_%'
and
not lower(name) like 'sqlite_%'
you can start from there and see where it breaks.
PS
given that you want a ready-to-use solution, can you give an example ?
with /app/controller/function"#" you can't get what follows #, but the
first " is in requested_uri as it should be.
On Friday, April 19, 2013 8:53:52 PM UTC+2, BlueShadow wrote:
>
> Thats no anchor thats the first random cha
goes with more or less the same check. whenever a record is displayed
(pressing the "view" button) , there's a 'view' in request.args.
On Friday, April 19, 2013 9:02:41 PM UTC+2, Alex Glaros wrote:
>
> Here is the controller:
>
> def search_shared_services():
> grid = SQLFORM.smartgrid(db
Here is the controller:
def search_shared_services():
grid = SQLFORM.smartgrid(db.SharedService, linked_tables=[
'SharedServicePartnerIntersection'],
maxtextlength={'SharedServicePartnerIntersection.sharedServiceID':140,
'SharedService.shortSharedServiceTitle':140,
'SharedService.shortSh
Thats no anchor thats the first random character i found. Try it it fails.
Code 400
Am 19.04.2013 20:50 schrieb "Niphlod" :
> uhm you can't (even in a normal request) have the value that is
> assigned with an #anchor (call it anchor, fragment, whatever) ... that
> doesn't get passed to the web
uhm you can't (even in a normal request) have the value that is
assigned with an #anchor (call it anchor, fragment, whatever) ... that
doesn't get passed to the webserverso you can't have a page that fails
because of that #part
On Friday, April 19, 2013 8:22:21 PM UTC+2, BlueShadow wrot
the simpler thing is specifying your own "access denied page" with
auth.settings.on_failed_authorization = URL('whatever', 'needs_to_be')
and code one with as much customizations as you like. Don't overlook "error
pages" templates: they play a pretty big role in every application, if you
want t
grid:
if request.args(-3) == 'view':
add +1
factory: you know that already, you have to pass it
crud: same as factory
sqlform : same as factory
What's the issue ?
On Friday, April 19, 2013 7:19:19 PM UTC+2, Alex Glaros wrote:
>
> I want to count how many web users have looked at a record.
I suppose it depends on how the record is being viewed -- do you already
have code that displays the record? Generally, you might add something like
a "views" field to the table (defaulting to 0) and increment the value
every time a record is displayed.
Anthony
On Friday, April 19, 2013 1:19:1
Hi I got a custum error page which saves some of the data to give me a
quick overview of the why those errors happen. it stores the error code the
request.url and the useragent. my problem is I get a bunch of 400 errors.
and I want to know what the users/bots typed in exactly. request_uri gives
I want to count how many web users have looked at a record.
If a user uses a web2py form (sqlform, factory, crud, etc.) to search for a
record, and then opens and views that record, how can I keep track of that
view?
I'd like to keep a total count of the number of times the record was viewed.
Using aforementioned script I get no `Field`s in the generated DAL
schema; all I get are the table names.
For example:
CREATE TABLE "OeTy"("OfNa" varchar(50),"FiAm" float,"Of A"
smallint,"OfSt" varchar(255));
Becomes:
legacy_db.define_table('OeTy', migrate=False)
How do I get this to w
Your are "dead" right!
:)
2013/4/19 Niphlod
> with my Jedi powers I see through the fog .. I think he means this
>
> https://github.com/web2py/web2py/blob/master/gluon/tools.py#L2937
>
>
> On Friday, April 19, 2013 6:13:41 PM UTC+2, Massimo Di Pierro wrote:
>>
>> Some context would be helpf
with my Jedi powers I see through the fog .. I think he means this
https://github.com/web2py/web2py/blob/master/gluon/tools.py#L2937
On Friday, April 19, 2013 6:13:41 PM UTC+2, Massimo Di Pierro wrote:
>
> Some context would be helpful.
>
> On Friday, 19 April 2013 09:52:13 UTC-5, Ramos wrote
Not a good idea to run web2py (or any other web app) as root.
On Friday, 19 April 2013 09:56:48 UTC-5, LightDot wrote:
>
> To clarify: this is probably a question of a security policy, as the
> web2py process, run as root, is trying to open a browser GUI and this fails.
>
> You could run web2py a
Some context would be helpful.
On Friday, 19 April 2013 09:52:13 UTC-5, Ramos wrote:
>
> hello
>
>
>
> Not authorized is available to translate but
>
> "ACCESS DENIED"
> is not available in translate page
> web2py 2.0.*
>
> tku
>
--
---
You received this message because you are subscribed to
lol. Nice solution, +1 for discarding unsupported dynosaur-ages lib.
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
F
Update:
I decided to keep the solution as easy as possible. I found a command line
paradox db converter from here:
http://www.dbf2002.com/paradox-converter/index.html and used
subprocess.call() to it which converts the paradox db into a .csv. Then I
used import_from_csv_file() to get the data.
+1 Anthony
Richard
On Fri, Apr 19, 2013 at 11:02 AM, Niphlod wrote:
> +1 too. For myself, I'd wait *at least* that all my "custom jquery
> plugins" are compatible with 2.0 .
> To be fair, that's the most pressing issue that's bothering me, and the
> reason behind pushing for live tests on web2
Thank you again for this precious information.
:)
Richard
On Fri, Apr 19, 2013 at 10:59 AM, Niphlod wrote:
> they both process tasks.
> the "line" is what I described in the previous post: if you need rapidly
> firing jobs, better stick with rq, if you need periodic jobs, rq setup
> needs a n
+1 too. For myself, I'd wait *at least* that all my "custom jquery plugins"
are compatible with 2.0 .
To be fair, that's the most pressing issue that's bothering me, and the
reason behind pushing for live tests on web2py apps... ^_^
On Friday, April 19, 2013 4:47:46 PM UTC+2, LightDot wrote:
>
>
they both process tasks.
the "line" is what I described in the previous post: if you need rapidly
firing jobs, better stick with rq, if you need periodic jobs, rq setup
needs a new component.
The only other "cons" on the rq list (but is negligible) is that it works
only with redis and on unix.
To clarify: this is probably a question of a security policy, as the web2py
process, run as root, is trying to open a browser GUI and this fails.
You could run web2py as a regular user, I would actually recommend this
approach. You'll probably need to chown the contents of
/home/augusto/Downloa
hello
Not authorized is available to translate but
"ACCESS DENIED"
is not available in translate page
web2py 2.0.*
tku
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, s
+1
On Friday, April 19, 2013 4:39:31 PM UTC+2, Anthony wrote:
>
> They're going to maintain the 1.x branch and keep it compatible with 2.x
> for quite some time, so the scaffolding app should probably stick with 1.x
> for now, as there's not much to be gained by the switch (easy enough to
> swi
You are logged in the graphical environment as a regular user, but you're
starting web2py in a terminal, as root?
After the above error, if you open your web browser manually and visit:
http://127.0.0.1:8000/ do you see the welcome page?
Regards,
Ales
On Friday, April 19, 2013 3:52:56 PM UTC+2
They're going to maintain the 1.x branch and keep it compatible with 2.x
for quite some time, so the scaffolding app should probably stick with 1.x
for now, as there's not much to be gained by the switch (easy enough to
switch manually if someone desires).
Anthony
On Friday, April 19, 2013 9:4
Hi guys,
I am new in web2py and I was following the tutorial to start learning and
developing with web2py. But when I came across the part about starting the
server I had a problem that I didn't succeed to solve. That's why I am here
to kindly ask you some help.
Actually, I got the GUI to star
Thanks Niphold for the answer...
Do you see other usage of the queing stack proposed by Bruno other then
emails shippement... I have a couple of CRON job that I would eventually
include in web2py to make thing more managable when server update for
instance or new deployment. But at the date of cre
Ok Thanks Niphlod
Thought I could use json to prepare the data, using urllib.urlencode on the
dictionary instead. Didn't have to change the curl command.
Thanks again.
Brent
On Friday, 19 April 2013 01:52:57 UTC-6, Niphlod wrote:
>
> uhm... I may be wrong but request.restful accepts the a
it is out
http://blog.jquery.com/2013/04/18/jquery-2-0-released/
drops support for IE 6,7,8. I think it may be too early to move. What do
you think?
Massimo
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group
python-rq is more "engineered" towards speedier "I queued it and .. voilà
is executed" kind of environments.
Scheduler needs to "balance" between that and "please run this every hour"
scenarios (periodic) ... additionally leaving your db alone as much as
possible ^_^
python-rq has an external
Hello,
First, thanks Bruno to share your experiments with python-rq, redis and
queing stuff...
I would like to know if this is the way to go over Scheduler for emails
shippement (around 200 emails each time once or twice a weeks)?
Thanks
Richard
On Fri, Apr 19, 2013 at 6:23 AM, Ricardo Pedros
only with databases that support it and with the db.table.field.regex()
syntax.
Don't know how much is tested, but if doesn't work wouldn't take that much
to fix it.
PS: you'd have to use whatever regex syntax is supported on the backend:
don't expect the same flexibility of python's regex engi
Trying to install web2py in virtualenv on Ubuntu but when I run "w2p_run" I
get an error "RuntimeError: Cannot determine web2py version".
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving em
Please open a bug report if this still looks like a bug to you... Sure
sounds like one, but since I didn't see the code...
Regards,
Ales
On Friday, April 19, 2013 2:31:29 PM UTC+2, Tim Richardson wrote:
>
>
>
> On Friday, 19 April 2013 22:24:23 UTC+10, Willoughby wrote:
>>
>> They should show in
On Friday, 19 April 2013 22:24:23 UTC+10, Willoughby wrote:
>
> They should show in the ticket under "Error Traceback"
> At least they do for me...
>
>
>
> On Friday, April 19, 2013 7:14:08 AM UTC-4, Tim Richardson wrote:
>>
>> I'm trying to insert into a MSSQL 2005 database via DAL.
>> The inser
They should show in the ticket under "Error Traceback"
At least they do for me...
On Friday, April 19, 2013 7:14:08 AM UTC-4, Tim Richardson wrote:
>
> I'm trying to insert into a MSSQL 2005 database via DAL.
> The insert fails (because I missed a column non-NULL with no default
> value).
> Wha
is it possible to use regular expressions in DAL queries?
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
For more opt
Niphlod,
Thank you for pointing this out. I have some serious learning ahead. Thank you
for being patient with my questions.
I am good with your approach below. The first suggestion works out for me, and
my time zone issue is resolved.
Thank you!
On 19 Apr, 2013, at 15:39, Niphlod wrote:
I'm trying to insert into a MSSQL 2005 database via DAL.
The insert fails (because I missed a column non-NULL with no default value).
What bothers me a bit is that I don't seem to get an error message
anywhere. The insert returns None rather than the ID which makes sense.
I see nothing in sql.log.
Thanks again, Niphlod. I am getting close to finish what i want to do :-)
I can see that I get the time zone. After changing the timezone a few
times, I am not seeing it any more.
I am trying to trouble shoot this. I figured that i need to close my
browser, but this doesn't seem to make it wo
I must be doing something wrong, but just following the manual instructions
for PAM authentication I get
... global name 'username' not defined
even before I try to login.
changing
auth.settings.login_methods.append(pam_auth() )
to
auth.settings.login_methods.append(pam_auth)
solved
On Thu, Apr 18, 2013 at 10:02 PM, Niphlod wrote:
> PS: on the web2py process side, it seems that at most 10 connections are
> istantiated with Redis: is there a connection pool?
I guess, because you are running the web server with 10 threads.
python redis by default use a connection pool... see b
I have a server which only supports talking to Python using CGI. It
also requires a custom shebang line.
I was able to get the sample one working, from:
http://wiki.python.org/moin/CgiScripts
But I can't figure out how to make the "cgihandler.py" version work.
Thanks for all suggestions,
Alec T
Thanks, that is what i need.
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.go
look at http://web2py.com/books/default/chapter/29/07#Database-validators
... there are snippets that show you how you can "tune" the set of allowed
parameters.
On Friday, April 19, 2013 11:47:25 AM UTC+2, Domagoj Kovač wrote:
>
> Hi,
>
> i have a table of attributes like this:
>
> ID field_name
Hi,
i have a table of attributes like this:
ID field_name field_type
4 name STRING
5 description TEXT
6 power INTEGER
7 available BOOLEAN
8 price DECIMAL
9 date_of_entry DATE
11 companies STRING-LOV
Each of this entries represents field on a form.
Type STRING-LOV
On Fri, Apr 19, 2013 at 10:01 AM, BlueShadow wrote:
> I did now and I can't import it in python:
> ImportError: No module named gubby
>
Dont know if is a copy paste typo, but is guppy not gubby
Anyway:
Since you are using cache.disk,
the cache file is simply a shelve file you can inspect it wit
>
> it's a matter of "precedence". there's a clean section on the book on
> how to do it
>
> http://web2py.com/books/default/chapter/29/06?search=More+on+uploads
>
>
it's work well now, thank you so much for your pointer, niphlod.
if db(db.test2).isempty():
stream = open('./applications/
this is what appadmin does
from guppy import hpy
hp = hpy()
On Friday, April 19, 2013 11:01:56 AM UTC+2, BlueShadow wrote:
>
> I did now and I can't import it in python:
> ImportError: No module named gubby
>
>
> On Friday, April 19, 2013 9:54:08 AM UTC+2, Niphlod wrote:
>>
>> did you try openin
I did now and I can't import it in python:
ImportError: No module named gubby
On Friday, April 19, 2013 9:54:08 AM UTC+2, Niphlod wrote:
>
> did you try opening a python shell and seeing if you can still import
> guppy (i.e. it wasn't removed after all) ?
>
> On Thursday, April 18, 2013 11:51:05
it's a matter of "precedence". there's a clean section on the book on
how to do it
http://web2py.com/books/default/chapter/29/06?search=More+on+uploads
PS: you're importing populate from gluon.contrib but not using it: are you
sure you need it ?
On Friday, April 19, 2013 9:44:25 AM UTC+2,
did you try opening a python shell and seeing if you can still import guppy
(i.e. it wasn't removed after all) ?
On Thursday, April 18, 2013 11:51:05 PM UTC+2, BlueShadow wrote:
>
> I did kill all processes remotly related to web2py an uswgi and the
> internet restarted all and the cache page s
uhm... I may be wrong but request.restful accepts the args as a normal
page, that is a application/x-www-form-urlencoded or a multipart/form-data
. with curl would be something like curl -d name=blablabla -d
otherparameter=blablabla http://theurl
On Friday, April 19, 2013 1:24:03 AM UTC+2,
hi,
i've made comparison for populate upload field type which is test1 doesn't
store it in blob type field and test2 store it in blob type field
the result is test1 success to save the image file, but not in the test2,
it return in shell and return None in Database Administration.
is it possibl
fast_tz_detector returns a SCRIPT().
Of course you can't "read it" because the page executes it, so it's fine if
you see a blank space:
If you see the page source (using firefox, right click --> View page
source) you'd see a blablablabla
On the "let's save it to the database" topic . try i
Great answer, I was not aware of this,
Thank you.
On Friday, April 19, 2013, Niphlod wrote:
> this is an excerpt from the book
>
> Because of the way grid works one can only have one grid per controller
> function, unless they are embedded as components via LOAD. To make the
> default search grid
this is an excerpt from the book
Because of the way grid works one can only have one grid per controller
function, unless they are embedded as components via LOAD. To make the
default search grid work in more than one LOADed grid, please use a
different formname for each one.
So, 2 steps requi
82 matches
Mail list logo