any updates/help...
--
does that work on a normal python script ?
On Tuesday, October 16, 2012 8:25:18 AM UTC+2, deepak wrote:
any updates/help...
--
somehow I've never heard a name for those, thanks for explaining. I agree
that the feature would be awesome, it's just a little bit cumbersome to
code. The source is on github, it's true, but visualizing e.g. for changes
of the last revision would not be very helpful, e.g. :
- rev 1 chapter 04
I agree with Anthony. Edit that css and see for yourself how can you manage
it. Most likely you want that label to go on more lines than one, so what
you are searching for in that case is word
wraphttp://www.css3.com/css-word-wrap/
On Tuesday, October 16, 2012 5:14:02 AM UTC+2, Anthony wrote:
On Tue, Oct 16, 2012 at 6:37 AM, Martin Weissenboeck mweis...@gmail.com wrote:
The trunc version solved my problem
Working for me too.
Ricardo
2012/10/16 Massimo Di Pierro massimo.dipie...@gmail.com
This helped a lot. I was able to reproduce it and fix it. Can you please
check it in
xmlwitch?
xmlwitch works on normal python script.
Is there a way to return custom made xml from web2py controller.
Can you please help me with some prototype?
On Tuesday, 16 October 2012 13:36:30 UTC+5:30, Niphlod wrote:
does that work on a normal python script ?
On Tuesday, October 16,
Thanks...
is deploy to openshift experimental?
On Tuesday, October 16, 2012 4:04:36 AM UTC+3, Massimo Di Pierro wrote:
The book is now kind of in between versions it is correct but some of
the new features are not described and some example use old API while there
is a better way. I
Hi,
Using web2py, straight out of the box, no routes.py or such :
When i request :
https://myserver/myapp/mycontroller/myfunction
having /models/models.py :
...
default_application = 'myapp'
...
and /controllers/mycontroller.py :
def myfunction():
# no pasa nada
return dict()
I have called
auth.impersonate(0)
to finish impersonation.
Now (Version 2.1.1) I see:
Traceback (most recent call last):
File H:\...\web2py\gluon\restricted.py, line 209, in restricted
exec ccode in environment
File H:/.../applications/secure/controllers/default.py
what I needed was knowing if
import xmlwitch
def get_xml():
xml = xmlwitch.Builder(version='1.0', encoding='utf-8')
with xml.feed(xmlns='http://www.w3.org/2005/Atom'):
xml.title('Example Feed')
xml.updated('2003-12-13T18:30:02Z')
Hey Everyone,
Instead of trace trawling with the routes_onerror variable, in routes.py
I'm trying to get it to route if an invalid application, controller or
function is passed. The app part of the uri might be right, but the
controller is not so re-route kind of deal. All I get is a standard
On 15 October 2012 20:17, Vladyslav Kozlovskyy vld...@gmail.com wrote:
sure, it's a right decision :)
Thanks for adding this, however I actually don't see this as ideal now.
Here it is read only once - at web2py startup.
I'm not sure how or where I would set this.
Ideally I'd like to control
As far as I know it works but I will say experimental until more people
have tried it.
On Tuesday, 16 October 2012 04:07:37 UTC-5, apps in tables wrote:
Thanks...
is deploy to openshift experimental?
On Tuesday, October 16, 2012 4:04:36 AM UTC+3, Massimo Di Pierro wrote:
The book is now
There is a bug, I just fixed it in trunk.
auth.impersonate(0)
is correct.
On Tuesday, 16 October 2012 04:38:35 UTC-5, mweissen wrote:
I have called
auth.impersonate(0)
to finish impersonation.
Now (Version 2.1.1) I see:
Traceback (most recent call last):
File
Fran is right. We need this configurable per app, not global
On Tuesday, 16 October 2012 05:32:19 UTC-5, Fran wrote:
On 15 October 2012 20:17, Vladyslav Kozlovskyy
vld...@gmail.comjavascript:
wrote:
sure, it's a right decision :)
Thanks for adding this, however I actually don't
This is new in trunk and needs to be tested. Add this to your app:
session.connect(cookie_key='mypassphrase')
and sessions will be stored in cookies (like Flask does). Cookies are
encrypted with AES 32bites and signed with HMAC+SHA1.
--
we could go with phpmyadmin solution: null checkboxes next to string fields
On Monday, October 15, 2012 8:55:20 PM UTC-4, Massimo Di Pierro wrote:
Good point. If the field is of type string, the form
does distinguish between an empty string and null, assumes an empty string.
On Monday, 15
Is this the actual trunc-version?
Version 2.1.1 (2012-10-16 06:19:35) dev
I get the same message
type 'exceptions.UnboundLocalError' local variable 'user' referenced
before assignment
2012/10/16 Massimo Di Pierro massimo.dipie...@gmail.com
There is a bug, I just fixed it in trunk.
Hi Niphlod,
xmlwitch was not able to return the xml object.
I got error:
*TypeError: __repr__ returned non-string (type instance)*
--
I do not like it. Do we need it?
On Tuesday, 16 October 2012 06:43:24 UTC-5, Yarin wrote:
we could go with phpmyadmin solution: null checkboxes next to string fields
On Monday, October 15, 2012 8:55:20 PM UTC-4, Massimo Di Pierro wrote:
Good point. If the field is of type string, the form
can you show all traceback?
On Tuesday, 16 October 2012 07:18:38 UTC-5, mweissen wrote:
Is this the actual trunc-version?
Version 2.1.1 (2012-10-16 06:19:35) dev
I get the same message
type 'exceptions.UnboundLocalError' local variable 'user' referenced
before assignment
2012/10/16
Now it's working fine! I suppose they cached the old version in their web
proxy ...
Thank you,
Nico
--
Traceback (most recent call last):
File H:\...\web2py\gluon\restricted.py, line 209, in restricted
exec ccode in environment
File H:/.../web2py/applications/secure/controllers/default.py
http://127.0.0.1:8000/admin/default/edit/secure/controllers/default.py,
line 3988, in module
File
perfect!
NB: Before screaming that web2py isn't working you'd normally have to run
whatever external module you're trying to use and understand how it works.
PS: I don't have a python installation at hand to try xmlwitch, but as long
as that bit goes into exception there is no way web2py can
I'll do ASAP. If the cookie only is used to store session data, I imagine
any webapp using this will hit the 4000 chars limit of cookies, right ?
Did someone tested how much data (let's say, how many keys of a dict
composed by keys 10 characters long with values 10 characters long) can fit
in
I'm a little bit uncertain about this. We're struggling to make web2py
somewhat faster but then we're incline to drop in faulty checks for every
request just to support run-time configs Can we think about something
like global_settings_per_app that is set (and stored) at the first request
It works fine here. I get two cookies (listed below):
How can we set a longer expiration?
Name: session_id_w2a
Content: None
Domain: localhost
Path: /
Send for: Any kind of connection
Accessible to script: Yes
Created: Tuesday, October 16, 2012 4:51:00 PM
Expires: When the browsing session ends
when i click on deploy to openshift , I get the error :
cannot import name dir_util
On Tuesday, October 16, 2012 2:17:43 PM UTC+3, Massimo Di Pierro wrote:
As far as I know it works but I will say experimental until more people
have tried it.
On Tuesday, 16 October 2012 04:07:37
Ashraf,
(reposting, as response did not show up on list)
This morning I installed a web2py app using the github path to Andrew's
v2.0.9 web2py install on openshift and it worked fine. My other app install
has been working for months, and it uses v2.0.2. I did receive recently an
e-mail from
On 16 Oct 2012, at 2:27 AM, apinho jaapi...@sapo.pt wrote:
Using web2py, straight out of the box, no routes.py or such :
When i request :
https://myserver/myapp/mycontroller/myfunction
having /models/models.py :
...
default_application = 'myapp'
...
and
Hi,
Yes I have such directory.
I can access myapp, but I'm forced to put all my functions inside
DEFAULT.PY controller. I was wishing to split my functions across
differente controllers, and I just can't understand why I can't.
I'm using nginx, with this config :
server {
listen
The fix in trunk worked for me.
Martin are you calling impersonate(0) via GET or POST.
Now I'm going to guessing mode
I guest it is via GET, right? And probably when you call it
you were not an impersonator any more.
Massimo, maybe it is a condition missing:
we have in gluon/tools.py:
All worked fine for me...
Name: session_data_dev_tmobile
Content: afccd...8B60
Host: 127.0.0.1
Path: /
Send for: Any type of connection
Expires: At end of session
Name: session_id_dev_tmobile
Content: None
Path: /
Send for: Any type of connection
Expires: At end of session
On Tue, Oct 16,
I think cookie-based sessions is great for many cases. But in some cases,
it might not be desirable as clients can see what might be secret
information.
Why not both?Maybe, two types of sessions, client-side and server-side
sessions. Although both client and server side sessions are
I added this
current.T.is_writable = False or True
I do not think this adds any performance penalty because writes should not
happen anyway. If they happen, there is already a big performance hit.
On Tuesday, 16 October 2012 06:21:40 UTC-5, Massimo Di Pierro wrote:
Fran is right. We need
in trunk
On Tuesday, 16 October 2012 10:51:08 UTC-5, Ricardo Pedroso wrote:
The fix in trunk worked for me.
Martin are you calling impersonate(0) via GET or POST.
Now I'm going to guessing mode
I guest it is via GET, right? And probably when you call it
you were not an
Note for future searchers people as foolish as I am to try and use Oracle
for web site backend.
This happened to me after I finally got the auth.wiki installed in my
application and the application connected to Oracle. I had to manually
create the wiki_page, wiki_media, and wiki_tab tables in
On 16 Oct 2012, at 8:42 AM, apinho jaapi...@sapo.pt wrote:
Hi,
Yes I have such directory.
I can access myapp, but I'm forced to put all my functions inside DEFAULT.PY
controller. I was wishing to split my functions across differente
controllers, and I just can't understand why I can't.
did you even try it (or reading the post) before starting bashing around
:-P ???
those cookies contains crypted (and signed) data. No user can read the
contents.
On Tuesday, October 16, 2012 5:59:20 PM UTC+2, VP wrote:
I think cookie-based sessions is great for many cases. But in some
Right now you can have or the other. To me it does not make sense to store
anything client side if you already have to access a pickle object locally.
You only add overhead and risk of exposing data.
On Tuesday, 16 October 2012 10:59:20 UTC-5, VP wrote:
I think cookie-based sessions is great
Java PlayFramework! has this as the only default. Using client side cookie
based sessions help create distributed environment easily, as there are no
sessions specific to one server node. They use both client side
cookies for sessions and caches for keeping serverside data.
David
Dne
Now it's ok - thank you!
Regards, Martin
2012/10/16 Massimo Di Pierro massimo.dipie...@gmail.com
in trunk
On Tuesday, 16 October 2012 10:51:08 UTC-5, Ricardo Pedroso wrote:
The fix in trunk worked for me.
Martin are you calling impersonate(0) via GET or POST.
Now I'm going to guessing
On Tuesday, 16 October 2012 11:23:29 UTC-5, Bill Thayer wrote:
Note for future searchers people as foolish as I am to try and use
Oracle for web site backend.
I did not have this issue with tables created by web2py.
so why did you create the wiki tables manually? I am missing
You can do the same in web2py. You can use cache and sessions. The session
you can put where you want. What does not make sense to me is put some
session data in session files and some in cookies. If you have to have the
session files, use them.
On Tuesday, 16 October 2012 11:51:59 UTC-5,
Thank you Margaret,
I am trying to use the admin (deploy to openshift). My understanding is
that you are not using that option for deployment.
Do you know any requirements for using admin (deploy to openshift) ?
Ashraf
On Tuesday, October 16, 2012 5:57:13 PM UTC+3, greaneym wrote:
Ashraf,
On Tuesday, October 16, 2012 11:33:38 AM UTC-5, Niphlod wrote:
did you even try it (or reading the post) before starting bashing around
:-P ???
those cookies contains crypted (and signed) data. No user can read the
contents.
It's not meant to be bashing web2py. Massimo said this
On Tuesday, October 16, 2012 11:39:02 AM UTC-5, Massimo Di Pierro wrote:
Right now you can have or the other. To me it does not make sense to store
anything client side if you already have to access a pickle object locally.
You only add overhead and risk of exposing data.
I think one
i tried to lock table but with error
class 'gluon.contrib.pymysql.err.InternalError' (1099, uTable
'publication' was locked with a READ lock and can't be updated)
db.executesql('LOCK TABLE publication READ;')
result = db(db.publication.id==pubid).select()[0]
newlist = result.photo_list
Ok, I confirm that... I had the same problem here the problem can be
reproduced by adding this line to a new app :
db.auth_user.password.requires =
[IS_STRONG(),CRYPT(key=auth.settings.hmac_key)]
Below :
## create all tables needed by auth if not custom tables
auth.define_tables(username=False,
forget it. it's weird that read lock for mysql is read only, i have to
obtain write lock. it seems not possible to block write access only.
On Wednesday, October 17, 2012 2:55:49 AM UTC+8, vince wrote:
i tried to lock table but with error
class 'gluon.contrib.pymysql.err.InternalError'
Disclaimer: I may be wrong
Reading your example code, you are updating a single record.
If done in a single request, web2py wraps all commands in a transaction.
In your code, that means that when you want to remove from photolist an
item of your publication row, that operation is atomic.
On Tuesday, October 16, 2012 7:42:41 PM UTC+2, VP wrote:
It's not meant to be bashing web2py. Massimo said this implementation is
like Flask. As such, they are cryptographically signed, but not encrypted.
If that is the case, they might be read but not modified.
yes, but
Could I please ask someone with Apache/mod_wsgi to test this code?
Everything works fine on a local rocket webserver, and also on nginx, but
for some reason when it runs on Apache returns Not authorized. I just
can't figure out where exactly is the problem. Same Apache server runs
several
On Tuesday, October 16, 2012 7:46:16 PM UTC+2, VP wrote:
I think one advantage of moving session data to the client side is
scalability. There ought to be a noticeable difference between 100
processes writing to the same filesytem and these computations moved to the
client side.
I'd go for this if the session is small and does not contain critical
information. So it is good to have this option.
marți, 16 octombrie 2012, 22:27:01 UTC+3, Niphlod a scris:
On Tuesday, October 16, 2012 7:46:16 PM UTC+2, VP wrote:
I think one advantage of moving session data to the
goes always in exception, and the bug is that the IV key must be 16 bytes.
secure_dumps is padding the key to 32 (correct) but using key as well for
the IV argument.
On Tuesday, October 16, 2012 1:24:00 PM UTC+2, Massimo Di Pierro wrote:
This is new in trunk and needs to be tested. Add this
About 6 days ago I posted my saga of failed attempts to get plugin_wiki
to work with oracle and to add the blob field. You told me to put return
auth.wiki() in my controller and use the built in auth wiki but I needed a
bit more information and Oracle was still complaining.
Alan told me to add
HI All,
I am up against the wall as far as time is concerned, I have promised I
will get the images for his updated products on his site by end of play
today and this is the first time I have used web2py to automate most of the
process.
I am getting this error
type
Dear all,
I've just switched from sqlite to postgres, and now I have problems with
few queries.
One query that works correctly on sqlite and fails on postgres is the
following:
s=db.club.created_on.year() | db.club.created_on.month() |
db.club.created_on.day()
count =
did you try printing query3 before starting the for loop ?
On Tuesday, October 16, 2012 10:51:28 PM UTC+2, Simon Carr wrote:
HI All,
I am up against the wall as far as time is concerned, I have promised I
will get the images for his updated products on his site by end of play
today and
whoops, gotcha.
syntax for executesql is rows = db.executesql(), not rows =
db(db.executesql()) :-P
now, go back hitting the wall :P
--
Many Many Thanks,
I owe you a beer.
Simon
On Tuesday, 16 October 2012 22:09:46 UTC+1, Niphlod wrote:
whoops, gotcha.
syntax for executesql is rows = db.executesql(), not rows =
db(db.executesql()) :-P
now, go back hitting the wall :P
--
Hi Alan.
I went through the registration process, got the Google sign in. Signed in
with google too and then did not get re-directed back.
-Bill
On Wednesday, September 12, 2012 11:49:47 AM UTC-5, Alan Etkin wrote:
El miércoles, 12 de septiembre de 2012 12:19:02 UTC-3, Tito Garrido
and confirmed, you can store a limited amount of data, after that the
session remains the same (~a dict with 80 keys , 10 chars length both for
keys and values)
to reproduce:
import string
def test():
key = session.counter or 0
session['counter'] = key + 1
session[key] =
If web2py actually encrypt sessions, that will take quite some time, and
saving/retrieving sessions can be computing intensive. I think session
data signed and not encrypted is the way to go.
With respect to scalability, the computation here is the saving to the
filesystem. This is the
https://lh3.googleusercontent.com/-6ZrkWiYpzU8/UH3T2J1J9II/ACo/bdZfoL-xDfg/s1600/funnymenu.png
--
If this is of any help, I tried tracing basic login in tools.py, and
figured out variable basic never gets value from
current.request.env.http_authorization, so username and password never get
passed through.
On the local server, that value gets populated and basic login works as
expected...
Hi Ashraf,
I don't understand what you mean by using admin deploy to openshift, but
no, I've just used the rhc commands to create the python gear as described
in the openshift guide, then used Andrew's scripts to install web2py. But
that does create an admin interface accessible via https and
Hi Massimo
Big fans of web2py here in CST.
We would look at using Red Hat, Openshift, but we have to host in Europe.
I think one of the problems is web2py is so easy to set up on ubuntu,
eb uses Amazon Linux so I am probably struggling with stuff I never ad to
worry about.
Best Regardws
Hi Niphlod,
xmlwitch was able to print the xml but couldn't return from an method. I
got issues :
*TypeError: __repr__ returned non-string (type instance)*
--
Hi,
I have a configuration file. I wanted to use ConfigObj library to access
the configuration file.
I have placed the file inside the controller and tried accessing it like:
cfg=ConfigObj(conf.ini)
It didnt read the file. But when i gave it like this:
Hi,
1. How do i return user defined xml data from web2py?
2. I tried using xmlwitch along web2py but i get error :
error on line 1 at column 26: Specification mandate value for attribute
instance
Need some help...
-
Deepak
--
Can you please open a ticket about this?
On Friday, 12 October 2012 10:04:35 UTC-5, piero crisci wrote:
I tryed to find others with the same iusse problem without understand how
to solve the problems :(
I set in the db.py the follow table
Oops. Never seen them before. What;s the browser? Which web2py version?
Anybody else sees them?
On Tuesday, 16 October 2012 16:39:47 UTC-5, Bill Thayer wrote:
https://lh3.googleusercontent.com/-6ZrkWiYpzU8/UH3T2J1J9II/ACo/bdZfoL-xDfg/s1600/funnymenu.png
--
*Hi Margaret,*
*
I don't understand what you mean by using admin deploy to openshift.*
I mean local admin, as in http://127.0.0.1:8000/admin/default/site , it has
a button called deploy to openshift.
Since your way is working fine, I will try yours...)
You have a good one.
Last question: Do i
@all: you should test it before all. Storing session in cookies is achieved
with scalability in mind. It's quite a buzzword on these days, but things
to consider are a lot. Really, a lot.
One thing is saying that sharing a single filesystem among 100 machines
(scalability) is more intensive
If encryption is an issue, maybe it should be optional.
@Nihplod, your posts are very helpful (not just this one) :)
Thanks for your efforts.
--
word warp is exactly what I was hoping to do in the label declaration ! ..
and Yes .. thank you Anthony, I was not sure ! .. you are right ! .. I had
to try before I asked !
thanks weheh .. and thank you Niphlod .. you hit it right on the nail !
thank you every one it is very much
The section Adding Grids refers to using appadmin to create a group
manager, but I can't find anything in appadmin that allows that.
Could someone give me a clue. It seems that something is missing here.
--
Hello,
I was wondering if web2py controllers could adapt returning just variables.
Either as single variable or python implicit tuple.
def index():
return images,stories
They would implicitly be getting the same dict keys.
But I often find it redundant to do it. I know that if I return a
On Wednesday, October 17, 2012 12:53:33 AM UTC+2, Marin Pranjić wrote:
If encryption is an issue, maybe it should be optional.
ehm, 4.7 sec on worst case scenario for 1M repetitions on a single machine
means wasting 0,0047 ms per request. Fast responses averages to ~20ms,
so again, worst
Hello everyone,
Thanks to Allen, Villas, of course Massimo among a few others I have web2py
auth.wiki with Oracle storing the media blobs and all the pages. I believe
I can use the wiki features in a structure way to improv productivity and
cross department functionality in my workplace.
Now
Hello Mike,
I'm not an expert but i think you need to go to
http://127.0.0.1:8000/myapp/appadmin/index then click on the auth user
table and add a user,
then go to the groups table table and create a manager
then go to the membership table and make your new user a manager
then go to the
nothing shorter than this
def s(*args, **kwargs):
rtn = {}
for a in args:
rtn[a] = kwargs['l'].get(a)
return rtn
def test():
images = 'a'
stories = 'b'
l = locals()
return s('images','stories', l=l)
PS: there's no way to retrieve name of variables from
Ashraf, I posted twice to your answer but don't see it on the list. Maybe
the answers went directly to you.
margaret
On Tuesday, October 16, 2012 5:35:04 PM UTC-5, apps in tables wrote:
*Hi Margaret,*
*
I don't understand what you mean by using admin deploy to openshift.*
I mean local
unfortunatelynope
On Wednesday, October 17, 2012 4:02:33 AM UTC+3, greaneym wrote:
Ashraf, I posted twice to your answer but don't see it on the list. Maybe
the answers went directly to you.
margaret
On Tuesday, October 16, 2012 5:35:04 PM UTC-5, apps in tables wrote:
*Hi Margaret,*
Git was easy to install (on a mac) using this link,
https://help.github.com/articles/set-up-git
You need git to keep a copy of your repository somewhere else besides on
the openshift server.
and the only change after that was to the parameters_xxx.py file which one
uses to access the admin
Thank you ...for being so supportive.
On Wednesday, October 17, 2012 4:21:43 AM UTC+3, greaneym wrote:
Git was easy to install (on a mac) using this link,
https://help.github.com/articles/set-up-git
You need git to keep a copy of your repository somewhere else besides on
the openshift
On Tuesday, 16 October 2012 17:39:36 UTC-5, Niphlod wrote:
BTW, encrypting and decrypting (on the worst case scenario, 4KB of data)
takes 4,7 seconds for 1 million iterations. I'd definitely use encryption
no matter what if designing a large scale deployment,
+1 sessions in cookies
Try:
@{component:default/part_manage.load}
Or customize the part_manage.html to not {{extend 'layout.html'}}
On Tuesday, 16 October 2012 19:20:35 UTC-5, Bill Thayer wrote:
Hello everyone,
Thanks to Allen, Villas, of course Massimo among a few others I have
web2py auth.wiki with Oracle
I don't know how it possibly worked in sqlite, but this is an aggregate
query combined with a non-aggregate query.
In other words, the count is a property of an aggregation of rows in the
database, whereas created_on is a property of individual rows.
This confuses Postgres. It doesn't know if
I set up my Webfaction hosting with a single web2py install that I intend
to use for a couple of subdomains pointing to separate apps using routes.py.
I pointed domain.com and blog.domain.com to my web2py app and through
routes.py told web2py to point blog.domain.com to my blog app that I plan
I'm getting the following ticket after upgrading from web2py 1.99.x to
2.1.1 source:
Traceback (most recent call last):
File N:\web2py\gluon\restricted.py, line 209, in restricted
exec ccode in environment
File N:\web2py\applications\myapp\views\mycontroller/index.html, line 444,
in
93 matches
Mail list logo