[web2py] Re: Installing the book as an app?

2012-12-28 Thread Nico Zanferrari
I'm sorry, the error ticket was my fault - forget it. The book application is working fine. Nico --

[web2py] Upload field with clear text filename

2012-12-28 Thread Joe Barnhart
I'm not sure why this is difficult, but I see many posts about this when I search, yet none exactly work for me. This seems like it should be easy but is surprisingly difficult in web2py. I want to keep a table of uploaded files with the uploads in a blob field and the names in clear text in

[web2py] Re: Table Name from ROWS object

2012-12-28 Thread at
yes please; it would be really helpful for beginners like me thank you On Friday, 28 December 2012 12:56:44 UTC+5, Massimo Di Pierro wrote: Apparently only in one example: http://web2py.com/books/default/search/29?search=**dict I can add something about this. On Friday, 28 December 2012

[web2py] Re: Installing the book as an app?

2012-12-28 Thread Tim Richardson
On Friday, 28 December 2012 18:56:37 UTC+11, Nico Zanferrari wrote: Hello, the right URL is https://github.com/mdipierro/web2py-book.git ;-)) Ah, that makes quite a difference :) Thanks. git itself doesn't need the .git --

[web2py] Re: Upload field with clear text filename

2012-12-28 Thread Anthony
Are you saying you want the name in the filename field to be encoded into the string stored in the upload field so the file has the name in the filename field upon download? If so, then try: if request.vars.upload and request.vars.filename: request.vars.upload.filename =

Re: [web2py] Re: delete uploads with SQLFORM.factory

2012-12-28 Thread paolo.vall...@gmail.com
Hi, I had a look at sqlform.py, the error comes from the fact that if a default value is set for the field upload, web2py tries to read it and store it as the new value for the upload field. As a result it is not possible to me to edit forms and remove uploads by setting the default value, this

Re: [web2py] Re: Graph Model (proposal to contribute)

2012-12-28 Thread Alan Etkin
Too bad graphviz does not accept css (and the source is weird also). I wonder if there is any alternative library with similar functionality. Maybe something to produce an svg visual model with a simple API. Am I asking too much? --

[web2py] nesting in views

