Re: [web2py] Re: RFC: web2py-based workflow engine

2012-05-25 Thread Ross Peoples
No, it is just a singleton module, just like Auth or Cache.

Re: [web2py] Re: RFC: web2py-based workflow engine

2012-05-25 Thread Ross Peoples
Andrew, If I'm understanding you properly, the only major difference between the business process workflow (the one I am writing) and the data integration workflow you mention is that one requires human interaction, while the other is handled by automated systems. Is that fairly accurate? If so

[web2py] Re: RFC: web2py-based workflow engine

2012-05-24 Thread Ross Peoples
Just wanted to give an update on this. I'm working on the workflow engine nearly every day. Workflow engines are complicated things with lots of pitfalls that need to be taken into account. Having said that, I am getting closer to completing it. What works: - Templates - Creating workflo

Re: [web2py] Re: Unable to connect to mssql database

2012-05-22 Thread Ross Peoples
I have been using MSSQL from Linux for quite some time. I use FreeTDS for my driver. This is my connection string: db = DAL('mssql://user:password@server/db_name?DRIVER={FreeTDS}') If you need help setting up FreeTDS / unixODBC, let me know. I have some notes on how to set this up using a Ubunt

Re: [web2py] Re: What to expect in web2py 2.0

2012-05-22 Thread Ross Peoples
Richard, Thanks for the offer. I *think* I'm nearly done. I'm writing some tests for it now and so far so good. If I run into any problems, I'll let you know. Ross On Tuesday, May 22, 2012 11:09:31 AM UTC-4, Richard wrote: > > Ross, > > If you need help just ask! > > Richard > >

[web2py] Re: What to expect in web2py 2.0

2012-05-22 Thread Ross Peoples
There may even be an experimental workflow engine in there if I can finish it in time.

[web2py] Re: RFC: web2py-based workflow engine

2012-05-18 Thread Ross Peoples
Yes, thanks for the links. I was able to add parallel steps that work as you describe. I have almost finished my workflow engine. I only have a couple more methods to write before I begin writing unit tests. Thanks for all the input. I am still taking comments and suggestions, so if anyone has

[web2py] Re: RFC: web2py-based workflow engine

2012-05-17 Thread Ross Peoples
On Thursday, May 17, 2012 3:54:44 PM UTC-4, Cliff wrote: > > Let's inject manufacturing into the order processing scenario you were > using before. It's a three step process. Step one fabricates widgets. > Step 2 attaches the widgets to widget bicarackets, purchased from another > vendor.

[web2py] Re: RFC: web2py-based workflow engine

2012-05-17 Thread Ross Peoples
On Thursday, May 17, 2012 9:37:46 AM UTC-4, Cliff wrote: > > Ross, > > I understand your reasons for attaching approvals to the workflow. I do > it the other way because if a deliverable needs approval by six parties, > putting six additional steps in the flow makes things a little cluttered.

[web2py] Re: web2py back reference and compute fields problem

2012-05-17 Thread Ross Peoples
I don't know about the "order.order_item.select()" part. Have you tried debugging the "calc" method? Insert this line right above "result = 0": import pdb; pdb.set_trace() Run the app from the console (i.e: python web2py.py -a password ...) and when the method gets called, the application should

[web2py] Re: RFC: web2py-based workflow engine

2012-05-16 Thread Ross Peoples
The data model I already have does things a bit differently, but I think it accomplishes the same thing. I am in the process of writing all of the support methods. This is my current data model: # workflow table db.define_table('workflow', Field('name', length=50), Field('is_template',

[web2py] Re: SNI or dedicated IP.

2012-05-16 Thread Ross Peoples
I wouldn't know the first thing about setting up SNI, so I would tell WebFaction that if they will do it for me and it works, then sure, I'll use SNI, otherwise stick with what you know. On Wednesday, May 16, 2012 12:14:42 PM UTC-4, Anthony wrote: > > I'd never heard of SNI before, but looking a

[web2py] Re: RFC: web2py-based workflow engine

2012-05-16 Thread Ross Peoples
Cliff, Thanks for putting this into a spec. My current code follows most of what is in there. I still haven't finished writing (or testing it), but I do have some thoughts on implementation for one or two of the items listed at the end: I imagine a "workflow_monitor" table that has the fields:

[web2py] Re: https for login

2012-05-16 Thread Ross Peoples
I only know about it because I submitted it :) We really need to open the book up for editing so that we can add these kinds of things. On Wednesday, May 16, 2012 9:22:28 AM UTC-4, Anthony wrote: > >request.requires_https() >> > > Yet another secret feature. :-) >

[web2py] Re: https for login

2012-05-16 Thread Ross Peoples
By the way, in case you are wondering, I stopped using Apache once I tried Nginx. Configuration is much easier (in my humble opinion) and it's way faster. So I've been using Nginx for all of my stuff for over 6 months now and haven't looked back. However, I still try to write my applications to

[web2py] Re: https for login

2012-05-16 Thread Ross Peoples
You could force a redirect within web2py. I do this with most of my applications: In a model: if request.controller == 'default' and request.function == 'user': request.requires_https() This will force all user operations (login, profile, reset_password, etc) to use HTTPS. The advantage to

[web2py] Re: SNI or dedicated IP.

2012-05-16 Thread Ross Peoples
I'd never heard of SNI before, but looking at the Wikipedia page for it: http://en.wikipedia.org/wiki/Server_Name_Indication This will NOT work. The main reason being that Python 2 (which web2py runs on) does not support SNI. Python 3.2 does, however. So until there is a web3py, SNI will not be

[web2py] Re: Is there anyone who running web2py application on Redhat openshift?

2012-05-15 Thread Ross Peoples
I don't know anything about openshift, but I would think the normal MySQL troubleshooting steps apply: 1. Make sure MySQL is listening on all interfaces 2. Make sure your MySQL account accepts connections from the '%' host. On Tuesday, May 15, 2012 3:55:07 AM UTC-4, JungHyun Kim wrote: >

[web2py] Re: Can/should {{super}} works even without a parent block?

2012-05-14 Thread Ross Peoples
tunately it fails too. > > So a fix is a must? > > Regards, > Ray > > On Monday, May 14, 2012 11:50:45 PM UTC+8, Ross Peoples wrote: >> >> Correction, that should be: >> {{try:}}{{super}}{{catch:pass}} >> >> >> >> On Monday, May 14, 2012

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Ross Peoples
The problem with doing it as a C module is that it would have to be compiled. I know that this is something that has been mentioned before but was shot down because web2py wouldn't be easily accessible, modified, etc, which is the goal of web2py. Alternatively, maybe running web2oy in PyPy envi

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Ross Peoples
On Monday, May 14, 2012 11:50:06 AM UTC-4, Anthony wrote: > > >>1. Your "adviewer/viewads" makes 10 calls to the database. Try to >>optimize this either by writing fewer queries, creating a view, and/or >> only >>selecting fields that you need. Also make sure you get the criteria r

[web2py] Re: Can/should {{super}} works even without a parent block?

2012-05-14 Thread Ross Peoples
Correction, that should be: {{try:}}{{super}}{{catch:pass}} On Monday, May 14, 2012 11:45:37 AM UTC-4, Ross Peoples wrote: > > While not the prettiest solution, you can always use > {{try:}}{{super}}{{catch}} in views. I know that sounds like a bandaid, but > I think an exce

[web2py] Re: Can/should {{super}} works even without a parent block?

2012-05-14 Thread Ross Peoples
While not the prettiest solution, you can always use {{try:}}{{super}}{{catch}} in views. I know that sounds like a bandaid, but I think an exception is the desired behavior here. Otherwise, returning an empty string would make troubleshooting difficult if you accidentally mistyped the name of

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Ross Peoples
I'm reading through the profile log, not that I'm an expert on profiling or anything, but I do have a few possible tips: 1. Most of your calls are done in ~86 ms. That's pretty respectable. 2. Most of your time is spent on database calls, with compiling being the second biggest time co

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread Ross Peoples
In my experience, "can" doesn't always mean "should". There may be an issue with db2 not seeing the table definitions from db1. For testing, do something like this to explicitly share the "test" table definition: def define_tables(db, migrate=False): db.define_table('test', Field('testfield')

Re: [web2py] To uuid or not?

