Re: [web2py] Re: web2py, amazon ec2 and static pages outside of the application

2011-12-08 Thread José Luis Redrejo Rodríguez
2011/12/8 Marco Tulio Cicero de M. Porto : > I was wondering if there was any configuration on Apache that could help on > that, so that I could set the php application on www root and the web2py > applications on www-data ... > That's exactly what explains the recipe http://www.web2pyslices.com/

[web2py] Re: Where is the best place to make e-mail by registration and login to be converted always to lower case?

2011-12-08 Thread Anthony
Not sure why that's not working. Regarding IS_LOWER not working for login, I think the problem might be that the login() function temporarily replaces the username field's 'requires' with just an IS_EMAIL validator. Anthony On Friday, December 9, 2011 1:23:22 AM UTC-5, Constantine Vasil wrote:

[web2py] Re: Where is the best place to make e-mail by registration and login to be converted always to lower case?

2011-12-08 Thread Constantine Vasil
OK - this is working auth.settings.login_onvalidation = login_email_lower current.app.auth = auth form=current.app.auth.login(next=login_next) it works also for registration: auth.settings.register_onvalidation = login_email_lower current.app.auth = auth

[web2py] Re: Question on compute field

2011-12-08 Thread Anthony
I'm not sure you're supposed to use required=True with a computed field. I think required=True requires an actual value be provided with the insert. With a computed field, it's probably not needed because if no value is provided, the value will be computed, so the field won't end up empty eithe

[web2py] Question on compute field

2011-12-08 Thread Joseph Jude
Hi all, I am just starting to use compute field. Here is my db definition looks like (it is in a module) class Entries(object): . def define_tables(self,db): Field('permalink',type='text',required=True,compute = lambda row: self.get_permalink(row)), . d

[web2py] Re: js paypal shopping cart

2011-12-08 Thread Massimo Di Pierro
I have not found out yet. On Dec 8, 10:03 pm, lyn2py wrote: > Thank you Massimo! > > Does anyone know the difference between the Free plugin and the Paid > version? > > On Dec 9, 11:42 am, Massimo Di Pierro > wrote: > > > > > > > > > I came across this and it may be useful to some > > >http://ww

[web2py] Re: How to create own "vocabulary"?

