every app has its own auth system. If you want multiple apps to share the
same auth system, look at
http://web2py.com/books/default/chapter/29/09#Central-Authentication-Service
Il giorno martedì 25 giugno 2013 07:51:08 UTC+2, Tom Russell ha scritto:
So I took and modified the welcome app to
I am surprised this ever worked as you say. The proper thing to do would be
to do is to write
from ourlib import is_administrator
In your models/db.py and it will be visible in all your models that follow
db.py alphabetically and all your controllers and views.
On Monday, 24 June 2013
I see your point, just a question, which web2py version are you using?
In trunk there is a newer editor with tabs, it allows you to edit few files
in parallel, by removing the left side panel your won't be able to use such
feature.
Paolo
2013/6/24 lucas sjluk...@gmail.com
hard-code or
Anthony we can have both, chapter numbers and slug in the url. If we don't
change the args position former links should work too. isn't it?
Paolo
2013/6/24 Anthony abasta...@gmail.com
I have argued for slugs *instead* of chapter numbers in the URL's. There
are many links to the book on the
having 01/slug shouldn't be a problem, but those links with /slug will be
generated just for the menu part on the left side.I can work on that
but I don't see any other place where they can be expressed.
On Tuesday, June 25, 2013 9:30:15 AM UTC+2, Paolo valleri wrote:
Anthony we can have
I do not think we should remove it. We should have a botton collapse it to
the left lite a drawer.
On Tuesday, 25 June 2013 01:47:01 UTC-5, Paolo valleri wrote:
I see your point, just a question, which web2py version are you using?
In trunk there is a newer editor with tabs, it allows you to
I have values I would like to store encrypted in my db after user inserts
them. When displayed, the data should get decrypted.
All I know about encryption in web2py is that it uses HMAC+SHA512 by
default to store password in auth_user table. The algorithm is of course
reversible but how do I
Hi,
I don't know if RadiantCMS is still alive.
But if you have basic needs (manage pages content and hierarchy) you can
have a look to TinyWebsite CMS : www.tinywebsite.net
Demo here : http://www.tinywebsite.net/tiny_website_DEMO/
Github repo : https://github.com/espern/tiny_website.git
Le
Hi,
I don't know if RadiantCMS is still alive.
But if you have basic needs (manage pages content and hierarchy) you can
have a look to TinyWebsite CMS : www.tinywebsite.net
Demo here : http://www.tinywebsite.net/tiny_website_DEMO/
Github repo : https://github.com/espern/tiny_website.git
Le
You cannot use CRYPT for this purpose. That is a one way hash. The original
plaintext cannot be recovered.
You need a symmetric cypher. Web2py comes with the gluon/contrib/aes.py
from gluon.contrib.aes import AES
key = your encryption key
IV = ' '*16
db.table.field.filter_in = lambda
The way you describe the environment, it's impossible to bring
deterministic automated updates. If you have users customizing views, css,
etc., there is bound to be some manual intervention needed if your updates
also include views, css, etc.
You could use git, mercurial or a similar tool, but
OK, I get it. However, using the code I get:
*AttributeError: type object 'AES' has no attribute 'new'*
On Tuesday, June 25, 2013 2:00:06 PM UTC+2, Massimo Di Pierro wrote:
You cannot use CRYPT for this purpose. That is a one way hash. The
original plaintext cannot be recovered.
You need a
Sorry. try this:
import gluon.contrib.aes as AES
key = your encryption key
IV = ' '*16
db.table.field.filter_in = lambda data,key=key,iv=IV:
AES.new(key,AES.MODE_CBC,iv).encrypt(data)
db.table.field.filter_out = lambda data,key=key,iv=IV:
AES.new(key,AES.MODE_CBC,iv).decrypt(data)
On Tuesday,
I'm trying to deploy a sample application, in this
case https://github.com/relsi/web2pyople to Heroku. I was able to get
web2py setup on heroku following the instructions Installing your web2py
Stack on the Heroku cloud in 4 simple
Thank you so much for responding Danny.
Do you mean to say that I need to change the statement :title =
self.browser.find_element_by_tag_name('title') to...
title = self.browser.title ...??
On Monday, June 24, 2013 12:12:20 PM UTC+5:30, shai...@signumsol.com wrote:
In the tukker
It rises an exception now:
I believe it's this part of aes:
if len(data) % self.block_size != 0:
raise ValueError, Input length must be multiple of 16
On Tuesday, June 25, 2013 2:27:11 PM UTC+2, Massimo Di Pierro wrote:
Sorry. try this:
import gluon.contrib.aes as AES
key = your
It rises an exception now: *ValueError: Plaintext length must be multiple
of 16*
I believe it's this part of aes:
if len(data) % self.block_size != 0:
raise ValueError, Input length must be multiple of 16
Not sure what's wrong.
On Tuesday, June 25, 2013 2:27:11 PM UTC+2, Massimo Di
I will try to pack a little app...
Richard
On Fri, Jun 21, 2013 at 4:40 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
It should. Can you provide a concrete example?
On Friday, 21 June 2013 10:31:45 UTC-5, Richard wrote:
Further code review lead me to the conclusion that the
One more try:
import gluon.contrib.aes as AES
key = your encryption key
IV = ' '*16
db.table.field.filter_in = lambda data,key=key,iv=IV:
AES.new(key,AES.MODE_CBC,iv).encrypt(AES.pad(data))
db.table.field.filter_out = lambda data,key=key,iv=IV:
AES.new(key,AES.MODE_CBC,iv).decrypt(data)
the
Hi there:
I know there are some threads about this issue but I don't get the thing.
It's supposed that if I put the module into the /myapp/modules subfolder,
importing as usual in Python should work (eg, import mymodule or from
mymodule import *).
I'm trying to use sympy in my app. When I
Thanks for the answers Anthony, I am going to try to report a bug.
I am using
web2py
2.4.6-stable+timestamp.2013.04.06.17.37.38
the source version,
on mac os
and
when I copy and paste the csv as a service example from the book
section on Remote procedure calls,
to the default.py in the
Well agreed, but I set that up in the welcome app so it would seem like
that should move over to my other app as well?
On Tue, Jun 25, 2013 at 2:24 AM, Niphlod niph...@gmail.com wrote:
every app has its own auth system. If you want multiple apps to share the
same auth system, look at
Not a bug. I think @service.csv sets the content-type of the response to
'text/x-csv', so that will likely prompt the browser to do a download
rather than display the text (which is typically what is desired). Have you
tried it with D3 to see if it works as is?
Anthony
On Tuesday, June 25,
I have the following form that uses 3 different tables and when I submit
the data it all seems to submit correctly but when I view the data in a
smart grid with linked tables in the columns clicking on the link does not
show any record for the row of linked data.
My smartgrid code:
def
On Tuesday, June 25, 2013 10:12:32 AM UTC-4, Tom Russell wrote:
Well agreed, but I set that up in the welcome app so it would seem like
that should move over to my other app as well?
Are you saying you customized the welcome app and then used admin to create
a new app? In that case, note
you're welcome; I'd been wanting to run through the tutorial,
yes,within test_static_pages.py (though I guess you've probably tried it by
now) it will work that way; I don't know selenium well enough to say
whether his example should work or whether browser.title is the preferred
way; I'd
Yes I customized welcome and then added a new app via the admin interface.
I did not directly copy the welcome app, just modified the html etc.
Now I am really confused about how this all works. So when I fire up web2py
and create a new app via the admin, should that be my only app then?
So I
But I do like this:
## create all tables needed by auth if not custom tables
auth.define_tables(username=True, signature=True)
I was using auth.signature for each table but that gave me an error after
setting the CAS stuff. Once commented out it works fine. I was getting
a 'DAL' object has no
On Tuesday, June 25, 2013 11:04:22 AM UTC-4, Tom Russell wrote:
Yes I customized welcome and then added a new app via the admin interface.
I did not directly copy the welcome app, just modified the html etc.
Now I am really confused about how this all works. So when I fire up
web2py and
I have a smartgrid with a link like so:
links = [lambda row: A(T('Create
Appointment'),_href=URL(AppointmentManager,appointment_create,args=[
row.id]))]
grid = SQLFORM.smartgrid(db.patient, deletable=True, editable=True,
create=True, maxtextlength=64, paginate=25, links=links,
Hello,
How can I make a fake request in order I can retrieve my table name in
request.args(0) like my app does...
Thanks
Richard
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this group and stop receiving emails
Hmm, as for AES(pad(data)):
*'module' object has no attribute 'pad'*
*
*
In addition, can't find any reference of what pad() is in Python.
On Tuesday, June 25, 2013 3:58:59 PM UTC+2, Massimo Di Pierro wrote:
One more try:
import gluon.contrib.aes as AES
key = your encryption key
IV = '
Ah, I forgot to add the following line to my consumer app:
auth = Auth(db,cas_provider = '
http://127.0.0.1:8000/welcome/default/user/cas')
On Tue, Jun 25, 2013 at 10:12 AM, Tom Russell t...@caregointl.com wrote:
Well agreed, but I set that up in the welcome app so it would seem like
that
Not quite clear what you mean. How does your app get a table name in
request.args(0)?
On Tuesday, June 25, 2013 12:07:48 PM UTC-4, Richard wrote:
Hello,
How can I make a fake request in order I can retrieve my table name in
request.args(0) like my app does...
Thanks
Richard
--
---
If you only provide two positional args to URL, it assumes they are the
controller and function. In this case, you'll need to specify the
application, controller, and function:
URL(AppointmentManager, yourcontroller, appointment_create, args=[row.
id])
You can also used keyword arguments a, c,
Here an example of URL : URL(c='my_controller', f='my_func',
args=('my_table', 'record_id'))
I would like to know how I can create a fake request object from an URL()
or other mean...
Hope it is clearer.
Thanks
Richard
On Tue, Jun 25, 2013 at 1:28 PM, Anthony abasta...@gmail.com wrote:
Not
Ah I see now, Thanks.
On Tue, Jun 25, 2013 at 1:31 PM, Anthony abasta...@gmail.com wrote:
If you only provide two positional args to URL, it assumes they are the
controller and function. In this case, you'll need to specify the
application, controller, and function:
URL(AppointmentManager,
Do you mean you want a gluon.globals.Request object with its application,
controller, function, and args values set as per your URL? WAYRTTD?
On Tuesday, June 25, 2013 1:34:43 PM UTC-4, Richard wrote:
Here an example of URL : URL(c='my_controller', f='my_func',
args=('my_table',
I think yes, I have an function used in a compute field and I am trying to
understand why it not compute in certain situation... In my function I
request for request.args(0) as default argument. So I want to kind of mock
web2py request object.
Richard
On Tue, Jun 25, 2013 at 1:40 PM, Anthony
Hi again,
I'm working on returning my test db to its initial state after I run my
unit/integration tests. I'm registering a test user just fine using the
fantastic WebClient. But how can I remove that test user afterwards?
(Otherwise I'll end up with my test db cluttered with redundant test
.delete()
http://web2py.com/books/default/chapter/29/06#count,-isempty,-delete,-update
On Tuesday, June 25, 2013 1:57:23 PM UTC-4, Ian W. Scott wrote:
Hi again,
I'm working on returning my test db to its initial state after I run my
unit/integration tests. I'm registering a test user just
You can manipulate the request object in your code:
request.args.insert(0, 'somevalue')
Anthony
On Tuesday, June 25, 2013 1:48:08 PM UTC-4, Richard wrote:
I think yes, I have an function used in a compute field and I am trying to
understand why it not compute in certain situation... In my
Great, that what I want.
Thanks
Richard
On Tue, Jun 25, 2013 at 2:10 PM, Anthony abasta...@gmail.com wrote:
You can manipulate the request object in your code:
request.args.insert(0, 'somevalue')
Anthony
On Tuesday, June 25, 2013 1:48:08 PM UTC-4, Richard wrote:
I think yes, I have
actually, it's not that easy. I gave up on lambdas for this
implementation, but it works out nicely
import gluon.contrib.aes as AES
import threading
import base64
import os
def w2p_encrypt(data):
key = 'asdsaddasdasdas'
key = pad(key[:32])
cipher, IV = AES_new(key)
Ok, thanks Anthony. So what you're saying is that there's no auth method or
anything parallel to user/register. You just remove the db.auth row
directly.
That's simple enough.
Ian
On Tuesday, June 25, 2013 1:57:23 PM UTC-4, Ian W. Scott wrote:
Hi again,
I'm working on returning my test db
yep.
PS: in addition you rarely may want to have the db where your tests happen
to be the same as the one you use in production
On Tuesday, June 25, 2013 8:38:03 PM UTC+2, Ian W. Scott wrote:
Ok, thanks Anthony. So what you're saying is that there's no auth method
or anything parallel
sorry, cutpaste error.
import gluon.contrib.aes as AES
import threading
import os
import base64
def fast_urandom16(urandom=[], locker=threading.RLock()):
this is 4x faster than calling os.urandom(16) and prevents
the too many files open issue with concurrent access to
I'm attracted to the spate of recent flat-file blogging platforms, using
plain text (markdown) files to store the blog posts. I especially like the
idea of using dropbox or a git repo to store the files.
Has anyone experimented with this in web2py? I can imagine at least two
ways of doing it:
I am trying to create a component plugin. I would like to add in some
javascript and css files from the plugin with as little editing as possible.
I have a view.load file as part of the plugin and I tried to add something
like this to the top of this view file:
{{
Suggest you look at the book section rendering a dictionary, I use the json
approach with d3, and then reference the URL in the js script. Works great and
should work for csv too. This approach allows you to get the file formatted in
the way d3 expects it, without trying to do it in js code.
I would guess D3 would be faster if fed JSON (which is already Javascript)
rather than having to first parse CSV.
Anthony
On Tuesday, June 25, 2013 3:59:48 PM UTC-4, Andrew W wrote:
Suggest you look at the book section rendering a dictionary, I use the
json approach with d3, and then
response.files gets only called inside web2py_ajax.html, that is evaluated
only when you load the layout.html
in HTML, all static assets must be in the head to be sure all are loaded
when you try to execute some code.
If you need to include a js file and you're sure all the dependencies are
The problem is that response.files are inserted in the head of the
layout, but components are loaded via ajax after the main page has been
loaded, so your code will have no effect. You could call
response.include_files() after appending the files -- that will insert the
relevant code right
Should we include decrypt(key,data) and encrypt(key,data) in gluon.utils?
On Tuesday, 25 June 2013 13:42:29 UTC-5, Niphlod wrote:
sorry, cutpaste error.
import gluon.contrib.aes as AES
import threading
import os
import base64
def fast_urandom16(urandom=[], locker=threading.RLock()):
if you want to reinvent the wheel you can play with that, but the spate
(as you describe that) is actually something that serialize into STATIC
webpages a somewhat fixed structure of flat files, on a given command.
I actually did it for the diffbook, http://niphlod.github.io/diffbook/, to
use
Excuse me for the monologue, but it can also be useful for somebody.
The thing was that I was accesing the deployed app via https. Doing so,
chrome disabled js, and the weird thing is that in Firefox it works.
Anyway, accessing via usual http does the trick.
El lunes, 24 de junio de 2013
Only if there is an optional algorithm argument.
On Tuesday, June 25, 2013 1:23:32 PM UTC-7, Massimo Di Pierro wrote:
Should we include decrypt(key,data) and encrypt(key,data) in gluon.utils?
On Tuesday, 25 June 2013 13:42:29 UTC-5, Niphlod wrote:
sorry, cutpaste error.
import
because you want something else from AES ?
On Tuesday, June 25, 2013 10:31:47 PM UTC+2, Derek wrote:
Only if there is an optional algorithm argument.
On Tuesday, June 25, 2013 1:23:32 PM UTC-7, Massimo Di Pierro wrote:
Should we include decrypt(key,data) and encrypt(key,data) in
Could it be a bug?
If I put it under site-packages and run locally, it works. When running in
GAE, fails.
If I put it under the modules folder (where I want to put it), it fails
both in local and in GAE.
El martes, 25 de junio de 2013 16:00:25 UTC+2, peibol escribió:
Hi there:
I know
Niphlod,
Thanks, I wasn't aware of these other ways to append these files. That's
certainly useful to know.
Richard.
On Tuesday, June 25, 2013 9:16:35 PM UTC+1, Niphlod wrote:
response.files gets only called inside web2py_ajax.html, that is evaluated
only when you load the layout.html
Something other than AES, yes. Perhaps ECE (elliptic curve encryption) or
something other than AES. Shouldn't I have a choice?
On Tuesday, June 25, 2013 1:36:56 PM UTC-7, Niphlod wrote:
because you want something else from AES ?
On Tuesday, June 25, 2013 10:31:47 PM UTC+2, Derek wrote:
Anthony, I look forward to your incorporation of d3 into web2py!
Maybe you have enough d3 knowledge to help me make this work.
in my controller, powertoday.py there is a function,
def csvtab():
#return dict(rows = db(db.ptoday.id0).select( ))
rows = db(db.ptoday.id0).select( )
for
I've tried many, many things (I want to get the csv as python solution
working), including this,
g = new Dygraph( document.getElementById(div_pt),
d3.csv({{=URL('powertoday','cvstab.csv')}}),
Your URL needs to be in quotes:
d3.csv({{=URL('powertoday','cvstab.csv')}})
I want to do this:
db.define_table('finish',
Field('name'),
Field('abbr'))
db.finish.name.requires = IS_NOT_IN_DB(db,db.finish.name)
db.finish.abbr.requires = IS_NOT_IN_DB(db,db.finish.abbr)
db.define_table('product',
Field('series', 'reference series'),
Field('material',
In the last 2 lines it looks like you're adding requires attributes to
tables rather than fields (and the table name in the first of those lines
doesn't match the name of the previously defined table).
Anthony
On Tuesday, June 25, 2013 7:43:12 PM UTC-4, greenpoise wrote:
I want to do this:
Hi,
I am new to Web2Py and would like to achieve 'selectable' like
functionality through links but I am not sure how to pass the ID and flag
from checkbox to the controller function
*Why links why not selectable?*
I might need multiple columns with checkbox and links is the easiest
I think it would be nice to specify custom operators that can be used with
the DAL as I believe this would allow for operators that are currently yet
to be supported with a built-in DAL operator...
From dal.py, I am thinking this should be relatively easy to implement, and
code would be along
Another question on the smartgrid.
I have linked tables in my smartgrid like:
grid = SQLFORM.smartgrid(db.patient, deletable=True, editable=True,
create=False, maxtextlength=64, paginate=25, links=links,
links_in_grid=True, linked_tables=['emergencycontacts','dependents'])
When clicking on
68 matches
Mail list logo