But if I do this in default.py:
import mymodule
def index():
value = mymodule.attribute
return value
it works and return 'goobye world', so default detects the attribute but
not the function, why is this? Maybe I'm not building the module correctly?
I've tried to put the module
models/db.py
from gluon.tools import Auth,Crud, Service, prettydate
from gluon.contrib.login_methods.basic_auth import basic_auth
import datetime
crud, service = Crud(db), Service(),
auth = Auth(db)
auth.define_tables(username=True)
auth.settings.allow_basic_login = True
auth.settings.hmac_key =
Update:
It seems the piece which generates the problematic statement is in the
method migrate_table in dal.py and it currently looks like this:
'ALTER TABLE %s ADD %s__tmp %s;' % (t, key, tt),
'UPDATE %s SET %s__tmp=%s;' % (t, key, key),
'ALTER TABLE %s DROP %s;' % (t, key),
'ALTER TABLE %s
Hallo Mariano,
Can you send us a minimal example to reproduce this issue?
I have tried to get a minimal example but when I create a new app and test
it there it works and I could not reproduce the problem. However I cannot
get it to work on my other app which is not that minimal.
I get
Its working after using session.forget(response)
Thank you for your reply.
On Sunday, February 3, 2013 7:45:15 PM UTC+5:30, Anthony wrote:
By default, the session file is locked upon each request, so a new request
from the same client is blocked until the previous request is completed and
First of all I want to thanks the developers. Web2py really makes easier to
develop web apps.
I have been trying to use the HG plugin found
in http://www.web2pyslices.com/slice/show/1433/mercurial-plugin to be able
to update an app using mercurial.
When I access the repo using a browser, I
How can i have a flash message telling the user to check and validate the
link sent to the user email?
without a flash message the users registering for the first time does not
know that an email was sent to his mailbox.
Thank you
--
---
You received this message because you are subscribed
def flash(user): response.flash = Please check your inbox
auth.settings.register_onaccept = flash
On Mon, Feb 4, 2013 at 12:12 PM, António Ramos ramstei...@gmail.com wrote:
How can i have a flash message telling the user to check and validate the
link sent to the user email?
without a flash
db.f_owner._singular = 'Owner'
db.f_owner._plural = 'Owners'
This should do what you ask.
On Sunday, 3 February 2013 20:19:29 UTC-6, Michael Beller wrote:
I can't find any way around this and it looks like this is not the desired
behavior for the grid breadcrumbs. One option is to change my
@Johann, this is not a good solution because ties the import to the
application name.
@Wonton, can you email me your app so I can take a look. What os? what
python version? what web2py version?
On Monday, 4 February 2013 04:47:46 UTC-6, Johann Spies wrote:
But if I do this in default.py:
I need to create a few user accounts as testing fixtures during some unit
tests. How can I do the following via the web2py api?
- create a new user account using Auth
- log that new user in using Auth
- log that user out
- delete that user account (as part of test tear-down)
If I've missed
Look into functional
testing: http://web2py.com/books/default/chapter/29/14?search=webclient
On Monday, 4 February 2013 08:32:49 UTC-6, Ian W. Scott wrote:
I need to create a few user accounts as testing fixtures during some unit
tests. How can I do the following via the web2py api?
-
Ah, perfect! I don't know how I missed that section. Thanks once again,
Massimo.
Ian
On Monday, February 4, 2013 9:34:14 AM UTC-5, Massimo Di Pierro wrote:
Look into functional testing:
http://web2py.com/books/default/chapter/29/14?search=webclient
On Monday, 4 February 2013 08:32:49
Hi Niphlod, I am still trying to understand why the wiki uploads are not
returned as 304.
The function in charged to return either 200 or 304 is
stream_file_or_304_or_206 in streamer.py. Moreover, this function is only
called in globals.py inside stream(...). Please have a look at
globals.py:344,
Hello Web2py.
I haven't update Web2py for long but we are now trying something with
Mongodb using DAL.
What should i expect.
1- How many percent of current web2py queries needed to be re-written.
2- What are supported by Web2py DAL for MongoDB , what are Not (compare to
SQL RDBMS)
3- Any
thank you
2013/2/4 Bruno Rocha rochacbr...@gmail.com
def flash(user): response.flash = Please check your inbox
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an
In the def user() function I have the following lines of code:
if request.args(0)=='login':
form.element(_type='submit').update(_value='Log in')
session.alert='alert-success'
The problem is that when login fails the session.alert should be
'alert-error'
Is there a way to check
It is a new feature and we could use some testing and feedback. ;-)
On Monday, 4 February 2013 08:37:03 UTC-6, Ian W. Scott wrote:
Ah, perfect! I don't know how I missed that section. Thanks once again,
Massimo.
Ian
On Monday, February 4, 2013 9:34:14 AM UTC-5, Massimo Di Pierro wrote:
Make sure you use trunk and not stable with MongoDB.
I think apart for transactions and joins most of the queries should work
although I have not tried it myself.
On Monday, 4 February 2013 08:39:00 UTC-6, Phyo Arkar wrote:
Hello Web2py.
I haven't update Web2py for long but we are now trying
not bad , i will try it out in a week.
Thanks a lot Massimo!
On Monday, February 4, 2013, Massimo Di Pierro wrote:
Make sure you use trunk and not stable with MongoDB.
I think apart for transactions and joins most of the queries should work
although I have not tried it myself.
On Monday, 4
On Monday, February 4, 2013 3:38:29 PM UTC+1, Paolo valleri wrote:
Hi Niphlod, I am still trying to understand why the wiki uploads are not
returned as 304.
The function in charged to return either 200 or 304 is
stream_file_or_304_or_206 in streamer.py. Moreover, this function is only
I thought the same about postponing the opening of the file. Moreover, just
after globals:344 in the stream(...) function I have added
if isinstance(stream, file):
stream_file_or_304_or_206(stream.name,
chunk_size=chunk_size,
I've got a website in wich I want to allow the user some customization.
To prevent my site from injection, I use : {{=XML(markup,sanitize=True)}}
This works perfect, except it doesn't allow the tags 'font' and 'span'.
I know I can override this default behaviour, but I want to know if I
expose
I've changed the user password for my Postgresql database. When I make the
update to the DAL connection string, I then get the following error:
postgresql error ... class 'psycopg2.ProgrammingError'(relation
auth_user already exists)
when going to the site. Notes:
- I've made no other
On Mon, Feb 4, 2013 at 8:41 AM, Johann Spies johann.sp...@gmail.com wrote:
Hallo Mariano,
Can you send us a minimal example to reproduce this issue?
I have tried to get a minimal example but when I create a new app and test
it there it works and I could not reproduce the problem. However
On 1 Feb 2013, at 12:18 PM, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
You could also edit request.controller, request.function, and request.args
(if appropriate) in your model, if you're not using controller-specific
models at least.
I could see adding a case-normalizing option
Honestly I would like to refactor all this logic in web2py. It was already
done for web3py:
https://github.com/mdipierro/web3py/blob/master/web3py/stream.py
Anyway, if you can help fix it in web2py, we can merge everything later
Massimo
On Monday, 4 February 2013 11:46:03 UTC-6, Paolo valleri
You will be fine. SPAN should be there by default. It is not and that is an
oversight. FONT is not there because deprecated tag.
On Monday, 4 February 2013 12:06:42 UTC-6, Martijn Hermans wrote:
I've got a website in wich I want to allow the user some customization.
To prevent my site from
I would gladly accept if anyone else could provide me web2py application
with same spesifications as this shootout had. I would do it myself but it
is unfair for web2py (I'm just getting to know it) if I would do it and
test it with other frameworks :)
On Sunday, February 3, 2013 12:08:50 AM
Hey,
I don't know if this is relevant but I'm using webfaction with their wiki's
install script.
I was wondering what's the easy way to make the new Scheduler run
automatically when my application reboots.
Thanks
--
---
You received this message because you are subscribed to the
(a) Because when you changed the DAL connection string, web2py thinks it
might be a new database and tries to recreate the tables from scratch.
(b) You could try:
db = DAL(...,fake_migrate_all=True)
run the app and, if successful, then:
db = DAL(...,fake_migrate_all=False)
But read the
I had been having critical memory overflow problems and finally saw a post
about a memory leak in the version I was using (2.1.x) so I have updated to
the latest stable version (2.3.2), however I am still seeing my memory
climb until the machine crashes.
I'm using web2py as my interface which
To further elaborate. I am running my web2py instance on a VPS at
dreamhost.com with a memory allocation of 4Gig. It is running under
passenger.
On Monday, February 4, 2013 12:16:38 PM UTC-8, pumplerod wrote:
I had been having critical memory overflow problems and finally saw a post
Hi web2py users,
I've been using web2py for a few months now, thank you to the developers
for the great work.
I'm working on an interactive web based monitoring and control
Application that communicates with ~30 mobile field units at a time to get
periodic 'semi-realtime' status reports
This was my previous comment:
https://github.com/seedifferently/the-great-web-framework-shootout/issues/14
Notice that some of the frameworks are using native sqlite api and some are
using ORMs. A comparison is difficult.
On Monday, 4 February 2013 13:26:14 UTC-6, OJ wrote:
I would
Pretty cool. I just started working on something like this last week. My
goal was to process CSV files client side though, without having to use
Web2py's csv parser (it's good, but not good enough for some of my files).
This is a good javascript CSV parser that does meet RFC 4180 specs.
Hey Thanks Massimo!
I didn't notice that one, sorry! I have to be careful, I know. I'll try to
rule out (or measure) all possible moving parts. I fell in love with DAL
therefore I took web2py to my agenda to do in 2013 in the first place. All
other features has stunned me ever since I've moved
Uhm, I was just thinking to return a string instead of the open stream.
attached the patch (some refactoring bits added)
@Paolo: turns out that wiki has it's own download() function to handle
files . in order to return cache headers you should do:
def yourwikiindex():
zero =
Worked perfectly - thanks.
On Monday, February 4, 2013 8:08:47 PM UTC, Limedrop wrote:
(a) Because when you changed the DAL connection string, web2py thinks it
might be a new database and tries to recreate the tables from scratch.
(b) You could try:
db = DAL(...,fake_migrate_all=True)
Well, depends on the MFUs I guess. I would probably bypass web2py for this
and simply use a javascript based polling reader based on websockets. Of
course, you'd have to have a websockets enabler on all the MFUs
Is there any reason why you'd use a database for this? If all you are
looking for
Thanks Derek,
There is a second requirement that is not realtime based, but
I omitted that because the challenges are not as tricky.
The workstation has a database to manage historical data and keep
configuration information for the field units (GPS location, IP address
etc.), but also has
I already use the Singular and Plural properties for the table but the grid
breadcrumbs don't appear to use them. Also, the breadcrumb uses the field
name (f_owner) and not the label (Owner).
Here is my model ...
db.define_table('t_owner',
Field('f_name', type='string', label=T('Name')),
I think the problem is with the open(), i'm not sure that works at all on
GAE, and/or the path to the file is not what you expect. I'm not sure how
to pragmatically insert an image into the datastore.
On Sunday, February 3, 2013 1:30:20 AM UTC-8, Sebastian Cambeo wrote:
OK, I created a
Hello all,
I have a view that looks like this:
*studiomaster/index.html*
{{extend 'layout.html'}}
div id=studiochart class=single-chart/div
{{=LOAD('studiomaster', 'grid.load', ajax=True, target='grid',
content='Loading...')}}
The grid function returns a SQLFORM.grid - after filling in the
http://stackoverflow.com/questions/12132947/change-default-delimiters-in-ember-js/14697027#14697027
If you don't want to change any delimiters (on web2py or in
handlebarshttp://handlebarsjs.com/)
you can do it by saving the handlebars template in an external file like *
people.hbs* in the
I did not find it myself the first time I looked. ;-)
Notice I used sqlite api and not DAL to comare with bottle and flask where
the examples also use the sqlite api instead of SQLA.
On Monday, 4 February 2013 15:04:07 UTC-6, OJ wrote:
Hey Thanks Massimo!
I didn't notice that one, sorry! I
In trunk!
On Monday, 4 February 2013 15:05:05 UTC-6, Niphlod wrote:
Uhm, I was just thinking to return a string instead of the open stream.
attached the patch (some refactoring bits added)
@Paolo: turns out that wiki has it's own download() function to handle
files . in order to
I see. You are right. I think I now fixed it in trunk. Can you please check
it?
On Monday, 4 February 2013 16:28:25 UTC-6, Michael Beller wrote:
I already use the Singular and Plural properties for the table but the
grid breadcrumbs don't appear to use them. Also, the breadcrumb uses the
Hi All,
Just a question regarding the smartgrid.
I was wondering is there anyway to change the layout and format of the
smartgrid.
For example if I wanted to change the spacing I have for each row or add
verticle lines to separate the columns. Ideally what I'm trying to achieve
is have the
Ahh. Works wonderful now. Thanks
On Wednesday, January 30, 2013 5:02:16 PM UTC-8, Massimo Di Pierro wrote:
I think
db[form.vars.table].import_from_csv_file(request.vars.csvfile)
should be
db[form.vars.table].import_from_csv_file(request.vars.csvfile.file)
On Wednesday, 30 January 2013
See http://web2py.com/books/default/chapter/29/10#Generic-views. The
framework disables generic views by default, though in db.py of the
scaffolding app, they are enabled on localhost only. Set
response.generic_patterns to enable generic.load when needed.
Anthony
On Monday, February 4, 2013
yes it does work ok GAE ;)
I am using currently the following workaround, but this should obviously be
handled by web2py and not by me, so please fix this:
file = open('test.jpg', 'rb')
tmpId = db.table1.insert(image = file)
if request.env.web2py_runtime_gae:
niphold, what do you mean when you say opening directly the URL that fails?
On Thursday, January 31, 2013 1:10:18 AM UTC-8, Niphlod wrote:
did you try opening directly the url that is failing through ajax ? that
404 could be originated by an incorrect/mispelled url.
On Thursday, January 31,
Any way we can add this?
http://code.google.com/p/pypyodbc/
It's a pure python implementation of pyodbc. I've tested it with pypy1.9 on
web2py 2.3.2 and it works fine (yes, I edited dal.py and renamed all
instances of pyodbc to pypyodbc).
--
---
You received this message because you are
Hello everybody!
I got to install web2py in Hostgator following this instructions:
https://groups.google.com/forum/?fromgroups=#!topic/web2py/h8uLiDCerx0
The website made with web2py works very well (http://www.transicion.mx).
But I have to serve also php pages (especifically a joomla site).
As a more complete test I did 3 things...
1) replicated what my function through web2py was doing in a separate
script and ran that thousands of times on the same server. This did not
severely impact memory usage.
2) set up a web2py function in my controller to simply return a json
obect.
Thank you - the breadcrumb now displays the field Label but I found another
issue with the breadcrumbs ...
I start with an action manage_owners that returns a smartgrid for
t_owner. If I select the View button for the first owner, e.g. Joe, I
get the following link:
Thanks Anthonyit worked
On Sunday, February 3, 2013 7:46:18 PM UTC+5:30, Anthony wrote:
See answer to similar issue here:
https://groups.google.com/d/msg/web2py/a8Ovzh__x9o/_d7rckBpg9QJ
Anthony
On Sunday, February 3, 2013 5:54:00 AM UTC-5, Apoorve Mohan wrote:
Hi
I am firing Ajax
Just an update.
Since I often fall behind in keeping the openshift template up to date with
web2py releases, I've automated the process with an openshift jenkins
gear: https://jenkins-genome.rhcloud.com/
Now the OpenShift_Web2py_Build job will check for changes committed to
web2py github
On 5 February 2013 01:06, Jack jackzhen...@gmail.com wrote:
Hi All,
Just a question regarding the smartgrid.
I was wondering is there anyway to change the layout and format of the
smartgrid.
For example if I wanted to change the spacing I have for each row or add
verticle lines to separate
I am a bit pressed for time right now, but will try and help you debug this
when I can. I have marked your email on my to-do-list.
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
--
---
You received this message
61 matches
Mail list logo