2011-12-08 Thread Massimo Di Pierro
the proper way is using a parer but the shortcut (used in markmin) is using regular expressions def process(text): import re text = re.compile('\[(?P.+?)\]).sub('',text) # ... more for other rules return text but you have to make sure rules do not conflict with each other (nested matc

[web2py] Re: read once definitions - development vs. production

2011-12-08 Thread Anthony
On Thursday, December 8, 2011 9:29:42 PM UTC-5, Constantine Vasil wrote: > > > OK let put it in reverse - how you would do this (GAE)/ > > in default.py > myaccount = MyAccount.get_profile(user_id) > What happens when you do: from module_that_defines_MyAccount import MyAccount myaccount =

[web2py] Re: request reset password

2011-12-08 Thread Constantine Vasil
IS_LOWER is not working, but the code below is working fine: === auth.settings.register_onvalidation = login_email_lower current.app.auth = auth form=current.app.auth.register() auth.settings.login_onv

[web2py] Re: request reset password

2011-12-08 Thread Anthony
I replied about this in another thread. Note, though, that IS_LOWER() converts to lowercase, it is not checking whether the input is lowercase. It is one of several validators that merely transforms the input. On Thursday, December 8, 2011 11:20:47 PM UTC-5, Constantine Vasil wrote: > > That is

[web2py] Re: request reset password

2011-12-08 Thread Constantine Vasil
I found a better suggested solution and it works === auth.settings.register_onvalidation = login_email_lower current.app.auth = auth form=current.app.auth.register() auth.settings.login_onvalidation = l

[web2py] Re: Where is the best place to make e-mail by registration and login to be converted always to lower case?

2011-12-08 Thread Anthony
What login method are you using? I would think that would work with the standard login method, but when using alternative methods, it looks like the login() code uses request.vars[username], which would be the un-transformed password (i.e., not converted to lowercase). Anthony On Thursday, Dec

[web2py] Re: request reset password

2011-12-08 Thread Constantine Vasil
That is a good idea too - I will look at it. Now I have another issue - I have only email/password as login. The issue is that when the user registers with email - he can enter lower case or mixed case. When then he logs in he can enter a mixed case too. The best solution is to convert email en

[web2py] Re: Where is the best place to make e-mail by registration and login to be converted always to lower case?

2011-12-08 Thread Constantine Vasil
I tested this: in registration form - entered lower case email, then in login form entered email with first letter - a capital. The message was 'Invalid login'. In registration form: == auth.settings.table_user.email.requires=[

[web2py] Re: foreign key reference and "not null" mutually exclusive. by design, or a bug?

2011-12-08 Thread Cliff
Check out IS_IN_DB and IS_NOT_IN_DB here: http://www.web2py.com/book/default/chapter/07#Database-Validators Are you creating the tables in native SQLite? On Dec 8, 3:22 pm, nick name wrote: > I want to have a non-null foreign key reference, e.g. > > owner = db.define_table('owner'', Field('name

[web2py] Re: js paypal shopping cart

2011-12-08 Thread lyn2py
Thank you Massimo! Does anyone know the difference between the Free plugin and the Paid version? On Dec 9, 11:42 am, Massimo Di Pierro wrote: > I came across this and it may be useful to some > > http://www.digicrafts.com.hk/components/JSAJAXPayPalCart

[web2py] How to create own "vocabulary"?

2011-12-08 Thread lyn2py
Hi guys, I have no idea where to start on this, I am grateful for any help. Like MARKMIN has **bold** --> bold ''italics'' --> italics I would like to add to (or create) a set of "vocabulary" like MARKMIN, using square brackets like [smiley] --> Mostly they are image files. How can I do that

[web2py] Re: SQLFORM.factory int() argument must be a string or a number, not 'list' in many-to-many relationship

2011-12-08 Thread Cliff
Vincenzo, Nope, unless list:reference fields will work. Maybe they are worth a try. On Dec 8, 5:00 pm, Vincenzo Ampolo wrote: > On 12/08/2011 07:12 PM, Cliff wrote: > > > Vincenzo, > > > Does it still blow up if you comment out these three lines? > > >           id = > > db.users_categories.ins

[web2py] js paypal shopping cart

2011-12-08 Thread Massimo Di Pierro
I came across this and it may be useful to some http://www.digicrafts.com.hk/components/JSAJAXPayPalCart

[web2py] Where is the best place to make e-mail by registration and login to be converted always to lower case?

2011-12-08 Thread Constantine Vasil
Where is the best place to make e-mail by registration and login to be converted always to lower case? For example on registration form when everything is disabled but the email/password, when the user enters: Email:someb...@gmail.com and Email:someb...@gmail.com web2py creates different accoun

[web2py] Re: Calirification on plugin_wiki license

2011-12-08 Thread Massimo Di Pierro
I can confirm it is BSD. If you read something else it is an error. Let us know here and I will correct. Some of the js libs that come with it may have other licenses. On Dec 8, 5:33 pm, simlan wrote: > Okay but that is contradictory to the other post i mentioned.  Maybe i > find a way around mod

[web2py] Re: read once definitions - development vs. production

2011-12-08 Thread Constantine Vasil
OK let put it in reverse - how you would do this (GAE)/ in default.py myaccount = MyAccount.get_profile(user_id) Please note that 'in module' root = MyAccountRoot.get_profile() does not works - it says 'not available' or something. in default.py to import custom import yo

[web2py] Re: read once definitions - development vs. production

2011-12-08 Thread Anthony
On Thursday, December 8, 2011 6:22:31 PM UTC-5, Constantine Vasil wrote: > > I tried to move to modules but got the following issues: > > This is not possible - e.g. to acces the class directly without a prefix - > when I have a lot of code if I cannot do that it is a lot of work adding > a prefix

[web2py] Re: Calirification on plugin_wiki license

2011-12-08 Thread Anthony
What's the contradiction? That thread says plugin_wiki has a BSD license (apparently along with two others). When there are multiple licenses, you can choose the one you want. I think the thread mentions that the closed source app would have to indicate it is based on plugin_wiki because that i

[web2py] Re: request reset password

2011-12-08 Thread pbreit
I customize all my user views like this: {{elif request.args(0)=='request_reset_password':}} Reset Password {{=form.custom.begin}} Email: {{=form.custom.widget.email}} {{=form.custom.end}} {{elif request.args(0)=='change_password':}} Cha

[web2py] Re: How to modify response.write output

2011-12-08 Thread Christopher Steel
:)

[web2py] Re: How to reuse view functions

2011-12-08 Thread Anthony
I don't think you can put an include before an extend (well, you can, but it won't insert the include code before the extended view code, so if your call to mysidebar() comes before the {{include}} statement in layout.html, this won't work). Anthony On Thursday, December 8, 2011 12:14:04 PM UT

[web2py] list:reference vs standard many-to-many relationship

2011-12-08 Thread Vincenzo Ampolo
Hi are there any studies about performances on relational dbs of list:reference fields? On the doc i read " On relational databases they all mapped into text fields which contain the list of items separated by||" |||and after i read: " For|list:|fields the|contains(value)|operator maps into a

[web2py] Re: Calirification on plugin_wiki license

2011-12-08 Thread simlan
Okay but that is contradictory to the other post i mentioned. Maybe i find a way around modifying the plugin itself and just assume that it is similar to web2py itself. Thanks for the pointer anyway. On Dec 8, 5:26 pm, Anthony wrote: > Well, the cube2py project page (http://code.google.com/p/cu

[web2py] Re: read once definitions - development vs. production

2011-12-08 Thread Constantine Vasil
They are a lot of model definitions - it is a big project which I am porting to web2py. Django templates were easy to translate. GAE working with web2py - took me a lot of time be I did it. Making the PyDev+Ecilpse+GAE SDK environment to work with debugging - very hard but it is done. Now the fin

[web2py] Re: Factoid: How to reset id field in Postgres tables

2011-12-08 Thread lyn2py
Thanks for sharing Cliff! On Dec 9, 3:53 am, Cliff wrote: > db.mytable.truncate() cleans all the data out of the table, but does > not reset the counter for the id field.  (See Ch 4 of the book.) > > db.products.truncate('RESTART IDENTITY CASCADE') resets the counter > back to zero, so the first

[web2py] Re: Calirification on plugin_wiki license

2011-12-08 Thread Anthony
Well, the cube2py project page (http://code.google.com/p/cube2py/), which includes plugin_wiki, says it has a new BSD license. Anthony

[web2py] Re: read once definitions - development vs. production

2011-12-08 Thread Constantine Vasil
I tried to move to modules but got the following issues: This is not possible - e.g. to acces the class directly without a prefix - when I have a lot of code if I cannot do that it is a lot of work adding a prefix. myclass = MyClass.profile(id) name = myclass.name Also if I have several related

[web2py] Re: date(time) picker not working with multiple ajax loaded forms

2011-12-08 Thread Anthony
Which web2py version? Can you try trunk (all you should need is the new /views/web2py_ajax.html, /static/js/web2py.js, /static/js/calendar.js, and /static/css/calendar.css). On Thursday, December 8, 2011 4:32:17 PM UTC-5, selecta wrote: > > If I load multiple forms as web2py components the date(

[web2py] Re: read once definitions - development vs. production

2011-12-08 Thread Anthony
BTW, do you have a large number of model definitions? Have you measured the performance hit? It might not be that big. Another option is conditional models: http://web2py.com/book/default/chapter/04#Workflow. You can define models that execute only for a particular controller and even a particu

[web2py] Re: read once definitions - development vs. production

2011-12-08 Thread Anthony
You can move code to modules if you don't want it all executed on every request. In that case, you'll either have to use the 'current' object or pass global objects (such as 'db') to your module functions and methods. See http://web2py.com/book/default/chapter/04#Accessing-the-API-from-Python-m

[web2py] Re: vCard

2011-12-08 Thread GoldenTiger
I worked with microformats some time ago...and now i am about to back >>addresses are rendered as a business card in a view how are your data stored ? you need your data in vcard file, web2py includes gluon/contrib/ feedparser.py , I think feedparser.py makes all the job you can choose any othe

[web2py] read once definitions - development vs. production

2011-12-08 Thread Constantine Vasil
I used the PyDev+Eclipse+ GAE debugger extensively (after making it working) to see how web2py is working internally. Bottom line web2py is excellent for rapid development - while it is still running, any change in the model in 0.py (say) is available immediately after browser refresh because

[web2py] Re: Factoid: How to reset id field in Postgres tables

2011-12-08 Thread Cliff
If it helps, any parameters you pass to truncate() get passed on to the database driver. What happens after that I do not know, except for Postgres. I researched the issue because I didn't want to drop and regen my tables every time I run an acceptance test. On Dec 8, 5:04 pm, Richard Vézina wr

Re: [web2py] Re: Factoid: How to reset id field in Postgres tables

2011-12-08 Thread Richard Vézina
Also, if you use to create your table in postgres manually (not wrinting models first in web2py and let web2py create you table for you) it maybe possible that you have to define your sequence name since web2py don't follow postgres standard name for sequence creation... So maybe your sequence name

Re: [web2py] Re: Factoid: How to reset id field in Postgres tables

2011-12-08 Thread Richard Vézina
Here a post on stack overflow that could help : http://stackoverflow.com/questions/244243/how-to-reset-postgres-primary-key-sequence-when-it-falls-out-of-sync On Thu, Dec 8, 2011 at 4:55 PM, Richard Vézina wrote: > I think you will need to use raw sql for this... > > http://web2py.com/book/defaul

Re: [web2py] Re: SQLFORM.factory int() argument must be a string or a number, not 'list' in many-to-many relationship

2011-12-08 Thread Vincenzo Ampolo
On 12/08/2011 07:12 PM, Cliff wrote: Vincenzo, Does it still blow up if you comment out these three lines? id = db.users_categories.insert(**db.user_categories._filter_fields(perm_form.va rs)) id = db.users_dictionaries.insert(**db.user_dictionaries._filter_fields(perm_for m

[web2py] Re: web2py, amazon ec2 and static pages outside of the application

2011-12-08 Thread howesc
while i don't know the apache directive off the top of my head there most certianly is a way to direct requests based on subdomain and i think also based on path to different places on disk. i'm 99% certain that some reading on apache conf will be worthwhile! cfh

Re: [web2py] Re: Factoid: How to reset id field in Postgres tables

2011-12-08 Thread Richard Vézina
I think you will need to use raw sql for this... http://web2py.com/book/default/chapter/06?search=raw+sql#Raw-SQL At least it one way I see that it could work... But I remember that I have read something about resetting sequence from web2py... Richard On Thu, Dec 8, 2011 at 4:14 PM, Alan Etkin

[web2py] date(time) picker not working with multiple ajax loaded forms

2011-12-08 Thread selecta
If I load multiple forms as web2py components the date(time) picker only works in the first form. Can somebody verify that or is it just a bug in my code?

[web2py] Re: Factoid: How to reset id field in Postgres tables

2011-12-08 Thread Alan Etkin
Does it work for sqlite3 or MySQL, etc? On Dec 8, 5:27 pm, nick name wrote: > Interesting. DAL has specific reset code for MS SQL and SQLite, but not for > postgresql (or any of the other databases, it seems)

[web2py] Calirification on plugin_wiki license

2011-12-08 Thread simlan
Hi there, i am wondering under which license the plugin_wiki is released. In the web2py book (chapter 13) it is mentioned that there should be license information under "static/plugin_name/ license.html" but there is no such file for plugin_wiki. I searched this group and found a post that states:

[web2py] Re: Factoid: How to reset id field in Postgres tables

2011-12-08 Thread nick name
Interesting. DAL has specific reset code for MS SQL and SQLite, but not for postgresql (or any of the other databases, it seems)

RE: [web2py] Re: Progress update on Mongodb adapter now forked GIT repo

2011-12-08 Thread Mark Breedveld
Yes, that's all -Oorspronkelijk bericht- Van: web2py@googlegroups.com [mailto:web2py@googlegroups.com] Namens Massimo Di Pierro Verzonden: donderdag 8 december 2011 16:25 Aan: web2py-users Onderwerp: [web2py] Re: Progress update on Mongodb adapter now forked GIT repo I am happy to include

[web2py] foreign key reference and "not null" mutually exclusive. by design, or a bug?

2011-12-08 Thread nick name
I want to have a non-null foreign key reference, e.g. owner = db.define_table('owner'', Field('name')) package = db.define_table('package', Field('owner_id', owner, notnull=True), Field('name')) SQLite for example has no problem with this: sqlite> create table owner(id int primary key, name tex

[web2py] Re: How to deploy web2py on PythonAnywhere

2011-12-08 Thread Lazarof
I am trying to run web2py on pythonanywhere but using Dropbox. Can someone help us with http://www.pythonanywhere.com/forums/topic/9/ On Dec 6, 10:42 pm, Ovidio Marinho wrote: >       I also tried to use Dropbox to have an automatic update, but it seems > that sharing does not work with the dropb

[web2py] Factoid: How to reset id field in Postgres tables

2011-12-08 Thread Cliff
db.mytable.truncate() cleans all the data out of the table, but does not reset the counter for the id field. (See Ch 4 of the book.) db.products.truncate('RESTART IDENTITY CASCADE') resets the counter back to zero, so the first record gets an id of 1. Resetting the counter is useful for automate

[web2py] Re: web2py, amazon ec2 and static pages outside of the application

2011-12-08 Thread Marco Tulio Cicero de M. Porto
I was wondering if there was any configuration on Apache that could help on that, so that I could set the php application on www root and the web2py applications on www-data ... 2011/12/8 Marco Tulio Cicero de M. Porto > I'd appreciate, (that's what I was going to say when the mail was sent by >

[web2py] Re: SQLFORM.factory int() argument must be a string or a number, not 'list' in many-to-many relationship

2011-12-08 Thread Cliff
Vincenzo, Does it still blow up if you comment out these three lines? id = db.users_categories.insert(**db.user_categories._filter_fields(perm_form.va rs)) id = db.users_dictionaries.insert(**db.user_dictionaries._filter_fields(perm_for m.vars)) response.flash='Thanks f

Re: [web2py] Easy handling of subforms

2011-12-08 Thread Richard Vézina
Bump... Is there some development about that solution for sub-form? Richard On Tue, Nov 22, 2011 at 1:24 PM, Richard Vézina wrote: > I think we need Massimo opinion on this... > > Richard > > > On Thu, Nov 17, 2011 at 12:16 PM, ~redShadow~ wrote: > >> On Wed, 2011-11-16 at 15:36 -0500, Richard

[web2py] Re: How to modify response.write output

2011-12-08 Thread Saurabh Kumar
Hi, Thanks all for the replies. I finally got it working. The problem was that the user_name variable itself was 'something'. Really sorry for this silly mistake. Special thanks to Massimo !! Regarding XSS concern, thanks but this is not the user name of the database table. It is just a common

Re: [web2py] How to reuse view functions

2011-12-08 Thread Tito Garrido
{{include 'leftsidebar.html'}} doesn't work... it just appears my default sidebar... if I put: {{def mysidebar():}} my new sidebar!!! {{return}} instead of the include it works... PS: {{def mysidebar():}} my new sidebar!!! {{return}} is the content of leftsidebar.html Regards, Tito On Thu, Dec

Re: [web2py] How to reuse view functions

2011-12-08 Thread Vinicius Assef
On Thu, Dec 8, 2011 at 3:14 PM, Tito Garrido wrote: > Folks, > > I need to change my sidebar sometimes so I've created a view > leftsidebar.html with a function like this: > > {{def mysidebar():}} > my new sidebar!!! > {{return}} > > And then on may layout.html I've put: > {{if 'mysidebar' in glob

[web2py] How to reuse view functions

2011-12-08 Thread Tito Garrido
Folks, I need to change my sidebar sometimes so I've created a view leftsidebar.html with a function like this: {{def mysidebar():}} my new sidebar!!! {{return}} And then on may layout.html I've put: {{if 'mysidebar' in globals():}}{{mysidebar()}}{{else:}} ... {{pass}} And on a controller view

[web2py] Re: Missing information on chapter 05 in the book (view functions)

2011-12-08 Thread Massimo Di Pierro
{{if 'mysidebar' in globals():}}{{mysidebar()}}{{else:}} thanks On Dec 8, 10:06 am, Tito Garrido wrote: > >   >     {{include}} > >     >       {{if 'mysidebar' in :}}{{mysidebar()}}{{else:}} > >         my default sidebar >       {{pass}} >     > >   > > > I guess something is missing o

[web2py] Missing information on chapter 05 in the book (view functions)

2011-12-08 Thread Tito Garrido
{{include}} {{if 'mysidebar' in :}}{{mysidebar()}}{{else:}} my default sidebar {{pass}} I guess something is missing on: {{if 'mysidebar' in :}} Regards, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__(

[web2py] Re: How to modify response.write output

2011-12-08 Thread Anthony
On Thursday, December 8, 2011 7:34:52 AM UTC-5, Saurabh Kumar wrote: > > Hi, > > I am returning a dict (user_name="something") from my controller. > > In my view, I am displaying it using {{=user_name}} > > It generates an html code like... > > something > If user_name truly has the value "somethi

[web2py] Re: Progress update on Mongodb adapter now forked GIT repo

2011-12-08 Thread Alan Etkin
Great! Thanks for sharing On 8 dic, 08:42, Mark Breedveld wrote: > The GIT repository below contains the Mongodb > adapter.https://github.com/MarkBreedveld/web2py > > Currently working > - Select with >    - startswith, endswith,contains, like, < > >= <= = != & | IN NOT EQ > LIMIT ORDER >    - S

[web2py] Re: Massimo

2011-12-08 Thread Chris May
I second that! We are truly blessed to have so many great, patient and available contributors to the code and the community! Anthony, do you have the book memorized yet? :D

Re: [web2py] Two tables and one grid

2011-12-08 Thread Martin Weissenboeck
Thank to all for help. I have found an idea in another thread and this is my solution: def editcv(): pid = db(db.person.name == 'Smith').select().first().id query = db.cv.id == pid db.cv.person.writable = False *db.cv.person.default = pid* return dict(grid=SQLFORM.grid(query,user_si

Re: [web2py] Re: .contains() in query with SQLCustomType

2011-12-08 Thread Daniel Blomqvist
Thanks for your help Massimo Although now I'm getting this error: File"/home/daniel/dev/tempw2p/web2py/gluon/dal.py",line5496,instartswith return self.type.startswith(self,text) TypeError:slice indices must be integersor None orhave an __index__ method On 2011-12-08 15:36, Massimo Di Pierr

[web2py] Re: How to modify response.write output

2011-12-08 Thread lyn2py
That's weird. I tried your code but I am unable to reproduce the html you got . If "user_name" is what you need: #view {{if auth.is_logged_in:}} {{=session.auth.user.name}} {{pass}} On Dec 8, 9:28 pm, Saurabh Kumar wrote: > My view file looks like : > > {{extend 'layout.html'}} > {{=user_name

Re: [web2py] Re: Postgresql query using trgm-indexing (fuzzy search option)

2011-12-08 Thread Johann Spies
On 8 December 2011 16:23, Massimo Di Pierro wrote: > What's similarity? It is an indication of the probability of the match. > What database engine supports it > Postgresql. See http://stackoverflow.com/questions/2254999/similarity-function-in-postgres-with-pg-trgm There is also http://www.

[web2py] Re: .contains() in query with SQLCustomType

2011-12-08 Thread Massimo Di Pierro
Good point. I have a possible fix to trunk, please check if it resolves the problem. On Dec 8, 8:11 am, Daniel Blomqvist wrote: > Hello, I tried making a query like this: > > db(db.table.field.contains(1)).select() > > where the field is a SQLCustomType with type 'list:integer' and native > 'int(

[web2py] Re: How to modify response.write output

2011-12-08 Thread Massimo Di Pierro
I do not understand you question. if {{=user_name}} outputs something It is because user_name == 'something' Is that the case? Do you want to parse the data, remove the tag and then print it? It seems wrong to me to store HTML into user name. It could cause XSS. On Dec 8, 6:34 am, S

[web2py] Re: web2py, amazon ec2 and static pages outside of the application

2011-12-08 Thread Marco Tulio Cicero de M. Porto
I'd appreciate, (that's what I was going to say when the mail was sent by itself... :P :) Thanks in advanced, Marco Tulio 2011/12/8 Marco Tulio Cicero de M. Porto > well, about this: I created an application called "maps" and moved the > whole php application to > /home/www-data/web2py/applicat

[web2py] Re: web2py, amazon ec2 and static pages outside of the application

2011-12-08 Thread Marco Tulio Cicero de M. Porto
well, about this: I created an application called "maps" and moved the whole php application to /home/www-data/web2py/applications/maps/static/i3geo so that, now instead of http://servername.com/i3geo I have http://servername.com/maps/static/i3geo wich ends up working since I can see the static fil

[web2py] Re: Progress update on Mongodb adapter now forked GIT repo

2011-12-08 Thread Massimo Di Pierro
I am happy to include this. Do I just need the adapter from your dal? On Dec 8, 5:42 am, Mark Breedveld wrote: > The GIT repository below contains the Mongodb > adapter.https://github.com/MarkBreedveld/web2py > > Currently working > - Select with >    - startswith, endswith,contains, like, < > >

[web2py] Re: Postgresql query using trgm-indexing (fuzzy search option)

2011-12-08 Thread Massimo Di Pierro
What's similarity? What database engine supports it? On Dec 8, 4:02 am, Johann Spies wrote: > How would one translate the following query into DAL - or should I use > executesql (I would like to use the query in SQLFORM.grid): > > select B.title, A.title, similarity(A.title, B.title) > from > us2

[web2py] .contains() in query with SQLCustomType

2011-12-08 Thread Daniel Blomqvist
Hello, I tried making a query like this: db(db.table.field.contains(1)).select() where the field is a SQLCustomType with type 'list:integer' and native 'int(11)' The query does not work because of this function in gluon.dal.SQLCustomType: def startswith(self, dummy=None): return Fals

Re: [web2py] web2py, amazon ec2 and static pages outside of the application

2011-12-08 Thread José Luis Redrejo Rodríguez
2011/12/8 Marco Tulio Cicero de M. Porto : > Hi there! > > ok, here's the deal: > > I installed web2py on ec2 following the instructions on the attached file. > So far so good. I had it installed and working perfectly. > > Thing is that now, I want to use on that same server a geoprocessing > appli

[web2py] Re: How to modify response.write output

2011-12-08 Thread Saurabh Kumar
Hi, If you could give some idea about the definition of response.write function (where it is defined), it will help. On Dec 8, 6:28 pm, Saurabh Kumar wrote: > My view file looks like : > > {{extend 'layout.html'}} > {{=user_name}} > >         >                 {{for line in lines:}} >        

[web2py] Re: How to modify response.write output

2011-12-08 Thread Saurabh Kumar
My view file looks like : {{extend 'layout.html'}} {{=user_name}} {{for line in lines:}} {{=line}} {{pass}}

[web2py] Re: How to modify response.write output

2011-12-08 Thread lyn2py
Saurabh, >> {{=user_name}} will only give: >> something in view, without the additional code (span, style etc that you mentioned). If it doesn't work for you, please show us the actual code that is not performing as expected. On Dec 8, 9:08 pm, Saurabh Kumar wrote: > Thanks for you reply. >

[web2py] Re: How to modify response.write output

2011-12-08 Thread Saurabh Kumar
Thanks for you reply. But my controller is not that simple, The return statement actually looks like return dict(lines=lines,channels=channels,staff=staff,current=int(request.args[0]),user_name=s.name) On Dec 8, 5:49 pm, Vinicius Assef wrote: > In your controller, just return "somethin

Re: [web2py] How to modify response.write output

2011-12-08 Thread Vinicius Assef
In your controller, just return "something", without the dict(). [code] return "something" [/code] On Thu, Dec 8, 2011 at 10:34 AM, Saurabh Kumar wrote: > Hi, > > I am returning  a dict (user_name="something") from my controller. > > In my view, I am displaying it using {{=user_name}} > > It g

[web2py] How to modify response.write output

2011-12-08 Thread Saurabh Kumar
Hi, I am returning a dict (user_name="something") from my controller. In my view, I am displaying it using {{=user_name}} It generates an html code like... something but I am looking for just something Can I modify the output of response.write to achieve this? Is there some other way to ach

[web2py] idea for embedded documents for document stores which is compatible with SQL

2011-12-08 Thread Mark Breedveld
Hi all, I would like your opinion on the following matter. There are currently two document store adapters in web2py. CouchDB and Mongodb, both still highly experimental. Now would it be nice if there was a way in which we could define embedded documents in a way that is still compatible with SQL

[web2py] Progress update on Mongodb adapter now forked GIT repo

2011-12-08 Thread Mark Breedveld
The GIT repository below contains the Mongodb adapter. https://github.com/MarkBreedveld/web2py Currently working - Select with - startswith, endswith,contains, like, < > >= <= = != & | IN NOT EQ LIMIT ORDER - Snapshot switch - safe switch - truncate - count() - drop() - create_table() TO

[web2py] Postgresql query using trgm-indexing (fuzzy search option)

2011-12-08 Thread Johann Spies
How would one translate the following query into DAL - or should I use executesql (I would like to use the query in SQLFORM.grid): select B.title, A.title, similarity(A.title, B.title) from us2006_2010 B left join akb_articles A on (A.title % B.title) where B.id in (select A.id