My application is completely node ID driven. I have the following router
function:
def router():
if not len(request.args):
redirect(URL('addressbook','index'))
else:
id=int(request.args(0))
account=db(db.nodeAccount.nodeID==id).select(db.nodeAccount.ALL).first()
Okay, thanks.
How do I authenticate the remote user?
Is there a slice on this?
Also, OAuth2 server for web2py?
On Wed, Jan 2, 2013 at 7:05 AM, Niphlod wrote:
> seems a bug with python
>
> http://bugs.python.org/issue5285
>
>
>
>
>
> On Tuesday, January 1, 2013 7:53:56 PM UTC+1, Alec Taylor wr
Quick question - is this do able i.e. some tables - e.g. db =
DAL('sqlite://storage.sqlite), other tables - db1 = DAL('mysql://root:
) etc, within the same application/controller/function?
If so, will write up an issue we're having.
TIA
--
Yep, that's possible.
Feature trivial to utilise in web2py; difficult or unimplemented with other
frameworks.
On Wed, Jan 2, 2013 at 8:56 PM, Simon Ashley wrote:
> Quick question - is this do able i.e. some tables - e.g. db =
> DAL('sqlite://storage.sqlite), other tables - db1 = DAL('mysql
On Thursday, October 22, 2009 3:34:03 AM UTC-4, SergeyPo wrote:
> Yes I was running two different applications, and that's what wondered
> me - why different apps (actually two different python web2py
> processes) affected each other.
The issue may be the (internal) application name you are u
I'd say you need to convert the password to string (i.e. must not be an
unicode string)
as for oauth2 servers for web2py, I'm not aware of the existence of a
supported app/library.
--
In my node driven application every menu item has the node ID as an
argument. I am struggling with URL manipulation.
Say I have a calendar controller with functions: openinghours, eventList,
timetable and courseTable. User with ID 1 has access to all functions user
2 has access to openinghours
Trunk.
However, just figured it out.
>From an earlier post, I added the following to models so that the wiki
tables were displayed in the Database Administration;
auth.wiki(resolve=False)
In my controller I added return auth.wiki(render='markmin', menugroups =
['wiki-editor','wiki-author']).
Th
On Wed, Jan 2, 2013 at 9:30 PM, Niphlod wrote:
> I'd say you need to convert the password to string (i.e. must not be an
> unicode string)
>
> as for oauth2 servers for web2py, I'm not aware of the existence of a
> supported app/library.
>
Will write a thread on it with the dev list later tonigh
I have this simple controller:
@request.restful()def fevent():
def GET(*args, **kwargs):
print 'hello'
print 'args =', args
print 'kwargs =', kwargs
return dict(foo='foo')
But it doesn't work, not even locally. Nothing except link to its ticket
appears in my c
ok, so you got me thinking about import in the way of models, modules, and
controllers. where does packages fit into that scheme? anyway, reading
sort of confused me more. what is the defined functionality of a model,
module, controller, and package in the python scheme of things? do you
ha
Ajax will help you.
You need to load countries HTML OPTION's when continent changes.
On Wed, Jan 2, 2013 at 3:26 AM, Calvin wrote:
> Say I have a look-up tables as follows:
>
> db.define_table('continent',
>Field('name')
> )
>
>
> db.define_table('country',
>Field('name'),
>Field('
Ok then, should this work?
(Version 2.3.2 (2012-12-17 15:03:30) stable, source, nightly build, from
12/31)
*Connection*
db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
db1 = DAL('mysql://root:www@localhost:3306/xxx', migrate=True, fake_migrate=
False, check_reserved=['commo
Hi Alec,
you are missing the return at the end of the function (additional to the
one in the GET), e.g.
return locals()
at the very end.
Denes
On Wednesday, January 2, 2013 6:28:29 AM UTC-5, Alec Taylor wrote:
>
> I have this simple controller:
>
> @request.restful()def fevent():
> def GE
^bump^
--
Hi,
The unique constraint is not working in the following Field definition.
Field('f_xlsfile', type='upload', notnull=True,
requires=[
IS_UPLOAD_FILENAME(extension='^xlsx?$',
error_message='Please post .xls or .xlsx Excel files
only.'),
Ahh, silly me.
This is why I shouldn't code so late (early)!
Thanks
On Thu, Jan 3, 2013 at 1:13 AM, DenesL wrote:
> Hi Alec,
>
> you are missing the return at the end of the function (additional to the
> one in the GET), e.g.
>
> return locals()
>
> at the very end.
>
> Denes
>
>
> On Wednesda
On Wednesday, January 2, 2013 1:44:39 AM UTC-3, Adi wrote:
>
> Thanks Alan for your help.
>
> Have two more questions related to this:
>
>
Maybe in the view you can do something like:
{{=DIV(MARKMIN(mm), _id="videoframe"))}}
An then use CSS for adding the size to the content
div#videoframe{
Hi François:
Could you send us an example of two records where the unique constraint is
not working with upload fields?
What are you expecting?
IIRC, there are some parameters for Field so you can handle the file name
uniqueness, but generally that is not a good idea as other users could be
uplo
This is my form and controller function. My problem is nothing happens
(redirection) after the register button is clicked.
def myregister():
"select all roles greater than 1. root is always 1 "
print "in myregister"
form = auth.register(next='index')
print f
It is not clear to me what you are storing in session.
This:
id=int(request.args(0))
account=db(db.nodeAccount.nodeID==id).select(db.nodeAccount.ALL).first()
...
session[id]
looks like a security vulnerability to me. Every user can access any record
of the table and add to the c
I think this can be implemented. Will try later today.
On Monday, 31 December 2012 11:30:34 UTC-6, DenesL wrote:
>
> +1 for an extended syntax instead of routes.
>
> Blog post about http://blog.2partsmagic.com/restful-uri-design/ which
> discusses some schemes (about halfway down, with the title
El miércoles, 2 de enero de 2013 07:38:04 UTC-3, Andrew W escribió:
> Trunk.
> However, just figured it out.
> From an earlier post, I added the following to models so that the wiki
> tables were displayed in the Database Administration;
> auth.wiki(resolve=False)
>
>>
This is probably because au
I've seen a couple of layouts from web2py.com/layouts i want to try out but
i don't know how to install them, i click on the get link and it downloads
a .w2p file which i'm not sure what to do with... :/ help...
--
On Wed, Jan 2, 2013 at 10:53 PM, Simon Ashley wrote:
> Ok then, should this work?
> (Version 2.3.2 (2012-12-17 15:03:30) stable, source, nightly build, from
> 12/31)
>
> *Connection*
> db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
> db1 = DAL('mysql://root:www@localhost:3
See this: http://web2py.com/books/default/chapter/29/12#Layout-plugins
On Wed, Jan 2, 2013 at 3:01 PM, sasogeek wrote:
> I've seen a couple of layouts from web2py.com/layouts i want to try out but
> i don't know how to install them, i click on the get link and it downloads a
> .w2p file which i'
thanks :)
On Wednesday, 2 January 2013 17:50:43 UTC, viniciusban wrote:
>
> See this: http://web2py.com/books/default/chapter/29/12#Layout-plugins
>
>
> On Wed, Jan 2, 2013 at 3:01 PM, sasogeek >
> wrote:
> > I've seen a couple of layouts from web2py.com/layouts i want to try out
> but
> > i
If you don't want duplicates then change
rows = rows & rr
to
rows = rows | rr
Denes
On Wednesday, January 2, 2013 12:31:15 AM UTC-5, sasogeek wrote:
>
> It's working... somewhat, but how do i remove duplicates?
--
Thanks Alan again, but it seems to me that height of iframe can be
controlled only when creating it in protolinks_simple(). Changing width
worked fine.
Would we be able to extend protolinks_simple to accept the width and height
as parameters to control the size of iframe? I don't know the bigg
> I can see it as a field listed under db.auth_user but when the
>record is selected, that is not a field that shows up in the appadmin form.
>What do I need to fix or look at so that this becomes an editable field?
Somewhere the field is being set as writable=False.
I'd try explicitly changing
tried with python-rq before and as much as I like it (if you can bear the
limitations) I can't get any function that is defined in models to be
executed.
Guess it's something related to web2py's execution environment.. if
you're going to use mail.send then it's ok, but what if you must enq
Hello,
I have a problem looking for rows in my database. I have a method like this:
def getBoughtItems():
for item in self.allItems:
_itemId = item['itemId']
rowsItems = self.db(self.db.tableItems.itemId==_itemId)
if rowsItems.count() > 0:
Hi Francois,
if I understand correctly you want to avoid duplicated file names.
In this case unique=True is useless because web2py renames the file with a
random UUID, and the renamed filename is stored in the field.
But in the following example I created a validator that checks the
uploading f
for an api that is accessing my site I need to have a crossdomain.xml file
at the root level so I created a redirect for it in routes.py but it
doesn't seem to work. Do I have the syntax correct? This is my routes.py
file... (if I go to http://myUrl/dispatch/static/crossdomain.xml
everything
Another case:
format=lambda row: '{} {}'.format(row.thickness, row.material)
will throws the Oracle Error.
format='%(thickness)s %(material)s',
will not throw the error
--
Thank you, Alan,
your solution does make the field editable by appadmin. But I found that I
was having some other problems with the appadmin that I had copied from the
welcome app. So I copied the appadmin.py from a different app and when I
did a diff, it was very different, and this other co
yes, but for me it is not a problem since all my functions lives in modules.
But, I have one solution for this problem, I created a plugin_rq.py which
is a module and it has a class Queue and the enqueue method which works
good for functions defined in models.
Also I am implementing the monitorin
Sorry Alec,
I saw that just as posted it and tried to delete it. It came through again
afterwards.
This wasn't the issue, just an example returning the same error.
Solved it ... was in the query=db() statements, which should have been
changed to query=db1() etc.
Thanks for your reply.
Hi,
I get the following error when I try to run scgihandler with LOGGING
enabled.
Is this a known problem?
Ciao,
Sven
neo:/var/www/web2py# python scgihandler.py
Traceback (most recent call last):
File "/var/www/web2py/scgihandler.py", line 75, in
SCGIServer(application, port=4000).enable
Sorry for answering myself, but I think I've found the solution after a
long search. My problem was use "and" instead of "&" in the query
conditions. With the &, everything goes well now.
On Wednesday, January 2, 2013 9:57:51 PM UTC+1, Wonton wrote:
>
> Hello,
>
> I have a problem looking for ro
Hello,
I have the following problem:
db.auth_user.insert(
...
image = open('./sebastian.jpg', 'rb')
does work locally using a mysql database.
But if I run it on GAE the image does not exist on the server
importing a csv on GAE (including image blobs) fails on GAE:
Traceback (most recent call last):
File
"/base/data/home/apps/s~cambeoserver/1.364313602794800132/gluon/restricted.py",
line 212, in restricted
exec ccode in environment
File
"/base/data/home/apps/s~cambeoserver/1.364313602794
Not sure I understand. Is the file ./sebastian.jpg there on GAE or not?
On Wednesday, 2 January 2013 18:16:38 UTC-6, Bas Ti wrote:
>
> Hello,
> I have the following problem:
>
> db.auth_user.insert(
> ...
> image = open('./sebastian.jpg',
I think you have a buggy appadmin.py (perhaps from a previous trunk
version). Copy a new appadmin.py and appadmin.html from the latest welcome
to the app that gives you the problem.
On Wednesday, 2 January 2013 18:58:22 UTC-6, Bas Ti wrote:
>
> importing a csv on GAE (including image blobs) fail
thank you, that worked :)
--
Looks like PyJaCo works much better, even supporting classes.
http://pyjaco.org/demo
--
46 matches
Mail list logo