Does anyone have some hints for showing mobile browsers a different
set of views than desktop browsers? IE: Detection, redirection,
etc... Since the view is determined by the extension of the page how
do people handle it?
I started writing this a few times but I kept deleting it as I wasn't
very clear so I'll try again.
I'm looking to create a form that has some tabular data in it, 2
columns, but the trick is that each submission of the form will have
between 2-10 rows. Each submission represents a single working
I think part of the problem is a lack of dog food. I started looking
last night at the state of web2py testing, and was amazed that the
gluon/tests directory is not included in any of the 'source'
distributions. In fact it's not in the Google code build either.
After downloading the bazaar trunk
When is close_all_instances() in the ConnectionPool class of DAL run?
main.py always calls close_all_instances through BaseAdapter which
seems to always be SQLDB() from sql.py. BaseAdapter is a class in
dal.py that inherits from ConnectionPool, but main.py importas
BaseAdapter from sql.py instead
The normal way seem to be to add that code to a model file, but it
will be visible/executed for all controllers in the application.
On Mon, Jun 21, 2010 at 5:34 AM, pk wrote:
> hi together,
>
> i need help. i need an init to initialize some code like this
> (importing apis etc.):
>
> import time
I wrote a small tutorial on how to use OAuth with web2py by linking a
session with a Twitter account. A future update will include
embedding the access token with auth and creating an oauth
login_method class. It can be found at
http://dougwarren.org/2010/06/oauth-and-web2py-part-1/
While poking around dal.py last night came across the following:
@@ -3469,7 +3470,7 @@ class Rows(object):
returns a set of rows of sorted elements (not filtered in place)
"""
if not self.records:
-return return Rows(self.db, [], self.colnames)
+r
I have an occasion where I know that the contents of a session are
invalid, and I'd like to clear the session off the disk/db and clear
the session object of an data stored in it. Apparently
session.forget() just marks the session as being able to be cleared,
and it takes an undocumented(?) argume
:
You are right. As far as I understand firebird does not require begin
to start a transaction yet web2py should not fire an exception if you
try to begin. I am fixing it in trunk. Please take a look and let us
know. I have never tested this with firebird.
Massimo
On Jun 17, 8:41 pm, Doug Warren w
While not linkedin, I'm writing a blog post now on Twitter oauth and
integrating it with web2py. It should be posted on Tuesday.
On Jun 18, 2010 7:56 AM, "Carl" wrote:
hi
Has anyone got a basic example project of using LinkedIn OAuth with
the Web2py platform? Something based on Welcome for exam
I was poking around sql.py tonight and noticed something odd:
distributed_transaction_begin has code for mysql and postgres
distributed_transaction_commit has code for mysql, postgres, and firebird.
The exception in begin says it only works on postgres though it has
code for both postgres and mysq
What I normally do is run the service on its unprivledged port and then use
iptables to forward port 80 traffic.
On Jun 17, 2010 5:16 AM, "selecta" wrote:
Hello
I want to run web2py from a user that is not root on a debian vserver.
The problem is that only the root user is allowed to start
appli
The problem I found with the web2py exporting though is that it dumps
it based on how you drew it on the page, top left first working to the
right then the next row etc... So if you happened to placed a foreign
key on a lower section of the paper than where you're using it, you'll
get an import er
Should this be a lambda instead so you could specify your own function
completely? I used to own an ISP and one of the challenges was
running the network news server. You'd have > 1M files on a 20 gig
drive and have to give them to multiple peers over their lifetime.
One thing that we did for per
I have a rather interesting situation that came up yesterday.
An OAuth callback is statically set to domain2.com/appname however all
other web2py apps are hosted out of http://web2py.domain1.com/appname
So I have an Apache config like:
DocumentRoot "/home/domain1"
ServerName web
As mentioned in irc, you're trying to execute the image as a command,
from the python os.system documentation:
os.system(command)
Execute the command (a string) in a subshell. This is implemented
by calling the Standard C function system(), and has the same
limitations. Changes to sys.stdin, e
On Thu, Jun 10, 2010 at 10:53 AM, Yarko Tymciurak
wrote:
>
> More discussion, thoughts?
>
> (maybe this should move to the web2py developer's thread?)
As my request is still 'pending' I'd ask to keep the discussion here
so I can contribute.
That's kind of what i was getting at with my suggestion listed above
in some pseudocode.
Let the model try to grab it's required modules if it can't find one
it'll just raise an exception and it'll be tried again later.
Eventually all dependencies that are solvable will work themselves
out...
(On
EL
>>
>> instead of :
>>
>> http://127.0.0.1:8000/dev/default/user/login?_next=/dev/default/TABLE
>>
>> Could it be import urllib that failed?
>>
>> Jonhy
>>
>> 2010/6/10 Jean Guy
>>>
>>> The redirect those not work out of
One thing I thought about was to have the models loading wrap around
an exception holder in run_models_in something like
delay_process = []
for model in models:
...
try:
restricted()
except RequirementMissing:
delay_process.append(model)
while 1:
new_delay_process
I've had an issue lately where pretty much every function in a
controller needed an auth decorator. Given how many functions were in
the controller this turned out to be an error prone forgetful process.
So I came up with a simple and probably obvious way to make a
controller wide auth check comp
Sorry to bump an old email, but was this changed at some point?
(master) [dwar...@thebigwave gluon]$ grep pool_size\= *
dal.py:def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8'):
dal.py:def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8'):
dal.py:def __in
I ran into this a few nights ago, and if I wasn't about to leave on a
vacation I'd try some prototype code for it, but from what I can tell
at the end of any request all open database connections are marked to
be closed (Except for those needed to keep the connection pool up to
it's proper size.)
e Foreign
> Key").select(limitby=(0,1)).first()
> if fk:
> fk_id=fk.id
> else:
> fk_id=db.fk_table.insert(name="The Foreign Key")
> if db(table2.id > 0).count() == 0:
> db.table2.insert(name = "Some name", fk_id = fk_id, field2="some
> value&
Sorry to bump my own message but is there a better way to handle this?
On Jun 4, 2010 8:02 AM, "Doug Warren" wrote:
Yes, but the foreign key here is many to one, not one to one. (I
guess I should have been more clear:
if db(fk_table.id > 0).count() == 0:
db.fk_table.insert(name
On Wed, Jun 9, 2010 at 3:34 AM, Thadeus Burgess wrote:
> We have not fully agreed on the spec of PluginManager, it has been
> added as a proof of concept, however no plugins to date have been
> implemented with it. There are hundreds of posts debated what it
> should do.
>
> Currently the spec for
I think I was just bitten by a naming bug... I named my application
starting with a number and for a few days everything worked fine until
that fateful night when i tried to local_import something...
Traceback (most recent call last):
File "C:\4x2-server\web2py\gluon\restricted.py", line 178, in
So I'm writing a plugin to handle scheduling of tasks with a dynamic
granularity of a second or less, and I went to use PluginManger per
it's definition in tools.py:
class PluginManager(dict):
"""
This object stored parameters to configure plugins (if they need
configuration)
In models/
On Fri, Jun 4, 2010 at 9:11 AM, Yarko Tymciurak
wrote:
>
>
> On Jun 4, 10:58 am, Doug Warren wrote:
>> I don't believe I want to local_import my db.py file as it's already
>> set up by the environment correct?
>
> Correct - you do not want / need to impor
On Fri, Jun 4, 2010 at 8:56 AM, Yarko Tymciurak
wrote:
>
>
> On Jun 4, 10:43 am, Doug Warren wrote:
>> Traditionally when I've written MVC style applications, the model
>> would contain not only the data representing the objects but also the
>> data for manipulating t
Traditionally when I've written MVC style applications, the model
would contain not only the data representing the objects but also the
data for manipulating the objects. I'm not sure how that same
relation applies to web2py.
If I have a model that defines 4-5 tables, 2 of them are just foreign
k
he US, and 4g is covered at my home, my
office, and my gym.
On Thu, Jun 3, 2010 at 10:47 PM, mdipierro wrote:
> hmmm. I must get one of these...
>
> On Jun 3, 7:54 pm, Doug Warren wrote:
>> http://google-opensource.blogspot.com/2009/06/introducing-android-scr...
>> ?
>>
&
e value3")
db.table2.insert(name = "Some name4", fk_id = fk.id, field2="some value4")
On Fri, Jun 4, 2010 at 8:00 AM, mr.freeze wrote:
> The insert function will return the id.
> fk = db.fk_table.insert(name="The Foreign Key")
>
> On Jun 4, 9:48
Hi,
I defined all my tables in my model file and want to have a few
hundred rows of default foreign keys to maintain 3rd normal form. So
I have things in my code such as:
if db(fk_table.id > 0).count() == 0:
db.fk_table.insert(name="The Foreign Key")
if db(table2.id > 0).count() == 0:
f
http://google-opensource.blogspot.com/2009/06/introducing-android-scripting.html
?
On Thu, Jun 3, 2010 at 5:34 PM, weheh wrote:
> if web2py could run native on the Droid? Then, give me a foldup
> keyboard and who would need a laptop any more?
gt;> To reach this goal, two things need to be adjusted in web2py source
>> code:
>>
>> Thing1: add 0_local_config_pls_dont_pack_dont_commit.py into /
>> web2py/.hgignore
>>
>> Thing2: adjust the admin's pack code, to NOT pack the new
>> 0_local_config
Is there a preferred way to handle multiple instances of the same
application installed on the same machine? Say for instance is
there's 3 dev environments and 2 staging environments on one server
pointing at different databases? Is there a preferred way of getting
the configuration to each uniqu
I started looking at this a bit, you can find the specs for the Comet
protocol, such as it is at
http://svn.cometd.com/trunk/bayeux/bayeux.html It's built on top of
JSON but isn't quite JSON-RPC. More of a publish/subscribe model.
The latest version of 'cometd' just released a beta release availab
Greetings,
I'm setting up some git repositories for a web2py project where the
staging and some dev will be done under linux while other developers
will be done under win32. For simplicities sake, the pure python
implementation of web2py will be checked in as well as the
applications. win32 file
Greetings,
I'm testing how/if web2py could support foreign keys across db connections
For example I modified the mywiki app to look like:
db = DAL('sqlite://storage.sqlite')
authdb = DAL('sqlite://authdb.sqlite')
from gluon.tools import *
auth=Auth(globals(),authdb) # authentication
I'm still not sure if this is the correct place to post issues with the book
so if it's not someone please let me know where is, otherwise I'll keep
doing so :)
The response chapter in the book doesn't mention response.files at all, is
it intended to be internal and only used by the web2py_ajax.ht
One thing that would probably be helpful is just to get some of the links
that are presented here into the official website. Maybe I wasn't looking
at the right spot, but while I had found web2pysplices, and the appliances
section on the main website, until this thread I've never seen
http://web2p
I'm not sure if the group is the correct place to ask questions about the
wiki or not, so if it's not the right place please let me know what is...
I've used python a bit in the past but needed a refresher so I started going
through the tutorial in the web2py book and ran across the following:
htt
Hi,
I'm setting up a new dev environment for some users under Ubuntu 10 and I
notice that the two supplied scripts in the scripts dir for dealing with
Ubuntu seem to not be compatible... setup-web2py uses a 'www-data'
directory with an install path in /home/www-data among other things.
web2py.ubu
I've done that with an Apache front end using ProxyPass and
ProxyPassReverse, there may be an easier way in web2py however.
ServerName hello.example.com
ProxyPass / http://127.0.0.1:8009/init/default/action/hello
ProxyPassReverse / http://127.0.0.1:8009/init/default/actio
45 matches
Mail list logo