You need to specify the full path to the database file either relatively
(sqlite://../../foo/bar/storage.sqlite) or absolutely
(sqlite:///path/to/web2py/application/databases)
you may want to use the os.path methods for this but either way should work
for you
On Sunday, November 25, 2012 4:27:
Look at the way index.html (from the welcome app) handles 'message':
{{if 'message' in globals():}}
{{=message}}
I'd suggest you do something similar (although I would do it with the main
layout file (presumably layout.html):
{{ if additional_js in globals(): }}
< code to include y
personally I always go with routes.py
On Tuesday, July 10, 2012 4:51:54 PM UTC-5, Athelionas wrote:
>
> What is the preferred way of rewriting URLs?
> Also, are there any advantages or disadvantages of choosing one over the
> other?
>
> I like the idea of routes.py better because of portability,
I think I'm in a pretty good position to talk about modifying things in
web2py as I recently took the template engine created for web2py and
separated it out as a library that can be integrated with other projects.
In addition, I've been using the framework since ~ late 2008.
There are several
Hey fellow web-2-pirates / web2py-rats. Just thought I'd share with you the
fact that I've hijacked the template engine from web2py and made a command
line utility similar to Ruby's ERB. I've also stripped down the library a
removed gluon integration wrappers and HTML escaping to make it a generall
As I used to have a (zope) hosting business I have spare capacity on my
servers (actual hardware that I own) where I host mirrors for cherokee,
linuxmint, and pc-bsd. I'd be more than happy to host or mirror web2py.com.
My servers are currently in CA, FL, and CO but CA will likely be migrated
t
Given the following code snippet in a controller (default or any other):
auth.settings.allow_basic_login = True
def howdy():
auth.settings.allow_basic_login = True
response.view = 'generic.json'
if auth.user:
this_user = auth.user.id
else:
this_user = "unset"
r
t; to gluon.serializers.json, which should automatically call the as_dict()
> method of the Row object. Alternatively, you could import
> gluon.serializers.json and use it directly.
>
> Anthony
>
> On Monday, May 28, 2012 2:05:57 PM UTC-4, G. Clifford Williams wrote:
>>
>>
Have you taken a look at the Services and REST documentation in the 4th
edition of the web2py manual? Here's a link to the online
version: http://web2py.com/books/default/chapter/29/10#Restful-Web-Services
In short it's very easy to create rest services with web2py (even without
using the buil
I was migrating some of the ReST APIs that I'd hand-rolled over to the
new(?) ReST facilities in web2py and noticed while going through the
examples (http://web2py.com/books/default/chapter/29/10#Restful-Web-Services)
that JSON serialization kept failing. I'm using 1.99.7.
It looks like the pr
otten around to demonstrating how
much damage can be caused by exploiting it.
Do we know whether Rocket is vulnerable to this?
--G. Clifford Williams
Your friendly absentee enthusiast..
Relsi, do you know whether he's developing using Obj-C or a framework like
(Titanium, Corona, LiveCode, etc...)?
I ask because he could use a webview to usher content back and forth from
the network calls to the main meat of his application. This is pretty
trivial with Obj-C, Corona (Lua), and Tit
Thank you Adam, I agree.
*apologies for the late follow up*
On Mon, Mar 21, 2011 at 06:23:37AM -0700, AdamF spake:
> Hi,
>
> I've read all the discussion about the tagline... and unfortunately I cannot
> agree with most of the votes. But maybe it's because I am coming from
> enterprise world a
I'd love to help.
--G. Clifford Williams
Sent from some mobile device
On Mar 22, 2011, at 12:11 AM, Massimo Di Pierro
wrote:
> I was planning to be there. Can you help?
>
> Massimo
>
> On Mar 21, 9:39 pm, "G. Clifford Williams"
> wrote:
>> Anyone
Anyone planning on attending Flourish Conf '11?
Unfortunately it doesn't look like they have any Python speakers this year but
apparently there will be tables for both Web2Py and ChiPy
Massimo, who's manning the table?
http://www.flourishconf.com/2011/miniexpo
As someone who's developed several web2py appications for 'enterprise' clients,
I can only say that the managers who don't know any better do actually notice
the presence of that particular adjective. It helps get web2py past the
buzz-word filter.
I've had a client tell me that my application "
The ignorant will always be willing to offer an [ill,un]informed opinion.
Just lets me know I need to really get to work on that demonstration project.
On Mon, Mar 14, 2011 at 01:32:16PM -0700, Massimo Di Pierro spake:
> http://www.reddit.com/r/Python/comments/g3th5/best_python_framework_for_web
On Sun, Feb 20, 2011 at 12:00:42PM -0800, Felipe AP spake:
> None of my web2py apps are working anymore. I'm getting this error.
> What can I do about it? Please answer. Thanks!
>
> Traceback (most recent call last):
> File "/home/felipe/web2py/gluon/restricted.py", line 188, in
> restricted
>
On Sat, Feb 12, 2011 at 01:33:00PM -0800, rif spake:
> Shoud these steps work?
>
> - download google app engine
> - download web2py
> - run ./dev_appserver.py ../web2py/
> - go to http://localhost:8080
>
> Should it display the welcome app?
> I am on a fedora system with python 2.7 and it doesn't
On Sat, Feb 12, 2011 at 11:11:16AM -0800, Jonathan Lundell spake:
> On Feb 12, 2011, at 10:37 AM, G. Clifford Williams wrote:
> >
> > If it's the stock app (unmodified in anyway) and you just added it to the
> > GAE then when you go to http://localhost:[port]/ you sh
On Sat, Feb 12, 2011 at 10:28:52AM -0800, Jonathan Lundell spake:
> On Feb 12, 2011, at 10:10 AM, G. Clifford Williams wrote:
> >
> > 1) can you paste your app.yaml/
>
*snip*
>
> builtins:
> - remote_api: on
> - datastore_admin: on
>
> >
> > 2)
e
of the other remedies for having your app be the default. More info here:
http://web2py.com/book/default/chapter/04#Application-init
On Sat, Feb 12, 2011 at 09:43:08AM -0800, Jonathan Lundell spake:
> On Feb 12, 2011, at 9:29 AM, G. Clifford Williams wrote:
> >
> > On Sat, F
On Sat, Feb 12, 2011 at 09:20:02AM -0800, Jonathan Lundell spake:
> Is there a trick to getting web2py to run locally with the GAE Launcher? (OS
> X FWIW)
>
> I'm playing with the stock stable release. It works fine when deployed, but
> not locally (immediate ticket, and I don't know how to find
I'm playing around with plugin_wiki and can't seem to figure out how to set a
menu item's "active flag" if it infact corresponds to the page that's being
accessed.
Any ideas
TIA
--Cliff
David, well you won't get very far that way. If you want to do things on the
command line you can do the following:
1) Download the zip file
2) Unzip the archive and either launch the web2py.app from the finder or
use 'open ' on the command line
( This should be done once to initi
e stored in uploads"""
> f=filename.split('.')
> path=os.path.join(request.folder,folder,
> '%s.%s'%(f[0],f[1]),
> '%c%c'%(f[2][0],f[2][1]),
> filename)
> return path
>
> where filename passed to get_path is d
Is ther a prescribed mechanism for getting the full path to uploaded files?
I've got an onaccept function that contains:
os.symlink(os.path.join(request.folder,'uploads',
form.vars.file_newfilename), link_path)
which worked until I'd changed the field to use
u can
> > define a custom_store method on the field to control how and where it
> > is stored. I don't know of a way to open the file with sqlite from the
> > cgi FieldStorage object form.vars.file.
> >
> > On Dec 5, 7:11 pm, "G. Clifford Williams"
&g
, Dec 11, 2010 at 08:17:23AM -0800, mdipierro spake:
> are you talking about the web2py license? Why would a client care?
> Web2py imposes no restriction on their code. I an write a letter to
> this effect if at all necessary.
>
> Massimo
>
> On Dec 11, 10:11 am, "G. Clifford Wi
I hope so. A different license would certainly help with my fight for adoption
by a few clients
On Fri, Dec 10, 2010 at 06:31:15PM -0800, pbreit spake:
> Did I read correctly that you might evaluate Web2py's license? It does
> seem like GPL could potentially discourage usage since it makes the
>
Is VoltDB supported?
Sent from some mobile device
On Dec 7, 2010, at 2:09 PM, Bruno Rocha wrote:
> MongoHQ can be useful for testing, they offer a free limited instance
>
> https://mongohq.com/pricing
>
>
>
> 2010/12/7 mdipierro
> I run some benchmarks. The time to do insert and select is
You got it.
BTW, anyone else interested in ZODB support? It's not the new fangled toy that
these NoSQL databases are but it's still awesome.
--G. Clifford Williams
Sent from some mobile device
On Dec 7, 2010, at 12:23 AM, mdipierro wrote:
> I got CouchDB working. Denes is worki
I can donate a couple of FreeBSD jails with various databases setup if you let
me know what you want.
--G. Clifford Williams
Sent from some mobile device
On Dec 6, 2010, at 4:38 PM, mdipierro wrote:
> With the new DAL it should take very little to create a DAL interface
> to mongodb, c
I have a project that requires users to upload transaction files. These files
are sqlite databases created with a desktop application. I'm trying to figure
out a way to ensure that the files uploaded by the various users are infact
valid transaction files from the proper version of the appropriate
On Sun, Nov 21, 2010 at 05:26:32AM -0800, mdipierro spake:
> Even simplesjon has a c version that is faster than the one that ships
> with web2py (pure Python).
>
> On Nov 21, 2:41 am, Phyo Arkar wrote:
> > I stumble across very fast json implementation:
> >
> > http://pypi.python.org/pypi/python
sapper when you extract the data (get replaced by
> something else?)
> 3) you do not see the newline when you display the field values (are
> you sure this is not an escaping issue '\n' vs ''?)
>
> does it behave differently on GAE vs non-GAE?
>
> Massimo
'new line' characters.
(running 1.76.5)
On Apr 23, 2010, at 9:20 PM, mdipierro wrote:
> Should be the default behavior? Probably yes.
>
> Meanwhile you can use Field(type='text')
>
> On Apr 23, 8:24 pm, "G. Clifford Williams"
> wrote:
&
according to
http://code.google.com/appengine/docs/python/gettingstarted/usingdatastore.html
we need to use multiline=True to get strings to behave with newline chars on
GAE. Is there a prescribed mechanism by which we accomplish this in web2py?
--
Subscription settings: http://groups.google.c
sanitize=False)
>>
>> --
>> Thadeus
>>
>> On Mon, Apr 19, 2010 at 7:38 AM, G. Clifford Williams
>>
>> wrote:
>>> I'm trying to figure out how to get links created in web2py that point to
>>> an anchor name here is the code I&
I'm trying to figure out how to get links created in web2py that point to an
anchor name here is the code I'm using:
{{=DIV(SPAN(gripe.created_on, _class='gripe-date'),
A(SPAN(SPAN('Comments:'),
SPAN(gripe.comments, _class='comment-num
Vi/Vim mode would be really nice to have, but it's far from trivial to
implement.
On Apr 18, 2010, at 12:26 AM, Mengu wrote:
> On 18 Nisan, 04:10, Doug Elkin wrote:
>> Feel free to take these requests with a grain of salt... I know most
>> things with development are easier said than done, but
How shall we submit minor (and not so minor) corrections to the online
book?
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to
web2py+unsu
t; auth_table = db.define_table(
>
> > should be
>
> > auth.settings.table_user = db.define_table(
>
> > so that the following auth.define_tables() knows it is there already.
>
> > On Feb 19, 7:45 am, "G. Clifford Williams"
>
> > wrote:
> &
In my app I had:
auth=Auth(globals(),db) # authentication/
authorization
auth.define_tables() # creates all needed
tables
crud=Crud(globals(),db)
Which worked wonderfully. Then I got the great idea to add some custom
fields to the auth table(s)
, 10:11 pm, mdipierro wrote:
> import gluon.fileutils
>
> @auth.requires(auth.user and
> gluon.fileutils.check_credentials(request))
> def
>
> On Feb 11, 9:21 pm, "G. Clifford Williams"
>
>
>
> wrote:
> > I'm trying to get a layout pag
is there anyone working on ZODB support?
If not.. is there a style guide for contributors?
On Feb 11, 5:41 pm, mdipierro wrote:
> not yet
>
> On Feb 11, 1:50 pm, Pystar wrote:
>
>
>
> > I would like to know the current state of the DAL rewrite and if it
> > now supports NOSQL engines?
> > thanks
I'm trying to get a layout page/template to display response.menu_edit
only if the current user is the web2py admin (read: the admin user
that has the password set with the -a option on invocation of python
web2py.py)
Thanks in advance
--G. Clifford Williams
--
You received this me
47 matches
Mail list logo