2012-12-28 Thread _developer_
I have a following problem with the syntax, who can help me here please. here is my code: *{{=A(XML(T('New Ticket')), _href='#', [if '/ttracker/index' in request.env.path_info: _style='text-decoration: bold;' pass])}} * syntax error: [if... what is the correct syntax? --

Re: [web2py] Can the parametric router 301 redirect from www?

2012-12-28 Thread Jonathan Lundell
On 27 Dec 2012, at 10:31 PM, HittingSmoke hittingsm...@gmail.com wrote: Pretty straight forward question. Can I use the parametric routes.py language to 301 redirect from www.domain.com to domain.com for proper search engine crawling? You'd be better off configuring your server to do

[web2py] setup-web2py-ubuntu.sh and Python 2.7

2012-12-28 Thread Martin Weissenboeck
I want to make a new Python installtion on a Debian computer. I have installed Python 2.7.3, because there are some new language constructs I want to use. Afterwards I have made a new installation of web2py using the script setup-web2py-ubuntu.sh. Works fine, but it uses Python 2.6 What changes

Re: [web2py] Where to host web2py

2012-12-28 Thread Andrew
Gustavo, Make sure that you're accessing it via https, I've noticed that if I click on the admin button from the main page accessed via http, it uses whatever transport protocol that was specified to get there. If you're already doing this I'd take a look at the web2py logs in

[web2py] Re: Graph Model (proposal to contribute)

2012-12-28 Thread Luc Chase
Hi, just to clarify please... is this to show the model using a graphical model? Or is it for extending the DAL to support Graph databasehttp://en.wikipedia.org/wiki/Graph_databasemodels ? -- Luc. On Saturday, 15 December 2012 14:49:48 UTC, Jose wrote: Hi I modified the admin and welcome,

Re: [web2py] Re: Graph Model (proposal to contribute)

2012-12-28 Thread António Ramos
D3js 2012/12/28 Alan Etkin spame...@gmail.com Too bad graphviz does not accept css (and the source is weird also). I wonder if there is any alternative library with similar functionality. Maybe something to produce an svg visual model with a simple API. Am I asking too much? -- --

Re: [web2py] WWW SQL Designer to DAL converter

2012-12-28 Thread Derek
Yes, it's pretty much the same, you can also generate web2py from it, and it works just fine. Well, the relations needs a bit of work, but it does make it easier. On Friday, December 28, 2012 12:12:32 AM UTC-7, Massimo Di Pierro wrote: Didn't we have this already? http://gaesql.appspot.com/

[web2py] Re: Upload field with clear text filename

2012-12-28 Thread Joe Barnhart
Hi Anthony -- I want the opposite of this -- I want the actual text filename, not the encoded one. The book example I followed did not work. -- Joe On Friday, December 28, 2012 2:18:24 AM UTC-8, Anthony wrote: Are you saying you want the name in the filename field to be encoded into the

[web2py] Re: new admin in trunk

2012-12-28 Thread Joe Barnhart
Works fine for me too. It's a little large looking on my screen. But I notice the same about my own Bootstrap-based app. I almost feel like I need to find a way to trim out some of the extra whitespace and reduce the font sizes a tad. But that's probably just me. -- Joe B. On Monday,

Re: [web2py] Replaced `auth_user` fields 'first_name' and 'last_name' with 'name'; now getting errors

2012-12-28 Thread Massimo Di Pierro
{{=auth.navbar(user_identifier='%(email)s')}} This defaults to user_identifier='%(first_name)s' but you do not have a first name. On Friday, 28 December 2012 01:10:34 UTC-6, Alec Taylor wrote: Thanks, but that also isn't working: `type 'exceptions.AttributeError' 'Row' object has no

[web2py] Re: nesting in views

2012-12-28 Thread Massimo Di Pierro
*{{=A(T('New Ticket'), _href='#', **_style=('text-decoration: bold;' if** '/ttracker/index' in request.env.path_info else None))}} * On Friday, 28 December 2012 05:42:07 UTC-6, _developer_ wrote: I have a following problem with the syntax, who can help me here please. here is my code:

Re: [web2py] Re: Graph Model (proposal to contribute)

2012-12-28 Thread Massimo Di Pierro
I would very much prefer if the graph were generated in JS instead of using serverside code. On Friday, 28 December 2012 12:34:49 UTC-6, Ramos wrote: D3js 2012/12/28 Alan Etkin spam...@gmail.com javascript: Too bad graphviz does not accept css (and the source is weird also). I wonder

[web2py] Redmine beside web2py with Nginx deployment script

2012-12-28 Thread Richard
Hello, This is a new year gift for the one who would use Redmine beside web2py... :) The script is largely base on new Niphold web2py nginx deployment script ( https://groups.google.com/forum/?fromgroups=#!searchin/web2py/nginx$20niphold/web2py/15J3T35_K_w/v_t1099dIf4J ). I spend many hours

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2012-12-28 Thread Richard Vézina
Hello, I publish a new script that allow deployment of Redmine beside web2py. Here : https://groups.google.com/forum/?fromgroups=#!searchin/web2py/redmine/web2py/ZqL7Si8Khbo/Es-wK1yXdgQJ Notice : After some read, I choose Unicorn over Phussion Passenger. Richard On Thu, Dec 20, 2012 at 9:57

Re: [web2py] Can the parametric router 301 redirect from www?

2012-12-28 Thread HittingSmoke
I'm using my host's shared nginx instance to serve web2py through uwsgi to save RAM and keep responsiveness up. I can't really do any server-side configuration that isn't through uwsgi or web2py without building my own nginx instance unfortunately. I really like the simplicity of the

Re: [web2py] setup-web2py-ubuntu.sh and Python 2.7

2012-12-28 Thread Khalil KHAMLICHI
root@N4050:~# which python /usr/bin/python root@N4050:~# root@N4050:~# file /usr/bin/python /usr/bin/python: symbolic link to `python2.7' root@N4050:~# ls /usr/bin/python /usr/bin/python root@N4050:~# ls -al /usr/bin/python lrwxrwxrwx 1 root root 9 Oct 10 20:51 /usr/bin/python - python2.7

Re: [web2py] Can the parametric router 301 redirect from www?

2012-12-28 Thread Jonathan Lundell
On 28 Dec 2012, at 12:56 PM, HittingSmoke hittingsm...@gmail.com wrote: I'm using my host's shared nginx instance to serve web2py through uwsgi to save RAM and keep responsiveness up. I can't really do any server-side configuration that isn't through uwsgi or web2py without building my own

[web2py] Can web2py be used for highly complex relational databases?

2012-12-28 Thread Alex Glaros
Can web2py be used for highly complex relational databases for large fiscal projects? Example: California's Fi$cal project - http://www.fiscal.ca.gov/http://www.linkedin.com/redirect?url=http%3A%2F%2Fwww%2Efiscal%2Eca%2Egov%2Furlhash=DBJm_t=tracking_anet - with roughly 10,000 tables and many

[web2py] Requirement for Oracle R12 General Ledger / Cost Management Functional Consultan

2012-12-28 Thread Manish Kaul
Requirement for Oracle R12 General Ledger / Cost Management Functional Consultant Position: General Ledger / Cost Management Resource Work Location: Keene, NH Duration: 9 months Strong Oracle R12 General Ledger / Cost Management Functional Consultant • Knowledge of Inventory

[web2py] Intro and my Web2py app

2012-12-28 Thread Ilya
Hello, I'm new to Web2py having used it for a few assignments and final project in our web frameworks class. Here's my app that I'm hoping to take a little further as I get a better handle on Web2py and Python. It's not deployed on any domain, so just posting the source:

[web2py] Re: upload from Edit page

2012-12-28 Thread ArNew
Hi Massimo, I am using upload attachments. I have Create and Edit pages with number of fields. Upload is one of the fields. Now in create page, it was pretty straight forward using, Upload field in model. Table name is service_attachments

Re: [web2py] Redmine beside web2py with Nginx deployment script

2012-12-28 Thread Arnon Marcus
Holy Shit ! This SO AWESOME !! Just the kind of combination I was looking for ! I am so trying this at work next week... 10x a lot! Couple of questions: 1. Can that be used on a vm-based ubuntu, say, on VirtualBox on win7 ? 2. Is it a 64bit flavour of ubuntu? 3. What python version is it

[web2py] Re: Can the parametric router 301 redirect from www?

2012-12-28 Thread HittingSmoke
I ended up setting up a new static app using my host's shared Apache instance. I'm pointing all my www.* domains at it which simply contains a mod_rewrite entry to remove www from URLs. This should be less overhead than configuring it in the model and doesn't use any more of my allotted

Re: [web2py] Re: Graph Model (proposal to contribute)

2012-12-28 Thread Alan Etkin
El viernes, 28 de diciembre de 2012 15:34:49 UTC-3, Ramos escribió:D3js I'm looking at the awsome examples of D3.js at http://d3js.org/ The thing is that I can't find anything pre-built to show a relational database scheme as graphviz does. --

[web2py] Re: Upload field with clear text filename

2012-12-28 Thread Anthony
I see. I think the problem is that you have set the writable attribute of the filename field to False. In that case, try setting the default value of that field: if request.vars.upload: db.fileobject.filename.default = request.vars.upload.filename form = SQLFORM(db.fileobject) Anthony On

Re: [web2py] Re: Graph Model (proposal to contribute)

2012-12-28 Thread António Ramos
D3js seems Awsome. Its already included in Meteorjs http://www.dashingd3js.com/table-of-contents http://bost.ocks.org/mike/d3/workshop/ 2012/12/28 Alan Etkin spame...@gmail.com El viernes, 28 de diciembre de 2012 15:34:49 UTC-3, Ramos escribió:D3js I'm looking at the awsome examples of

[web2py] Re: Can web2py be used for highly complex relational databases?

2012-12-28 Thread Cliff Kachinske
My advice would be to start with the database back end you will ultimately use. With 10,000 tables you would have to explore a way to avoid running the model files with every request. There are posts in this forum that explain how to do it. On Friday, December 28, 2012 10:38:25 AM UTC-5,

Re: [web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-28 Thread Cliff Kachinske
I agree this is the right way to do it. On Friday, December 28, 2012 2:03:13 AM UTC-5, Massimo Di Pierro wrote: If we allow setting is_active from False to True we would be able to re-cycle the record and there would be a record of the recycling (who deleted it, who restored it, and when).

[web2py] Re: Can web2py be used for highly complex relational databases?

2012-12-28 Thread VP
What is the level of dependency of this application? I bet you can factor this project into dozens of different apps, which communicates with each others through APIs if needed. It's hard to think of an app with 10,000 tables all interdependent. --

Re: [web2py] Redmine beside web2py with Nginx deployment script

2012-12-28 Thread Richard Vézina
My configuration is pretty similar to what you have. Just try it and report here any issue. Richard On Friday, December 28, 2012, Arnon Marcus a.m.mar...@gmail.com wrote: Holy Shit ! This SO AWESOME !! Just the kind of combination I was looking for ! I am so trying this at work next

[web2py] Re: Can web2py be used for highly complex relational databases?

2012-12-28 Thread Alex Glaros
Right, all files won’t be joined at once; it’s the state’s accounting system. If it were my project, I would probably use Postgres as the database. Thanks, Alex On Friday, December 28, 2012 4:57:24 PM UTC-8, VP wrote: What is the level of dependency of this application? I bet you can

Re: [web2py] Re: session.flash not working?

2012-12-28 Thread VP
I do not think it s a js issue, because there's no js error and after removing the js (my own, not web2py's), the problem is still there. Say I have a controller f def f(): form = if form.processes(onvalidation=...).accepted: session.flash = 'Test' redirect(URL('f',

Re: [web2py] Replaced `auth_user` fields 'first_name' and 'last_name' with 'name'; now getting errors

2012-12-28 Thread Alec Taylor
Thanks, but that still isn't working for me. Interesting parts of the traceback: type 'exceptions.AttributeError'('Row' object has no attribute 'first_name') web2py\gluon\dal.py in __getitem__ at line 6453 code arguments variables Function argument list (self=Row {'interests':

[web2py] Server-side AngularJS execution?

2012-12-28 Thread Alec Taylor
Search spiders such as Google—though they now execute AJAX and parse the result—do not work as well with dynamic content as static content. So I was thinking if there was some way to execute the AngularJS as static files; for search-spiders and non-javascript enabled browsers; but when they have

Re: [web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-28 Thread Massimo Di Pierro
OK. I will look into this. Massimo On Friday, 28 December 2012 18:35:10 UTC-6, Cliff Kachinske wrote: I agree this is the right way to do it. On Friday, December 28, 2012 2:03:13 AM UTC-5, Massimo Di Pierro wrote: If we allow setting is_active from False to True we would be able to

Re: [web2py] Redmine beside web2py with Nginx deployment script

2012-12-28 Thread Massimo Di Pierro
Would you suggest we include it in web2py/scripts/? On Friday, 28 December 2012 14:17:12 UTC-6, Richard wrote: Hello, This is a new year gift for the one who would use Redmine beside web2py... :) The script is largely base on new Niphold web2py nginx deployment script (

[web2py] Re: Intro and my Web2py app

2012-12-28 Thread webpypy
Welcome ..:) On Friday, December 28, 2012 11:11:46 PM UTC+3, Ilya wrote: Hello, I'm new to Web2py having used it for a few assignments and final project in our web frameworks class. Here's my app that I'm hoping to take a little further as I get a better handle on Web2py and Python. It's

[web2py] RuntimeError: table appears corrupted

2012-12-28 Thread Richard Penman
I have had an app running for a few months and recently could not connect to (nginx) server. Then after restart got this error: RuntimeError: table appears corrupted If I add migrate=False,fake_migrate=True to DAL then app works. But when remove this error returns. Any idea what is going

[web2py] Re: Can web2py be used for highly complex relational databases?

2012-12-28 Thread Massimo Di Pierro
I have some experience with a large peoplesoft system where they claims thousands of tables. Turns out almost everything I needed was in less than 10 tables. Basically most of the tables were lookup tables used simply as key:value store for the possible values of a field. For example table

Re: [web2py] Re: session.flash not working?

2012-12-28 Thread Massimo Di Pierro
I am now are of this problem. Can you please post a complete minimalist code example (model, controller, view) so we can try reproduce it? What web2py version are you using? On Friday, 28 December 2012 20:18:17 UTC-6, VP wrote: I do not think it s a js issue, because there's no js error and

[web2py] Re: `@service.json` works locally but not on Heroku?

2012-12-28 Thread Massimo Di Pierro
Did you enable json generic view? response.generic_patterns=['api.json'] On Friday, 28 December 2012 22:34:03 UTC-6, Alec Taylor wrote: [appname/controllers/api.py] @service.json def v1(): return dict(version=0.5) curl -X GET http://localhost/api/v1.json {version: 0.5} curl

Re: [web2py] Replaced `auth_user` fields 'first_name' and 'last_name' with 'name'; now getting errors

2012-12-28 Thread Massimo Di Pierro
We can fix this but can't you just leave the first_name and last_name fields alone, as suggested in the book, but make them invisible? readable=False, writable=False. And just change the field used in the navbar as in the example? On Friday, 28 December 2012 21:12:01 UTC-6, Alec Taylor

[web2py] Re: RuntimeError: table appears corrupted

2012-12-28 Thread Massimo Di Pierro
Try migrate=True, fake_migrate=True than (after it works) migrate=False,fake_migrate=False or (if you plan to change your tables) migrate=Migrate,fake_migrate=False and you should be fine. On Friday, 28 December 2012 22:33:11 UTC-6, Richard Penman wrote: I have had an app running for a

Re: [web2py] Replaced `auth_user` fields 'first_name' and 'last_name' with 'name'; now getting errors

2012-12-28 Thread Alec Taylor
On Sat, Dec 29, 2012 at 3:45 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: We can fix this but can't you just leave the first_name and last_name fields alone, as suggested in the book, but make them invisible? readable=False, writable=False. And just change the field used in the

[web2py] Conditional {{extend layout.html}}?

2012-12-28 Thread Simon Ashley
Wondering if it is possible to have a conditional {{extend layout.html}} similar to the following? {{if session.call:}} {{extend 'layout_XXX.html'}} {{pass}} {{if not session.call:}} {{extend 'layout.html'}} {{include 'YYY.html'}} {{pass}} Required for users with requiring

Re: [web2py] Re: RuntimeError: table appears corrupted

2012-12-28 Thread Richard Baron Penman
migrate=True, fake_migrate=True strangely that produces the same table corrupted error --

Re: [web2py] Re: RuntimeError: table appears corrupted

2012-12-28 Thread Richard Baron Penman
These work: DAL(uri, migrate=False, fake_migrate=False) DAL(uri, migrate=False, fake_migrate=True) These produce Runtime error: DAL(uri, migrate=True, fake_migrate=False) DAL(uri, migrate=True, fake_migrate=True) --

Re: [web2py] Conditional {{extend layout.html}}?

2012-12-28 Thread Bruno Rocha
You can, but will not work if you compile your app. This can be done with. in models/anything.py response.layout_path = layout_XXX.html if session.call else 'layout.html' # this can also be changed in controller if needed def action(): if something: response.layout_path =

Re: [web2py] setup-web2py-ubuntu.sh and Python 2.7

2012-12-28 Thread Martin Weissenboeck
Thank you, but it did not solve the problem. Python 2.7.3 is the standard version: ~# python Python 2.7.3 (default, Dec 28 2012, 09:37:13) [GCC 4.4.5] on linux2 Type help, copyright, credits or license for more information. ~# python2.7 Python 2.7.3 (default, Dec 28 2012, 09:37:13) [GCC 4.4.5]

Re: [web2py] Re: RuntimeError: table appears corrupted

2012-12-28 Thread Massimo Di Pierro
Can you try delete (backup first) all yourapp/database/*.table then try again. On Friday, 28 December 2012 23:48:51 UTC-6, Richard Penman wrote: These work: DAL(uri, migrate=False, fake_migrate=False) DAL(uri, migrate=False, fake_migrate=True) These produce Runtime error: DAL(uri,

Re: [web2py] Conditional {{extend layout.html}}?

2012-12-28 Thread Massimo Di Pierro
Can be done but won't work if you try distribute your app bytecode compiled. On Friday, 28 December 2012 23:50:11 UTC-6, rochacbruno wrote: You can, but will not work if you compile your app. This can be done with. in models/anything.py response.layout_path = layout_XXX.html if

Re: [web2py] Re: Auth.wiki() classes in tags

2012-12-28 Thread Andrew W
you just attach it to the textarea...: I don't quite follow. Can you expand please, do I add the script code to layout.html, do I need to actually download the plugin as the src points to the website ? This could be worth adding to the book as anyone using render='html' would want to add an

Re: [web2py] Re: Auth.wiki() classes in tags

2012-12-28 Thread Andrew W
P.S. I'm talking about using it with auth.wiki On Saturday, December 29, 2012 8:35:34 PM UTC+13, Andrew W wrote: you just attach it to the textarea...: I don't quite follow. Can you expand please, do I add the script code to layout.html, do I need to actually download the plugin as the

Re: [web2py] Re: RuntimeError: table appears corrupted

2012-12-28 Thread Richard Baron Penman
Thanks - that did it. Any idea what happened and how to prevent this? If helpful I can send the previous and current .table files. On Sat, Dec 29, 2012 at 6:32 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Can you try delete (backup first) all yourapp/database/*.table then try