No, it is just a singleton module, just like Auth or Cache.
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
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
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
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
>
>
There may even be an experimental workflow engine in there if I can finish
it in time.
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
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.
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.
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
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',
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
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:
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. :-)
>
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
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
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
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:
>
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
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
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
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
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
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
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')
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.
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
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
The DB layer is usually the bottleneck. However, moving from models to
modules should reduce any bottleneck caused by the web server.
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
; 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
Looks pretty nice, Massimo. I look forward to trying it out and
contributing to it.
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
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
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
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
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
Thanks for the link! I've been looking for good API design resources.
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
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
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
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,
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
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,
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
>
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
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
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).
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
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
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
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
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.
You can also use web2py's more robust UUID-generation method:
from gluon.utils import web2py_uuid
myuuid = web2py_uuid()
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.
Sanjeet.
I sent some code to Mariano last night. So we will have to wait and see if
it works for him.
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'
Good practice says you should ALWAYS have an identity (ID) field, even if
you don't use it.
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
I think he means reporting functions like Crystal Reports or SQL Server
Reports.
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.
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.
I've always read that CSS should go in the and JS should go right
before the closing tag.
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)}}.
I don't know if this is the correct way, but I have done this before:
{{=db.contracts.date_start.represent(row.date_start)}}
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
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
Massimo,
How do you generate the PDF book now?
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
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.
Anyone have any thoughts on this?
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
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.
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
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.
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?
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().
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?
Thanks for pointing that out Michele. I may need to use something like this
in the future.
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, ...)
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.
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
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
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
Glad you figured it out!
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
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
I usually do this:
default = auth.user.username.upper() if auth.user else None
Sorry, I meant views/default/index.html, not controllers/default/index.html.
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.
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
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
GPL licensing would be an issue for me.
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
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!
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
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.
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
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
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 - 100 of 573 matches
Mail list logo