[web2py] Re: Distributing as a Binary - External Libraries?

2013-12-14 Thread Massimo Di Pierro
Actually web2py uses py2exe+py2app, not pyinstaller. Perhaps we should. Anyway, you are right that if you installed BeautifulSoup, it will not ship with your apps. But, for pure python packages (and I think BeautifulSoup is pure python), if you copy the package under your app modules/ folder, th

[web2py] Distributing as a Binary - External Libraries?

2013-12-14 Thread Brando
Let's say I package my app via this method: http://web2py.com/AlterEgo/default/show/270. If my underlying python contains external libraries, will the program work? Let's say I give the app to someone who doesn't have the BeautifulSoup library installed. Am I correct in assuming the program

Re: [web2py] Re: Proposal - use the value of an environment variable as a path_prefix

2013-12-14 Thread Rob Mayhue
I like this idea better. It took me a little while to figure out exactly what was going on in rewrite.py to even arrive at my current solution, but I can see that what you suggest would be a better solution as well as easier to use. I chose the env var because I knew could easily get to the va

[web2py] Re: represent() question.

2013-12-14 Thread Anthony
You could always do something like: {{for i in range(len(all_items)):}} {{=A(all_items.render(i, fields=db.t_stores.owner_id).owner_id, _href=URL('default', 'stores', args=all_items[i].owner_id))}} {{pass}} Note, you don't have to specify the "fields" argument to .render(), but if you only

Re: [web2py] Re: Proposal - use the value of an environment variable as a path_prefix

2013-12-14 Thread Jonathan Lundell
On 14 Dec 2013, at 2:23 PM, Massimo Di Pierro wrote: > Please open a ticket about this proposal. I wonder if a more general solution might not be to have the router accept a regex for path_prefix, strip it from the incoming URL, and save it (say) as request.path_prefix. The outgoing URL rewrit

[web2py] Re: Proposal - use the value of an environment variable as a path_prefix

2013-12-14 Thread Massimo Di Pierro
Please open a ticket about this proposal. On Saturday, 14 December 2013 15:07:02 UTC-6, Rob Mayhue wrote: > > Proposal - use the value of an environment variable as a path_prefix > > When using the parametric router there is an option called `path_prefix` > that's > described as "a path fragment

[web2py] Re: routes.py question

2013-12-14 Thread Massimo Di Pierro
I think it should be: routes_in = ( ('/admin/$anything', '/admin/$anything'), ('/app2/$anything', '/app2/$anything'), ('/$anything', '/app1/$anything'), ) routes_out = [(b,a) for (a,b) in routes_in] On Saturday, 14 December 2013 12:51:30 UTC-6, Alan Etkin wrote: > > This is a mail mis

[web2py] Re: represent() question.

2013-12-14 Thread Avi A
For example: represnet(owner_id) On Saturday, December 14, 2013 11:57:02 PM UTC+2, Avi A wrote: > > One more question please, > The thing is that I need both to be rendered, the represented and NOT > represented value, so I can use it in the args() for example to the user > profile or store link

[web2py] Re: represent() question.

2013-12-14 Thread Avi A
these are probably different field. I will close this question for now...thanks. On Saturday, December 14, 2013 11:57:02 PM UTC+2, Avi A wrote: > > One more question please, > The thing is that I need both to be rendered, the represented and NOT > represented value, so I can use it in the args()

[web2py] Re: represent() question.

2013-12-14 Thread Avi A
One more question please, The thing is the I need both to be rendered, the represented and NOT represented value, so I can use it in the args() for example to the user profile or store.? I tried back with the represent()method but I still get the: NoneType' object is not callable So if there is

Re: [web2py] Re: Reddit Clone Week 3 video "jQuery error"

2013-12-14 Thread Doug Hauenstein
Thank you for your help. Doug On 12/14/2013 03:54 AM, Niphlod wrote: > a ] is missing > the selector is $('[something]') while you're instead using $('[something') > > On Saturday, December 14, 2013 6:27:56 AM UTC+1, Doug Hauenstein wrote: >> >> Massimo, >> >> My syntax appears to be identical t

Re: [web2py] Re: Reddit Clone Week 3 video "jQuery error"

2013-12-14 Thread Doug Hauenstein
Thank you very much. I will watch for it in this group. Doug On 12/14/2013 12:35 PM, Massimo Di Pierro wrote: > Sure the ] is also missing in the video. I will post my code asap. I am > cleaning up house. > > On Saturday, 14 December 2013 02:54:51 UTC-6, Niphlod wrote: >> >> a ] is missing >> t

[web2py] Proposal - use the value of an environment variable as a path_prefix

