[web2py] Jessica McKellar talking about windows and the future of Python

2013-09-12 Thread Bruno Rocha
a good job working on windows*, any other framework has too many problems to run on windows. So web2py is helping to build the future of Python! -- *Bruno Rocha - @rochacbruno* http://github.com/rochacbruno http://rochacbruno.com.br http://pythonhub.com -- Resources: - http://web2py.com - http

[web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread Bruno Rocha
and medical treatments, I tried but I really have no time now to develop this. If anybody can take this, please email me ans I give you access to the development version of the code on pythonanywhere. Thanks. []'s --- Bruno Rocha http://github.com/rochacbruno http://rochacbruno.com.br http

[web2py] Spammers on web2pyslices.com

2013-06-14 Thread Bruno Rocha
post form? I am in a rush between work and medical treatments, I tried but I really have no time now to develop this. If anybody can take this, please email me ans I give you access to the development version of the code on pythonanywhere. Thanks. []'s --- Bruno Rocha http://github.com

Re: [web2py] how to start Celery worker in web2py

2013-03-06 Thread Bruno Rocha
I also would like to see Celery, Solr, Elastic Search and other fantastic tools working with web2py! I think this is an important issue and I am sure it is completely easy and possible to make it. I personally do not like to use the built-in scheduler, so I am using python-rq (Redis Queue) for

Re: [web2py] Re: custom function decorators

2013-02-27 Thread Bruno Rocha
Your decorator is wrong this def check_mod_set_active(callee): if session.active_mod == None: session.flash = 'No active module selected.' redirect(URL('mod', 'index')) else: return callee shoud be def check_mod_set_active(callee): def wrapper(): if

Re: [web2py] Re: Web2py without fancy wizzard

2013-02-27 Thread Bruno Rocha
Hello world from scratch download web2py and unzip it. create a new app folder web2py/applications/*hello* create a model file web2py/applications/hello/*models/model.py * # coding: utf-8 from gluon.tools import Auth db = DAL(sqlite://hello.db) auth = Auth(db) auth.define_tables()

Re: [web2py] Re: command line question

2013-02-21 Thread Bruno Rocha
after you untar it do a: chown -R user:group web2py/applications -- --- 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 email to web2py+unsubscr...@googlegroups.com. For

Re: [web2py] Performance issues while opening webpage with more than 1 lakh records.....

2013-02-21 Thread Bruno Rocha
what is your database engine? we need to see if the bottleneck is in database side. Place a {{=response.toolbar()}} in your view and paste here the generated SQL and timings. Are you using pagination? how many per page? even with 100.000 records, the grid should use an offset to limit the

Re: [web2py] User Management Backoffice

2013-02-18 Thread Bruno Rocha
You can customize the web2admin https://github.com/rif/web2admin -- --- 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 email to web2py+unsubscr...@googlegroups.com. For

Re: [web2py] Removing HTML TAGS

2013-02-18 Thread Bruno Rocha
http://stackoverflow.com/questions/9662346/python-code-to-remove-html-tags-from-a-string -- --- 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 email to

Re: [web2py] Validator: {Validator1 OR validator2} - Can I get that requires on a Field?

2013-02-15 Thread Bruno Rocha
Great idea Anthony, CUSTOM can be used in many ways when a builtin validator does not match the requirements. I documented this here: http://rochacbruno.com.br/more-web2py-custom-validators/ @Massimo Can we include at least the CUSTOM in gluon.validators ? -- --- You received this message

Re: [web2py] Validator: {Validator1 OR validator2} - Can I get that requires on a Field?

2013-02-15 Thread Bruno Rocha
Cool! but it does not allow the transformation. class CUSTOM(object):you can use a function or a lambda to validate or/and transform the field in the way you wantit is the same as onvalidation and onsuccess form callbacksbut it can be used per field in models or controller level

Re: [web2py] field of password type is displayed as cleartext in smartgrid form

2013-02-15 Thread Bruno Rocha
You should apply the CRYPT() validator when storing the password -- --- 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 email to web2py+unsubscr...@googlegroups.com. For

Re: [web2py] Validator: {Validator1 OR validator2} - Can I get that requires on a Field?

2013-02-14 Thread Bruno Rocha
class ANY(object): def __init__(self, validators): self.validators = validators def __call__(self, value): # validates the value against each validator results = [validator(value) for validator in self.validators] # Check if there is an invalid result

Re: [web2py] Validator: {Validator1 OR validator2} - Can I get that requires on a Field?

2013-02-14 Thread Bruno Rocha
I guess the first one is wrong.. to amtch your criteria I think you need this class ANY(object): def __init__(self, validators): self.validators = validators def __call__(self, value): # validates the value against each validator results = [validator(value)[1]

Re: [web2py] Validator: {Validator1 OR validator2} - Can I get that requires on a Field?

2013-02-14 Thread Bruno Rocha
Finally, I just testes on the shell *modules/anyvalidator.py* class ANY(object): def __init__(self, validators): self.validators = validators def __call__(self, value): # validates the value against each validator results = [validator(value)[1] for validator in

Re: [web2py] Validator: {Validator1 OR validator2} - Can I get that requires on a Field?

2013-02-14 Thread Bruno Rocha
It gives me the idea of a CUSTOM validator class CUSTOM(object): def __init__(self, function): self.function = function def __call__(self, value): # the function should return the error_message or None return(value, self.function(value)) So the use should be:

Re: [web2py] Date null display

2013-02-14 Thread Bruno Rocha
A(value.strftime(%d/%m/%Y)) Em 15/02/2013 05:01, Simon Ashley gregs...@gmail.com escreveu: Traditionally in other field types you could display a null value with an expression similar to the following: db.table.datefield.represent = lambda value, row: A(value) if value else 'unknown'

Re: [web2py] Re: Converting Field of a SQLFORM.grid to local timezone of a user.....

2013-02-11 Thread Bruno Rocha
I am on mobile now and I cant ellaborate a good code example, but I can give you a hint. db.table.datefield.represent = lambda value, row : value.strftime(%Y/%m/%d) grid = SQLFORM.grid(db.table) so grid will use the represent callback to display the data. following this example you can do def

Re: [web2py] Re: How to have a single user application

2013-02-10 Thread Bruno Rocha
models/db.py db = DAL(.) from gluon.tools import Auth auth = Auth(db).define_tables() # if forst time running create the new user if db(db.auth_user).isempty(): password = CRYPT()(12345)[0] db.auth_user.valdiate_and_insert(first_name=default,

Re: [web2py] Re: SQLite tables not recognised in web2py; even when web2py created them?

2013-02-09 Thread Bruno Rocha
of the standard I require 3 additional tables + a user table. So how do you propose I manage this scenario? On Sat, Feb 9, 2013 at 6:26 PM, Bruno Rocha rochacbr...@gmail.com wrote: Usually you create a script file in /models/db.py then you define your tables there, so when starting in shell mode you

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread Bruno Rocha
Use this one = https://github.com/rif/web2admin -- --- 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 email to web2py+unsubscr...@googlegroups.com. For more options, visit

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread Bruno Rocha
I already suggested in a ticket = https://code.google.com/p/web2py/issues/detail?id=1103 -- --- 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 email to

Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread Bruno Rocha
It needs more tests and contributions... OPen an issue on github and I am sure we can solve this.. On Fri, Feb 8, 2013 at 5:38 PM, Derek sp1d...@gmail.com wrote: It shouldn't be the default because it doesn't work for everyone (at least, it doesn't work for me) class

Re: [web2py] Star Rating

2013-02-08 Thread Bruno Rocha
https://github.com/mdipierro/web2py-recipes-source/blob/master/apps/04_advanced_forms/web2py.app.star_rating.w2p?raw=true On Fri, Feb 8, 2013 at 8:52 PM, Michael Gheith gheit...@aol.com wrote: Hello web2py community :) I'm trying to implement a simple star rating for my site. I followed the

Re: [web2py] Re: SQLite tables not recognised in web2py; even when web2py created them?

2013-02-08 Thread Bruno Rocha
Usually you create a script file in /models/db.py then you define your tables there, so when starting in shell mode you pass -M python web2py.py -S yourapp -M -M run the models/* files and defines your table as object for you to access. Every framework works in this way. Optionally, you can

[web2py] Real Python for Web Development, featuring web2py

2013-02-05 Thread Bruno Rocha
Take a look: http://www.kickstarter.com/projects/1369857650/real-python-for-web-development-featuring-web2py Why Web2py? web2py is an open-source web framework for rapid development. You can get up in running in less than 10 minutes and build a full-featured application in under an hour. Much

Re: [web2py] mosql

2013-02-05 Thread Bruno Rocha
Looks awesome.. I already used the Mongo Data Wrapper ( https://github.com/citusdata/mongo_fdw) to replicate my Postgres data to Mongo, I will take a closer look on this. Thanks for sharing. -- --- You received this message because you are subscribed to the Google Groups web2py-users

Re: [web2py] requires _ verification = True , no Flash?

2013-02-04 Thread Bruno Rocha
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

Re: [web2py] Re: Pattern to run async proccess

2013-02-02 Thread Bruno Rocha
You can also use Redis Queue http://rochacbruno.com.br/web2py-and-redis-queue/ -- --- 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 email to

Re: [web2py] web2py IDEs; maintain a wiki with plugins?

2013-02-01 Thread Bruno Rocha
WingIDE is the only one that I used and worked out of the box without the need of hacks or plugins. On Fri, Feb 1, 2013 at 2:37 PM, Alec Taylor alec.tayl...@gmail.com wrote: Can we bring up a community wiki page for this? For editing web2py apps, I have personally used: Eclipse, Geany,

Re: [web2py] DAL and MySQL indexing

2013-01-31 Thread Bruno Rocha
Since you have the indexes created on DB backend, The DAL will use this for any query on that table, because the output of .select() is in fact a pure SQL statement. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this

Re: [web2py] sending mail to multiple clients

2013-01-30 Thread Bruno Rocha
I would use sendgrid.com and its awesome newsletter API, alsoi sendgrid takes care of spamming protection. I wrote an module to interact with send grid through the API https://github.com/rochacbruno/pysendgrid But if you really want to use your own structure you should have a table with email,

Re: [web2py] embed image from variable

2013-01-29 Thread Bruno Rocha
I guess you can try {{=IMG(_src=plotimg)}} or img src={{=plotimg}} / -- --- 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 email to

Re: [web2py] Re: Open generated file from action function

2013-01-29 Thread Bruno Rocha
I think the problem may be the session preventing the duplicate submission of the same form data. -- --- 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 email to

Re: [web2py] Interesting about JSON license...

2013-01-29 Thread Bruno Rocha
“The Software shall be used for Good, not Evil.” I like it! we should adopt it in web2py. The problem is to difference what is good from what is Evil so I think this license has no meaning. -- --- You received this message because you are subscribed to the Google Groups web2py-users group.

Re: [web2py] Re: How do I import `gluon.dal` from Python shell?

2013-01-28 Thread Bruno Rocha
Is there the option to put the gluon folder on your site-packages or dist-packages folder Or maybe, start web2py in shell mode? --

Re: [web2py] Re: web2py world conference 2013

2013-01-28 Thread Bruno Rocha
I think it is ok to have different dates on each places. Each country/place can do in preferred data since it is in the same week. Lets say: place_here - May 16 (Thu) place_here - May 17 (Fri) Chicago - May 18 (Sat) Brasil - May 19 (Sun) Of course we can have more than one place at the same

Re: [web2py] Required Field Error.

2013-01-26 Thread Bruno Rocha
is it SQLite? did you changed required from True to False? SQLite does not have ALTER for column type and constraints. Em 26/01/2013 10:04, __pyslan__ - Ayslan Jenken ayslan.pyt...@gmail.com escreveu: My models: LogrType = db.define_table('logr_type', Field('name', notnull=False,

Re: [web2py] Re: looking for volunteers to help proof-read book 5th ed.

2013-01-26 Thread Bruno Rocha
I think both are bad! specially by the fact that the largest web2py audience is not native English speaker, this kind of sentence should be more explicit. web2py takes care of main security issues, so developers have little... --

Re: [web2py] Many to Many relation

2013-01-26 Thread Bruno Rocha
I can think on two options. *1. Unique Key* db.define_table(table, Field(table_a, reference table_a), Field(table_b, reference table_b), Field(unikey, unique=True, notnull=True, compute=lambda row: %(table_a)s-%(table_b)s % row) ) *2. Form validator* def check_unique(form): if

Re: [web2py] Many to Many relation

2013-01-26 Thread Bruno Rocha
the grid has onvalidation argument. SQLFORM.grid(..., onvalidation=check_unique) --

Re: [web2py] Re: writing build scripts for web2py

2013-01-26 Thread Bruno Rocha
Go to admin interface and click in Pack All: it generates a .w2p package. Or just go to your shell and $tar -cvf myapp.tar.gz /path/to/my/app If you want some more specific package system maybe it is better to put your app in github and use Fabric, Puppet, Cheff, BUildout or other tools like

Re: [web2py] get new user's email and data

2013-01-24 Thread Bruno Rocha
def myfunc(form): # here you get form.vars auth.settings.register_onaccept = myfunc Em 24/01/2013 06:24, Yebach vid.og...@gmail.com escreveu: Hello After a new user registers, I would like to send his data to my email (user email and database where it was created) I have user requires

Re: [web2py] get new user's email and data

2013-01-24 Thread Bruno Rocha
auth.setting.register_onaccept = lambda form: mail.send(to=['x...@xxx.net'], subject='web2py registration', # If reply_to is omitted, then mail.settings.sender is used reply_to='u...@example.com', message= u'A new user has been created on database %s and has

Re: [web2py] Re: automatic email when registration_requires_approval =True

2013-01-24 Thread Bruno Rocha
auth.settings.verify_email_onaccept = lambda user: mail.send(to='antonio.ra...@cires.pt',subject='Conta pendente de Aprovação. Portal Empreiteiros',message=repr(user)) --

Re: [web2py] Re: automatic email when registration_requires_approval =True

2013-01-24 Thread Bruno Rocha
auth.settings.verify_email_onaccept = lambda USER: mail.send(to='antonio.ra...@cires.pt',subject='Conta pendente de Aprovação. Portal Empreiteiros',message=repr(USER)) --

Re: [web2py] update easy_install

2013-01-24 Thread Bruno Rocha
The web2py on PyPi should be a meta-package, in setup.py it should download the latest version from website and include on users site-package. --

Re: [web2py] update easy_install

2013-01-24 Thread Bruno Rocha
On Thu, Jan 24, 2013 at 9:34 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: How? http://peak.telecommunity.com/DevCenter/setuptools#automatic-script-creation --

Re: [web2py] How to put both login and register forms on one page...

2013-01-23 Thread Bruno Rocha
return dict(register=auth.register() , login=auth.login()) {{=register}} {{=login}} Em 23/01/2013 20:39, sasogeek sasog...@yahoo.com escreveu: how do I put the login and register forms on one page... so that a user is logged in if they click the login button (if they've entered correct email

Re: [web2py] Re: web2py best practices/patterns

2013-01-22 Thread Bruno Rocha
On Tue, Jan 22, 2013 at 3:09 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Does Model Less approach still relevent with the new lazy table feature?? No need to use this module based approach (unless you want), now with lazy_tables it is better to use the standard ways to avoid extra

Re: [web2py] Re: Help on Unit Tests

2013-01-22 Thread Bruno Rocha
Issues page on google code: https://code.google.com/p/web2py (issues menu) Develpers list: web2py-developers on google group --

Re: [web2py] Help Query speed

2013-01-22 Thread Bruno Rocha
maybe the virtual fields? --

Re: [web2py] How to automatically send emails to users if they perform an action like sign up...

2013-01-21 Thread Bruno Rocha
in your models. mail = auth.settings.mailer mail.settings.server = your_smtp_server_and:port mail.settings.sender = y...@you.com mail.settings.login = y...@you.com:password # sends an verification e-mail upon registration auth.settings.registration_requires_verification = True def

Re: [web2py] is bug? sqlform.factory

2013-01-21 Thread Bruno Rocha
IS it SQLITE? Sqlite dos not implements ALTER TABLE for column properties, if you created the model with n length and so changed it later, sqlite does not respect this. It is a sqlite problem. *if another database, so can be a dal problem On Mon, Jan 21, 2013 at 11:43 AM, www.diazluis.com

Re: [web2py] Re: is bug? sqlform.factory

2013-01-21 Thread Bruno Rocha
I think the max is the first because you can ommit the second. IS_LENGTH(10) will allow max 10. No need to inform the second. But I agree this is odd. --

Re: [web2py] Form with fields collected from javascript

2013-01-21 Thread Bruno Rocha
include hidden fields hidden id=customer name=customer the use Javascript to populate $('#customer').val(something) --

Re: [web2py] Form with fields collected from javascript

2013-01-21 Thread Bruno Rocha
SQLFORM expects a field named fences_customer the pattern is tablename_fieldname --

Re: [web2py] Help on Unit Tests

2013-01-21 Thread Bruno Rocha
There is no official approach, testing is being an issue for a long time, there was a project called web2py test runner, but the maintainer abandoned the project. If you can contribute with something on this subject, your contribution will be very welcome. The main problem of testing is the fact

Re: [web2py] How I can use code tag with Markmin?

2013-01-21 Thread Bruno Rocha
`` htmlbodyHello World/body/html ``:code_html `` print hello world ``:code_python On Tue, Jan 22, 2013 at 1:50 AM, Ignacio Ocampo naf...@gmail.com wrote: How I can use code tag with Markmin? Thank you. -- --

Re: [web2py] How I can use code tag with Markmin?

2013-01-21 Thread Bruno Rocha
`` Your code here `` for testing: http://web2py.com/markmin --

Re: [web2py] How I can use code tag with Markmin?

2013-01-21 Thread Bruno Rocha
for this I thinnk you sould use extra render. {{text = `` here is my code ``:pre_with_code}} {{=MARKMIN(text, extra={pre_with_code: lambda text: precode{0}/code/pre.format(text)})}} Tested on shell In [4]: text = `` here is my code ``:pre_with_code In [5]: print MARKMIN(text,

Re: [web2py] Re: PowerFormWizard 0.1.4 - Bug Fixes and auto_validation (+ a new plugin for grids)

2013-01-20 Thread Bruno Rocha
Ok, problem fixed Updated here: https://bitbucket.org/rochacbruno/powerformwizard/downloads Live example here: http://www.web2pyslices.com/formwizard --

Re: [web2py] Storing Python code in db?

2013-01-19 Thread Bruno Rocha
http://docs.python.org/2/library/pickle.html http://python.about.com/od/pythonstandardlibrary/a/pickle_intro.htm --

Re: [web2py] unable to drop table

2013-01-19 Thread Bruno Rocha
Is it the web shell? (if yes, its buggy) --

Re: [web2py] Re: PowerFormWizard 0.1.4 - Bug Fixes and auto_validation (+ a new plugin for grids)

2013-01-19 Thread Bruno Rocha
://labs.blouweb.com/PowerGrid Need help, contribution, test.. []'s -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno** ] -- --

Re: [web2py] Specify my own controller for @auth.requires_login()

2013-01-18 Thread Bruno Rocha
auth = Auth(db, controller=foo, function=bar) --

Re: [web2py] If I upload a file manually does it check the validators?

2013-01-18 Thread Bruno Rocha
db.files.validate_and_insert(file_upload=db.files.file_upload.store(fileApp, filename)) it should fire the validator (I guess) --

Re: [web2py] displaying and editing joined tables

2013-01-18 Thread Bruno Rocha
There is this Slice: https://www.web2pyslices.com/slice/show/1427/single-form-for-linked-tables --

Re: [web2py] HOSTING FOR web2py ?

2013-01-18 Thread Bruno Rocha
webfaction openshift linode --

Re: [web2py] HOSTING FOR web2py ?

2013-01-18 Thread Bruno Rocha
BTW: PythonAnywhere is fantastic! the consoles, the way it integrates with Dropbox etc... the support also is very helpful. Have you tried to contact them? https://www.pythonanywhere.com/ (click on the send feedback link) maybe the guys can give you an option instead of paypal. On Sat, Jan

Re: [web2py] Trying to do a new database as a field in web2py,

2013-01-17 Thread Bruno Rocha
On Thu, Jan 17, 2013 at 5:39 AM, damien rompapas hlvro...@gmail.com wrote: I am sorry if the question is not clear enough. Yes it is not clear :) are you trying to create a table inside a table? it is not permitted on relational dbms. (are you using NOSQL)? I think you want to create

Re: [web2py] Trying to do a new database as a field in web2py,

2013-01-17 Thread Bruno Rocha
Wow, Now I see my example completely wrong.. should be db.define_table('post', # more fields here Field('thoughts', reference Thoughts) ) db.define_table('Thoughts', Field('Editedby', db.auth_user, default=None, readable=True, writable=True),

Re: [web2py] how to create a counter button...

2013-01-17 Thread Bruno Rocha
Did you read the book? I recommend chapters 3, 4 and 6 Plus the Ajax one: http://web2py.com/books/default/chapter/29/11 --

Re: [web2py] editing database entry

2013-01-17 Thread Bruno Rocha
controllers/article.py #http://./article/add def add(): form = SQLFORM(db.article).process() return dict(form=form) #http:///article/edit/1 def edit(): article_id = request.args(0) or redirect(URL('index')) form = SQLFORM(db.article, article_id).process() return

Re: [web2py] how to create a counter button...

2013-01-16 Thread Bruno Rocha
models/foo.py # the thing table db.define_table(thing, Field(name)) # you may want to store likes on another table so you never allow a user to like the same thing twice db.define_table(thing_likes, Field(user, reference auth_user, notnull=True), Field(thing, reference thing,

Re: [web2py] why is my \n not working

2013-01-16 Thread Bruno Rocha
printing where? on the console it should work! ON web response you need to use HTML or CSS to break {{=variable_returned_by_controller}} br / or def action(): string = ( Line 1 br Line 2 br ) return string or even better if you define in a template and use p, br

Re: [web2py] Set up of db.py takes too long time

2013-01-15 Thread Bruno Rocha
On Tue, Jan 15, 2013 at 6:20 AM, Daniel Gonzalez gonva...@gmail.com wrote: IS_NOT_IN_DB(db, '%s.email' % (web2py_user_table)) If you too many records on user table, the above code will take a long time, because on every request it will select email from auth_user --

Re: [web2py] Set up of db.py takes too long time

2013-01-15 Thread Bruno Rocha
It will run only when called! But if he is testing a form, the problem maybe there. There are some imports? --

Re: [web2py] output goes to wrong place

2013-01-15 Thread Bruno Rocha
You need to write to response {{=crud.select(db.HumanLanguage, fields=['languageName'], headers={'HumanLanguage.languageName': 'Language Name'})}} or {{response.write(crud.select(db.HumanLanguage, fields=['languageName'], headers={'HumanLanguage.languageName': 'Language Name'}))}} --

Re: [web2py] help with ckeditor?

2013-01-14 Thread Bruno Rocha
web2pyslices source code: https://github.com/rochacbruno/Movuca Ckeditor module https://github.com/rochacbruno/Movuca/blob/master/modules/plugin_ckeditor.py Ckeditor static files https://github.com/rochacbruno/Movuca/tree/master/static/plugin_ckeditor The plugin

Re: [web2py] Running some code at the end of the request

2013-01-11 Thread Bruno Rocha
I think that for doing this you should modify response.render to a specialized function. def my_response_render(*args, **kwargs): # here you have to implement what you need # and then do the normal response.render in models/db.py response.render = my_response_render In that way

Re: [web2py] Re: Add a WHERE clause to every request

2013-01-11 Thread Bruno Rocha
for table in db.tables: db[table]_common_filter = lambda query: db[table]is_active == True --

Re: [web2py] Re: Add a WHERE clause to every request

2013-01-11 Thread Bruno Rocha
little fix. On Fri, Jan 11, 2013 at 3:21 PM, Bruno Rocha rochacbr...@gmail.com wrote: for table in db.tables: db[table]._common_filter = lambda query: db[table].is_active == True --

Re: [web2py] External css

2013-01-11 Thread Bruno Rocha
put in web2py/applications/YOURAPP/static/css/yourcssfile.css refer with link href={{=URL('static', 'css', args='yourcssfile.css')}} ../ --

Re: [web2py] Chicago Job

2013-01-11 Thread Bruno Rocha
I understood as 1 or 2 devs... or it is a half time developer? --

Re: [web2py] Chicago Job

2013-01-11 Thread Bruno Rocha
Maybe a developer who read 1/2 of the web2py book :) LOL --

Re: [web2py] Hierarchical Database Selection

2013-01-11 Thread Bruno Rocha
On Fri, Jan 11, 2013 at 9:05 PM, Dave Cenker dave.cen...@gmail.com wrote: However, this returns a list of company IDs instead of names and when I try to do something like this: db(train.company.id == id) it doesn't work. should be db(db.train.company == is) What I'd really like to do is

Re: [web2py] how to give forms a class

2013-01-11 Thread Bruno Rocha
form['_class'] = 'foo' it should work or even form.elements('form')[0]['_class'] = 'foo' --

Re: [web2py] Report bug to app admin

2013-01-10 Thread Bruno Rocha
Are you suggesting have a form for end users submit tickets for app developer or inside /admin have a form for app developer submit a ticket to web2py developers ? --

Re: [web2py] How to call a function from a web page

2013-01-10 Thread Bruno Rocha
On Thu, Jan 10, 2013 at 10:30 PM, Alex Glaros alexgla...@gmail.com wrote: *views/default/mytable_manage.html* look in controllers/default.py inside this file there is a function called mytable_manage --

Re: [web2py] How to call a function from a web page

2013-01-10 Thread Bruno Rocha
Please read the chapter 3 and 4 (overview and the core) those things will be very clear after you read few lines. http://web2py.com/books/default/chapter/29/03#Overview On Thu, Jan 10, 2013 at 10:50 PM, Alex Glaros alexgla...@gmail.com wrote: The index.html page doesn't have much in it...so

Re: [web2py] About web2py videos and stuff

2013-01-09 Thread Bruno Rocha
I create some videos! (currently I have 308 web2py videos on my VIMEO account) But, it is all in Portuguese and major part of them are exclusively for my students. +1 for a video contest! Example of my on line web2py classes. A complete introduction to web

Re: [web2py] SQLFORM question

2013-01-09 Thread Bruno Rocha
On Thu, Jan 10, 2013 at 3:09 AM, b00m_chef roman.goldm...@gmail.com wrote: requires=IS_IN_DB(*db(db.owner.user == auth.user.id)*, 'owner.id', '%(name)s') --

Re: [web2py] Re: Resizing a user uploaded image

2013-01-08 Thread Bruno Rocha
I am using this recipe: http://www.web2pyslices.com/slice/show/1522/generate-a-thumbnail-that-fits-in-a-box I have plans to integrate it with a JavaScript Cropper plugin to get the dimensions. --

Re: [web2py] Re: Resizing a user uploaded image

2013-01-08 Thread Bruno Rocha
on the impressive *magick libraries, but this one being a ctypes implementation is light and fast enough.. mic 2013/1/8 Bruno Rocha rochacbr...@gmail.com: I am using this recipe: http://www.web2pyslices.com/slice/show/1522/generate-a-thumbnail-that-fits-in-a-box I have plans to integrate

Re: [web2py] Re: problem with multiple processes with uwsgi and web2py

2013-01-08 Thread Bruno Rocha
I have a single server, ubuntu 12.04 running 3 web2py instances + 2 php wordpress websites Php runs with fcgi - web2py runs with uwsgi, because of that I have 12 nginx workers running I am not an expert on this, but this solution is working well for me. That is what I have in top *TOP* top -

Re: [web2py] Re: problem with multiple processes with uwsgi and web2py

2013-01-08 Thread Bruno Rocha
and youi delete or comment that file? --

Re: [web2py] Re: problem with multiple processes with uwsgi and web2py

2013-01-08 Thread Bruno Rocha
Ok, but just read this # User-made changes in this file will be silently lost, as it is silently # rewrited with upgrade of uwsgi package. # # If you want to change default options of uWSGI daemon, then: # * copy this file somewhere # * add/remove/change options in copied file # * edit

Re: [web2py] Re: Resizing a user uploaded image

2013-01-08 Thread Bruno Rocha
are you running on Google App Engine? --

  1   2   3   4   5   6   7   8   9   10   >