2012-05-14 Thread Ross Peoples
I have created issue 796: http://code.google.com/p/web2py/issues/detail?id=796 While creating the issue, I noticed that I had made an error with the MSSQL part. This was corrected in the issue.

Re: [web2py] To uuid or not?

2012-05-14 Thread Ross Peoples
Some databases allow you to temporarily turn off auto-generating IDs so that you can import a table keeping its original IDs intact. I wrote a database abstraction layer a few years back for another project that specifically allowed you to make an identical copy of a database from a MySQL datab

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread Ross Peoples
I don't think you are supposed to open more than one connection to a SQLite database at a time. It is file-based and doesn't have multi-connection abilities like other databases like MySQL and PostgreSQL. On Monday, May 14, 2012 7:29:44 AM UTC-4, simon wrote: > > *In the following code I create

[web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread Ross Peoples
The DB layer is usually the bottleneck. However, moving from models to modules should reduce any bottleneck caused by the web server.

[web2py] Re: CMS question

2012-05-03 Thread Ross Peoples
Looking at the "better" version of that you just added to trunk, this is pretty cool! I also looked at bluePen editor. That is very cool and looks like something I did once using jQuery UI components. I can't seem to find the code I wrote for it. It was a proof-of-concept that didn't really go

[web2py] Re: RFC: web2py-based workflow engine

2012-05-02 Thread Ross Peoples
; state, and who should be able to see or edit those attributes while in that > state. > > > On Tuesday, May 1, 2012 12:00:42 PM UTC-4, Ross Peoples wrote: >> >> In reference to: >> https://groups.google.com/forum/#!searchin/web2py/workflow/web2py/osEmmtu9hlg/2MHi_ZCeMBMJ

[web2py] Re: CMS question

2012-05-02 Thread Ross Peoples
Looks pretty nice, Massimo. I look forward to trying it out and contributing to it.

[web2py] RFC: web2py-based workflow engine

2012-05-01 Thread Ross Peoples
In reference to: https://groups.google.com/forum/#!searchin/web2py/workflow/web2py/osEmmtu9hlg/2MHi_ZCeMBMJ Has anyone done any work on this yet? I was thinking about making a web2py-based workflow engine. I mentioned previously that I built one of these for an application I wrote several yea

Re: [web2py] Re: Ubuntu and Python3

2012-04-27 Thread Ross Peoples
I would imagine that you would still have the same problem unless shared hosts figure out a way to make uWSGI easier to use. I have given up on shared hosting. The price of a low-end VPS is just as low (and sometimes lower) as most shared hosting plans with MUCH better performance. I have playe

[web2py] Re: crud.create causes an id problem

2012-04-27 Thread Ross Peoples
I have created Issue 777: http://code.google.com/p/web2py/issues/detail?id=777 On Friday, April 27, 2012 9:15:07 AM UTC-4, Massimo Di Pierro wrote: > > Please open a ticket about this. > > On Thursday, 26 April 2012 13:21:34 UTC-5, villas wrote: >> >> Just a thought... if you are trying to creat

[web2py] Add RESTful Client to Contrib

2012-04-26 Thread Ross Peoples
Should we add a RESTful client to web2py's contrib folder? We already have clients for XML-RPC and JSON-RPC, so maybe we should include one for REST that can handle both simple a more complex cases (like file uploads, unicode, etc). I found one that I was just about to add to a project and thou

[web2py] Re: crud.create causes an id problem

2012-04-26 Thread Ross Peoples
I'm having a similar issue using SQLFORM. I am using a table that stores extra data for users, and I call it auth_user_extended: db.define_table('auth_user_extended', Field('auth_user', db.auth_user, readable=False, writable=False), Field('supervisor', 'boolean', label='Is Supervisor?', d

[web2py] Re: Free e-book abhout Rest API

2012-04-25 Thread Ross Peoples
Thanks for the link! I've been looking for good API design resources.

[web2py] Re: Cannot start web2py - Runtime error: Unable to import driver

2012-04-24 Thread Ross Peoples
Can you paste the traceback of the ticket? On Monday, April 23, 2012 11:10:55 PM UTC-4, Goronmon wrote: > > I'm trying to use web2py on a Ubuntu install. I can start it up from the > console, but as soon as I navigate to it in the browser I the internal > error about not being able to import th

[web2py] Re: CMS question

2012-04-23 Thread Ross Peoples
I remember seeing this once before. This is great if you find a theme you like online and want to make a prototype of your site in that theme and this is a very cool tool in general. The question is, do we really want to go in this direction for a CMS? The content is basically imprisoned in har

[web2py] Re: CMS question

2012-04-23 Thread Ross Peoples
I guess it comes down to figuring out what kind of CMS we want to build. Do you want a CMS that is easy for web designers (like WordPress), or do you want a CMS that is easy for end users? My feeling is that there are already SO MANY WordPress clones out there that if we are going to build a "k

[web2py] Re: CMS question

2012-04-23 Thread Ross Peoples
I don't know about that. I've started installing Concrete5 for people because it's so easy to use and they can create "blocks" of content that they can move around. I think a good CMS should be as dynamic as possible, without being overly complicated. On Monday, April 23, 2012 1:30:12 AM UTC-4,

[web2py] Re: Getting https to work with rocket

2012-04-16 Thread Ross Peoples
You can't connect to https using http as the protocol. Getting a "bad request" message is exactly what happens when you try. So in your browser, you need to specifically type https://:3. On Monday, April 16, 2012 1:42:06 PM UTC-4, Shivakumar GN wrote: > > Hi, > > I am using python 2.5 on Sol

[web2py] Re: priority of web2py CMS

2012-04-16 Thread Ross Peoples
No, I've been tied up doing other (non-web2py) projects lately. I hope to get back to being more active here in a couple of weeks. On Sunday, April 15, 2012 2:54:45 AM UTC-4, Gour wrote: > > On Mon, 16 Jan 2012 12:41:32 -0800 (PST) > Ross Peoples > wrote: > > Hello Ross,

[web2py] Re: new web2py cheatsheet

2012-04-11 Thread Ross Peoples
This new cheat sheet is great! I saw the one page version, but I agree there is too much information to fit on to one page. I'm glad a second page was added. On Monday, April 9, 2012 4:44:22 PM UTC-4, Massimo Di Pierro wrote: > > http://dl.dropbox.com/u/18065445/Tmp/web2py_cheatsheet.pdf >

[web2py] Re: How to best contribute?

2012-03-26 Thread Ross Peoples
Most of my contributions come from code written while working on a project. While working on a project, I will find a bug or notice something that could be much better, then I correct it and send Massimo a patch. The mobile detection feature currently in web2py started as some code that I wrote

[web2py] Re: trouble reading this list

2012-03-19 Thread Ross Peoples
I would suggest clearing browser cache and restarting it. On Monday, March 19, 2012 1:20:01 PM UTC-4, Massimo Di Pierro wrote: > > Is it just me? > > I am having trouble accessing some recent posts on this list. I see the > title, author, and content says "loading...". > I apologize if I cannot a

Re: [web2py] Re: TEXT data type deprecated in future MSSQL?

2012-03-19 Thread Ross Peoples
I don't think we need to worry about this for a while. It doesn't say "deprecated", but that it will be removed in a future version (semantics, I know). But, they have not given any indication of what version, which means they probably won't remove it until the version AFTER 2012 (2014, maybe).

Re: [web2py] web2py instance accessible only from localhost

2012-03-07 Thread Ross Peoples
The -i argument should be 0.0.0.0 instead of 127.0.0.1 if you want other machines on the network to access the web2py instance. On Wednesday, March 7, 2012 3:07:20 PM UTC-5, Richard wrote: > > Hello, > > I am pretty mistify by that issue. My ssh port forwarding is running just > fine, I can star

Re: [web2py] Get the IP of the System

2012-02-28 Thread Ross Peoples
Alternatively, you can run ipconfig/ifconfig depending on the operating system and parse the results. I have been using this method for a year now and it works great. I would much rather have an API solution, but this method seemed to be the easiest with the fewest dependencies on external libr

[web2py] Re: Time Substraction

2012-02-27 Thread Ross Peoples
Well, one of the issues is going to be that you are using 'date' for your fields instead of 'datetime'. When using 'datetime', it becomes easy to do something like this: delta = row.employee_logout_date - row.employee_login_date minutes = delta.minutes + (delta.hours * 60) On Monday, February 2

[web2py] Re: Web2py and SSLH

2012-02-27 Thread Ross Peoples
I would be interested to see if SSH can actually be forwarded without triggering a main-in-the-middle error. I'm not sure on the first question, but I would guess that you would want to disable everything except your app. At the bottom of the db.py model, just put "session.forget(request)". Thi

[web2py] Re: request.user_agent() dumping

2012-02-27 Thread Ross Peoples
Glad you like the feature! I don't think dimensions are available in the user-agent string that the browser passes to the server. So your only option is to use jQuery or CSS media queries. On Sunday, February 26, 2012 11:13:42 PM UTC-5, weheh wrote: > > And, I might add, this is simply awesome.

[web2py] Re: using a guid in web2py

2012-02-22 Thread Ross Peoples
You can also use web2py's more robust UUID-generation method: from gluon.utils import web2py_uuid myuuid = web2py_uuid()

[web2py] Re: Why admin|examples|welcome in hgignore?

2012-02-17 Thread Ross Peoples
I'm not great with regular expressions, but I think it's saying ignore everything in the applications folder EXCEPT admin, examples, welcome, and __init__. I think that's what the '?!' means.

Re: [web2py] Re: How to Generate the effective report by using web2py

2012-02-17 Thread Ross Peoples
Sanjeet. I sent some code to Mariano last night. So we will have to wait and see if it works for him.

[web2py] Re: Forms not working with web2py in Chrome

2012-02-17 Thread Ross Peoples
I don't know if it helps, but I spotted a typo: Replace the dollar sign in: 'image, format = '$(title)s' with format ='%(title)s'

[web2py] Re: Associative Table

2012-02-16 Thread Ross Peoples
Good practice says you should ALWAYS have an identity (ID) field, even if you don't use it.

Re: [web2py] Re: How to Generate the effective report by using web2py

2012-02-16 Thread Ross Peoples
I had to write a lot of code to get FPDF to do proper headers, footers, and page numbers. Then about another 100 lines of code to get it to wrap long lines of text inside of a table. I'm also not using HTML to PDF conversion. I am using FPDF's methods to create PDFs. If I recall correctly, I tri

Re: [web2py] OFF Topic - Business inteligence in Python, web2py?

2012-02-15 Thread Ross Peoples
I think he means reporting functions like Crystal Reports or SQL Server Reports.

[web2py] Re: can we use JSONRPC to upload?

2012-02-15 Thread Ross Peoples
The best way might be to use JSONRPC to get an authorization code, which is then POSTed along with the binary contents in a separate HTTP request.

[web2py] Re: can we use JSONRPC to upload?

2012-02-15 Thread Ross Peoples
I've never tried before, but traditionally, you would encode the binary file into a base64 string, then decode it on the other end. I don't know if JSONRPC does this for you, or has a better way.

[web2py] Re: css before js advice

2012-02-14 Thread Ross Peoples
I've always read that CSS should go in the and JS should go right before the closing tag.

[web2py] Re: digitally sign static files?

2012-02-14 Thread Ross Peoples
I don't think you can do anything with the static folder. You would have to put all the files in "uploaded" or another custom folder, then do something like {{=URL('default', 'download', user_signature=True)}}.

[web2py] Re: * DATE FIELDS REPRESENT *

2012-02-14 Thread Ross Peoples
I don't know if this is the correct way, but I have done this before: {{=db.contracts.date_start.represent(row.date_start)}}

[web2py] Re: Memcache ??

2012-02-14 Thread Ross Peoples
http://web2py.com/books/default/chapter/29/4?search=cache#cache When it takes a while to figure something out, like a complex query, you typically want to hold on to the result for a little while so that the next few requests don't have to do through the same process every time. It is used to i

[web2py] New Plugin: plugin_markitup

2012-02-12 Thread Ross Peoples
I have created another plugin for the MarkItUp widget. I know that plugin_wiki has this currently, but I wanted a dedicated plugin for this for an upcoming project I'm working on. You can get the plugin from Bitbucket: https://bitbucket.org/PhreeStyle/web2py_markitup There is no documentation

[web2py] Re: Markmin Output Questions

2012-02-12 Thread Ross Peoples
Massimo, How do you generate the PDF book now?

Re: [web2py] Dedicated IDE

2012-02-12 Thread Ross Peoples
I have been following ide/rad2py for a little while now. I am really looking forward to trying this out and I appreciate all the work you have put into it Mariano! Depending on the type of project, I will use either TextMate or Komodo Edit. For larger projects, I use Komodo for the code complet

[web2py] Re: Image from Video

2012-02-11 Thread Ross Peoples
You would have to compile it yourself in that case. I don't know how to do that on Windows, so maybe someone else would have some tips for that.

[web2py] Re: Markmin Output Questions

2012-02-11 Thread Ross Peoples
Anyone have any thoughts on this?

[web2py] Re: Image from Video

2012-02-11 Thread Ross Peoples
ffmpeg is video encoder / decoder. You might be able to use the Python bindings for it to grab a single frame of video from the video file, and save that as a PNG or JPG. This is the project page for the ffmpeg bindings: http://code.google.com/p/pyffmpeg/ I've never done this before myself, bu

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-10 Thread Ross Peoples
CKEditor is licensed under LGPL, so you're good there. As for plugin_ckeditor. I wrote it, but I haven't given it a license yet (on my todo list). However, I will probably go with LGPL as well. It only makes sense as web2py and CKEditor are both LGPL. So you are all set with the CKEditor stuff.

[web2py] Markmin Output Questions

2012-02-10 Thread Ross Peoples
I am looking into writing lots of documentation and have been looking around at the different solutions. I know that the web2py book was written with Markin, and seeing as how it is able to output to multiple different formats and supports things like tables and image alignment, I figure it's p

[web2py] Re: security check in web2py

2012-02-10 Thread Ross Peoples
Another option, which I use is to generate SSL certs and run web2py with -k and -c so that web2py runs on SSL, enabling admin from other computers.

[web2py] Re: Folder inside controller dosen't work.

2012-02-09 Thread Ross Peoples
Not sure on the subfolder thing, but is it possible for you to put most of your code into modules and just use controllers as the gateway to your modules?

[web2py] Re: xml-rpc code causes compile error in mywiki default.py

2012-02-09 Thread Ross Peoples
You have a syntax error in fony_by(keyword): return db(db.page.title.contains(keyword).select().as_list() Should be: return db(db.page.title.contains(keyword)).select().as_list() You forgot the closing parenthesis before .select().

[web2py] Re: option to move smartgrid buttons to the left side

2012-02-09 Thread Ross Peoples
I was wondering about the previously. I haven't tried this yet, but as a temporary workaround, are you able to insert buttons using JavaScript?

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-09 Thread Ross Peoples
Thanks for pointing that out Michele. I may need to use something like this in the future.

[web2py] Re: Modules: how to access db

2012-02-09 Thread Ross Peoples
from gluon import * This should give you the "current" object which has these: current.request current.response current.cache You must initialize your modules with a db instance though. So I usually do this: class MyModule(object): def __init__(self, db, ...)

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-08 Thread Ross Peoples
That is a VERY good question. If you already have a setup like this, give it a shot and see if it worksI would be interested to know the result.

[web2py] Re: is_https

2012-02-07 Thread Ross Peoples
Using nginx, you have to have a line somewhere for "fastcgi_pass". If this line isn't: fastcgi_pass http://127.0.0.1:9000 Then you will have problems. When you connect to web2py through nginx, web2py only sees nginx. So if nginx is passing fastcgi to another computer on the network, then web2p

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-07 Thread Ross Peoples
Sorry Mariano, I misspelled your name in my last post :) To give you a better example of what you might want to do here is a more advanced module that makes a static class and better resembles the singleton pattern: class Counter(object): instance = None @classmethod def get(cl

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-07 Thread Ross Peoples
Marino is referring to the method I mentioned earlier of using modules and the singleton pattern. You could use this in combination with Michele's mmap suggestion to hold the data to do what you want. I've never used mmap before, but I can get you on the right track with modules. This is a very

Re: [web2py] default layout.html error (or just me)

2012-02-07 Thread Ross Peoples
Glad you figured it out!

Re: [web2py] Workflow engine for web2py

2012-02-07 Thread Ross Peoples
I don't know workflow engines in the general sense that well. I once created a full documentation management system where each document couple have a workflow assigned to it. The workflow (predefined, or created on-the-fly) would push the document around from person to person, ensuring that eac

[web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-07 Thread Ross Peoples
I'm not sure how much my opinion matters here, but a lot of times, I am not allowed to touch GPL code, especially AGPL code for a business project. The legal department avoids (A)GPL like the plague. There are just too many gotchas with it, whether real or imaginary. They much prefer I use MIT o

[web2py] Re: Set username as default

2012-02-07 Thread Ross Peoples
I usually do this: default = auth.user.username.upper() if auth.user else None

[web2py] Re: default layout.html error (or just me)

2012-02-07 Thread Ross Peoples
Sorry, I meant views/default/index.html, not controllers/default/index.html.

[web2py] Re: default layout.html error (or just me)

2012-02-07 Thread Ross Peoples
Can you paste the code in your controllers/default/index.html? Also, you should be able to scroll down near the bottom of the ticket to see the line of code in the view that triggers the issue.

[web2py] Re: VPScolo.com Five dolar VPS, anybody knows it?

2012-02-07 Thread Ross Peoples
I haven't heard of them before, but I have learned a quick lesson about VPS providers: most of them are one-man operations that only last for a few months. I have done a LOT of research on VPS providers over the last couple of weeks and the one site I always end up turning to for advice on prov

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-06 Thread Ross Peoples
I can't imagine that every request would need to access all 16G every time. I use a method for caching data between requests using modules. I don't know if it would be truly shared between requests, or like Niphlod said, would be duplicated for each request. I have had a lot of success using mo

[web2py] Re: lungo.js

2012-02-06 Thread Ross Peoples
GPL licensing would be an issue for me.

[web2py] Re: Debugging in web2py

2012-02-02 Thread Ross Peoples
Forgot to mention that when the debugger pauses on a line of code, besides using the key commands mentioned before, you can run single-line Python commands as if you were in an interactive session. This allows you to inspect variables and such. For example, once the debugger pauses and displays

[web2py] Re: Debugging in web2py

2012-02-02 Thread Ross Peoples
Run web2py from console, and put "import pdb; pdb.set_trace()" right above the line of code where you want to start debugging. From there, use "n" to go to the next line, "s" to "step into" the next line, and "c" to continue execution. Good luck!

[web2py] Re: Opinions, please: best way to set up multiple apps on one site?

2012-02-02 Thread Ross Peoples
If they are only sharing the auth table, then it's not a big deal, since the auth tables are there by default. But plugins are meant to be completely isolated from each other, completely unaware that other plugins exist. Putting core logic (accessing data) into modules and using more generic p

[web2py] Re: Opinions, please: best way to set up multiple apps on one site?

2012-02-02 Thread Ross Peoples
I have used the plugin approach before with success on a medium-sized app. You just have to design them properly or the plugins will rely on each other, which kind of defeats the purpose.

Re: [web2py] Re: help with js issue

2012-01-30 Thread Ross Peoples
In reference to the cron error, I posted this a couple days ago: https://groups.google.com/forum/#!searchin/web2py/ross$20peoples$20cron%7Csort:date/web2py/q4qoTTuu6zw/jo-H1LPjWB4J Also, I should mention that for the stopping problem: It's not just Mac. The previous message with instructions on

Re: [web2py] Re: help with js issue

2012-01-30 Thread Ross Peoples
I was able to reproduce this a few times by doing this: Start web2py: python web2py.py -a password -i 0.0.0.0 -N Navigate to the admin app from another computer (important): http://192.168.1.10:8000/admin You will get the "admin is disabled" message. Now try to Control + C web2py. For me, it to

[web2py] Re: [w2py-dev] model less apps (a blog example)

2012-01-30 Thread Ross Peoples
Bruno, This is a good article. I have done something like this before. My approach was a bit different. I was using the singleton pattern, but I think it accomplishes the same goal. I would for example have a module like this: from gluon import * class MyModel(object): instance = None

  1   2   3   4   5   6   >