2013-12-14 Thread Rob Mayhue
Proposal - use the value of an environment variable as a path_prefix When using the parametric router there is an option called `path_prefix` that's described as "a path fragment that is prefixed to all outgoing URLs and stripped from all incoming URLs". I'm not sure what the original use case

[web2py] Re: represent() question.

2013-12-14 Thread Avi A
allright, 2.8.2 is now working and all is rendered referenced as expected using that: {{for item in all_items.render():}} {{=item.created_by}} {{=item.f_item_category}} {{=item.f_item_store}} {{pass}} Thank you very much. On Saturday, December 14, 2013 10:28:50 PM UTC+2, Avi A wrote: > > during t

[web2py] Re: Drop down not showing

2013-12-14 Thread Michel Hayek
Hi Massimo, Here is the table def i'm using for this db.define_table('t_user_has_companies', Field('USER_ID', 'reference auth_user', label='User', writable=True, readable=True, notnull=True, required=True, ondelete='NO ACTION'), Field('COMP_ID', 'reference t_com

[web2py] Re: represent() question.

2013-12-14 Thread Avi A
during this chat I upgraded to 2.8.2 and now i am stuck with some erro about: maxnum = MAXNFILES) in the admin/controller/default. :( On Saturday, December 14, 2013 10:24:40 PM UTC+2, Anthony wrote: > > Looks like there was a bug in the .render() code up until 2.7.2, so you'll > have to upgrad

[web2py] Re: represent() question.

2013-12-14 Thread Anthony
Looks like there was a bug in the .render() code up until 2.7.2, so you'll have to upgrade or edit dal.py to make it work. Even with the bug, I think you can instead do: {{for item in [all_items.render(i) for i in range(len(all_items))]:}} {{=item.created_by}} ... Anthony On Saturday, December

Re: [web2py] Re: list:reference painfull to fill

2013-12-14 Thread Richard Vézina
I forget... Don' forget to surround with tag... {{=XML(your_pass_js_script)}} On Sat, Dec 14, 2013 at 3:17 PM, Richard Vézina wrote: > In the view something like that : > > $( document ).ready(function() { > $('input#id').bsmselect(...); > }); > > It can be pass to the view from the con

[web2py] Re: represent() question.

2013-12-14 Thread Anthony
Can you show the whole traceback? I don't know why you'd be getting that error. Which version of web2py? On Saturday, December 14, 2013 2:53:11 PM UTC-5, Avi A wrote: > > I tried {{for item in all_items.render():}} > > On Saturday, December 14, 2013 9:48:57 PM UTC+2, Anthony wrote: >> >> Did you

Re: [web2py] Re: list:reference painfull to fill

2013-12-14 Thread Richard Vézina
In the view something like that : $( document ).ready(function() { $('input#id').bsmselect(...); }); It can be pass to the view from the controller, as you want... So you will need to do something like that : {{=XML(your_pass_js_script)}} :) Richard On Fri, Dec 13, 2013 at 6:38 PM, Jesse

[web2py] Re: represent() question.

2013-12-14 Thread Avi A
I see they both have notnull=True. (and format atribute). On Saturday, December 14, 2013 9:51:07 PM UTC+2, Anthony wrote: > > Are f_item_category and f_item_store reference fields? If so, they only > get the default "represent" validator if (a) you do not explicitly specify > a "requires" attr

[web2py] Re: represent() question.

2013-12-14 Thread Avi A
I tried {{for item in all_items.render():}} On Saturday, December 14, 2013 9:48:57 PM UTC+2, Anthony wrote: > > Did you do all_items.render() or all_items.repr()? > > On Saturday, December 14, 2013 2:12:31 PM UTC-5, Avi A wrote: >> >> when i try the render() metohod I get: >> >> AttributeError: 'R

[web2py] Re: represent() question.

2013-12-14 Thread Anthony
Are f_item_category and f_item_store reference fields? If so, they only get the default "represent" validator if (a) you do not explicitly specify a "requires" attribute and instead use the default validator, and (b) the referenced table has a "format" attribute. Otherwise, you will need to exp

[web2py] Re: represent() question.

2013-12-14 Thread Anthony
Did you do all_items.render() or all_items.repr()? On Saturday, December 14, 2013 2:12:31 PM UTC-5, Avi A wrote: > > when i try the render() metohod I get: > > AttributeError: 'Rows' object has no attribute 'repr' > > > So I'm probably on a different versioon? > > > On Saturday, December 14, 2013

[web2py] Re: represent() question.

2013-12-14 Thread Avi A
when i try the render() metohod I get: AttributeError: 'Rows' object has no attribute 'repr' So I'm probably on a different versioon? On Saturday, December 14, 2013 8:02:08 PM UTC+2, Avi A wrote: > > Hi, > I want to display item and use the represent() method to display reference > fields. >

[web2py] Re: represent() question.

2013-12-14 Thread Avi A
And i was trying what you answered me here once: https://groups.google.com/forum/?fromgroups=#!topic/web2py/U6-thwYLUVQ thanks. On Saturday, December 14, 2013 9:08:10 PM UTC+2, Avi A wrote: > > thanks, > why I try and use it is because when I use: > {{for item in all_items:}} > {{=item.created_by}

[web2py] Re: represent() question.

2013-12-14 Thread Avi A
thanks, why I try and use it is because when I use: {{for item in all_items:}} {{=item.created_by}} {{=item.f_item_category}} {{=item.f_item_store}} {{pass}} it renders: (2 items) 1 3 1 1 14 1 On Saturday, December 14, 2013 8:42:01 PM UTC+2, Anthony wrote: > > db.t_stores.created_by is a referenc

[web2py] Re: autofocus html5 attribute support?

2013-12-14 Thread Anthony
On Saturday, December 14, 2013 1:11:39 PM UTC-5, Ivan Gazzola wrote: > > I use in view: > > form.element('#id_field')['_autofocus']='' > > > and i get: > > > When I try it, that yields: Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com

Re: [web2py] Re: using appadmin for other models than db.py in web2py

2013-12-14 Thread deepak sandhu
perfect it worked I was earlier trying to remove the db definition from coffee but it used to cause an error as its should be in alpha numeric which I was ignoring On Sat, Dec 14, 2013 at 12:45 PM, Anthony wrote: > The problem is that you are defining db = DAL(...) in both coffee.py and > db.p

[web2py] routes.py question

2013-12-14 Thread Alan Etkin
This is a mail mistakenly sent to web2py-developers. I think that the note about not sending questions to the developers list is usually ignored. Maybe it could be made available somewhere else (perhaps at web2py.com). Original post: I have a nginx server, one domain, and two web2py applications

[web2py] Re: using appadmin for other models than db.py in web2py

2013-12-14 Thread Anthony
The problem is that you are defining db = DAL(...) in both coffee.py and db.py. Because db.py comes after coffee.py, the "db" object defined in coffee.py is simply replaced by the one defined in db.py, so none of the models in coffee.py will be available to any controller, including the appadmi

[web2py] Re: represent() question.

2013-12-14 Thread Anthony
db.t_stores.created_by is a reference field, so by default it gets a "represent" attribute if the table to which it refers has a "format" attribute. The other fields presumably are not reference fields (nor other types of special fields that get default "represent" attributes), so they have no

[web2py] Re: represent() question.

2013-12-14 Thread Avi A
I'm afraid I don't understand what you mean, but I didn't make one for the owner_rep and there it works? On Saturday, December 14, 2013 8:20:29 PM UTC+2, Massimo Di Pierro wrote: > > Perhaps you did not set a db.t_stores.f_store_name.represent = lambda > > On Saturday, 14 December 2013 12:02

[web2py] Re: Web2py on Mavericks - sqlite problem

2013-12-14 Thread John Zumsteg
I found the problem in a totally unexpected place. I am running the apps on Chrome, and had Firebug Lite installed. For the heck of it, I disabled Firebug, and all came back. John On Saturday, December 14, 2013 10:06:33 AM UTC-8, John Zumsteg wrote: > > I have several web2py apps that worked fi

[web2py] Re: using appadmin for other models than db.py in web2py

2013-12-14 Thread Massimo Di Pierro
There is only one app for addpadmin: http://127.0.0.1:8000/imageblog/appadmin/ It should give you access to all the models, including coffee.py On Saturday, 14 December 2013 12:01:44 UTC-6, deepak sandhu wrote: > > in web2py we I created a new application called imageblog and in models on > def

[web2py] Re: represent() question.

2013-12-14 Thread Massimo Di Pierro
Perhaps you did not set a db.t_stores.f_store_name.represent = lambda On Saturday, 14 December 2013 12:02:08 UTC-6, Avi A wrote: > > Hi, > I want to display item and use the represent() method to display reference > fields. > def home(): > all_items = db(db.t_items).select() > owner_

[web2py] Re: Drop down not showing

2013-12-14 Thread Massimo Di Pierro
If I understand the problem is that you first_name fields does not show a dropdown of users. This line is incorrect: *Field('first_name', 'reference auth_user', label='User', writable=True, readable=True, notnull=True, required=True, ondelete='NO ACTION', requires=IS_IN_DB(db, db.auth_user, '%

Re: [web2py] Re: Error with session when user tries to login

2013-12-14 Thread Marin Pranjić
I deleted all session files and asked the customer to delete cookies. He even upgraded his browser but was still getting the error. On Sat, Dec 14, 2013 at 12:33 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > have you deleted all sessions or are you using sessions created with a >

[web2py] Re: autofocus html5 attribute support?

2013-12-14 Thread Ivan Gazzola
I use in view: form.element('#id_field')['_autofocus']='' and i get: like html5 Il giorno venerdì 9 agosto 2013 04:04:17 UTC+2, Anthony ha scritto: > > form.custom.widget.tm_home["_autofocus"] > > This is just standard Python, so the above simply attempts to retrieve the > value with key

[web2py] using appadmin for other models than db.py in web2py

2013-12-14 Thread deepak sandhu
in web2py we I created a new application called imageblog and in models on default I have 2 models : db.py menu.py coffee.py #this is new one created by me in models i made some tables inside this too and if I use the url http://127.0.0.1:8000/imageblog/appadmin/ I can see t

[web2py] Web2py on Mavericks - sqlite problem

2013-12-14 Thread John Zumsteg
I have several web2py apps that worked fine until this morning. All use standard, out-of-the-box sqlite. This morning when I started working on one, I could not log in to the app; I could fill in the login information, click on the login button, and the screen would refresh with blank fields. I

[web2py] Re: Drop down not showing

2013-12-14 Thread Michel Hayek
No luck Stifan, i tried a bunch of stuff nothing worked with me. Any ideas? what you think are my other options? Thanks for your help -- *This e-mail is confidential and may also be privileged. If you are not the intended **recipient, please notify the sender immediately, delete it from yo

[web2py] represent() question.

2013-12-14 Thread Avi A
Hi, I want to display item and use the represent() method to display reference fields. def home(): all_items = db(db.t_items).select() owner_rep = db.t_stores.created_by store_rep = db.t_stores.f_store_name category_rep = db.t_categories.f_category_name return dict(all_items =

[web2py] Re: Reddit Clone Week 3 video "jQuery error"

2013-12-14 Thread Massimo Di Pierro
Sure the ] is also missing in the video. I will post my code asap. I am cleaning up house. On Saturday, 14 December 2013 02:54:51 UTC-6, Niphlod wrote: > > a ] is missing > the selector is $('[something]') while you're instead using $('[something') > > On Saturday, December 14, 2013 6:27:56 AM UT

[web2py] Re: XMLHttpRequest cannot load https://www..... disallowed for cross-origin request ...

2013-12-14 Thread weheh
Thanks, Anthony. Wasn't sure I had to go down that path. Yet another acronym to hide under the rug. On Saturday, December 14, 2013 11:39:25 PM UTC+8, weheh wrote: > > I've got a dialog that I pop open and on it is a button that makes a > web2py_component call. The button code looks like this, af

[web2py] Re: XMLHttpRequest cannot load https://www..... disallowed for cross-origin request ...

2013-12-14 Thread Anthony
Is it in fact a cross-origin request, and have you set up CORS on the server? On Saturday, December 14, 2013 10:39:25 AM UTC-5, weheh wrote: > > I've got a dialog that I pop open and on it is a button that makes a > web2py_component call. The button code looks like this, after it's gone > throu

[web2py] Re: Can not run web2py_no_console.exe. Version 2.8.2 on win 7 x 64

2013-12-14 Thread Сергей Ткаченко
The program simply will not start. Start and exit. понедельник, 2 декабря 2013 г., 0:35:29 UTC+4 пользователь Alan Etkin написал: > > Can not run web2py_no_console.exe. Version 2.8.2 on windows 7 x 64 >> > > Can you post how did you execute it and what was the output? > -- Resources: - http://w

[web2py] XMLHttpRequest cannot load https://www..... disallowed for cross-origin request ...

2013-12-14 Thread weheh
I've got a dialog that I pop open and on it is a button that makes a web2py_component call. The button code looks like this, after it's gone through the XML() helper and jquery UI. https://www.mysite.com/mycontroller/myfunc.load?pc=YGYzlEh6&_signature=607e035a239d88bd3ab8652814ceff2a9cab92b5";,

[web2py] Re: Reddit Clone Week 3 video "jQuery error"

2013-12-14 Thread Niphlod
a ] is missing the selector is $('[something]') while you're instead using $('[something') On Saturday, December 14, 2013 6:27:56 AM UTC+1, Doug Hauenstein wrote: > > Massimo, > > My syntax appears to be identical to yours but.. > Firebug is telling me I have a syntax error as follows. > > Error: