[web2py] Re: Unable to send email on server in web2py.....

2014-01-05 Thread Akash Agrawall
Sorry for late reply man. I checked the same no luck in that... !! :( my present code from gluon.tools import Mail mail = Mail() #mail = auth.settings.mailer mail.settings.server = 'localhost' mail.settings.sender = 'fakeid425s...@gmail.com' mail.settings.tls = None mail.settings.log

[web2py] Re: How to declare a pre-defined sqlite database

2014-01-05 Thread Niphlod
"legacy" db are the ones that were not created in web2py applications. The concept behind is that you can still query whatever database you want just using db.define_table(.., migrate=False). That being said, without an auto-incrementing column or a PK you'd loose quite a bit of DAL features

[web2py] Re: IS_IN_SET in SQLFORM.dictform

2014-01-05 Thread brushek
Hi, I'm still searching, and I found in the web2py book something like this in widget section: The "options" widget is used when a field's requires is IS_IN_SET or IS_IN_DB with multiple=False (default behavior). I assumed, that if I change the 'requires' of field (after SQLFORM.dictform, s

Re: [web2py] Re: converted url %3F and %3D

2014-01-05 Thread Kevin Bethke
well I want to make a redirekt and parse the url. thats the plan. So my idea was to get every 404 error if there is %3F inside the requested url it will redirekt you to the url where it is replaced by a ? the same thing for the = Sign in all other cases it shows you the 404 page. would that be poss

[web2py] Re: How to declare a pre-defined sqlite database

2014-01-05 Thread pythonic . jonathan
Thanks. That allows me to narrow it down to two questions: 1) I'm just going to want to use various select queries against views/tables (including joins) in the "legacy" database, nothing else. This database will never need to be altered by web2py. Will I be able to do that? 2) If I want to do

[web2py] convert dict to gluon.dal.Row

2014-01-05 Thread lucas
hey everyone, what is the best way to convert a dict with appropriate key names to a row of a table? thanx in advance, lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: How to declare a pre-defined sqlite database

2014-01-05 Thread Niphlod
On Sunday, January 5, 2014 1:57:24 PM UTC+1, pythonic...@gmail.com wrote: > > Thanks. That allows me to narrow it down to two questions: > > 1) I'm just going to want to use various select queries against > views/tables (including joins) in the "legacy" database, nothing else. This > database w

Re: [web2py] Re: Where should I put my application logic code?

2014-01-05 Thread Alex
I've quite a lot model files (~40), so far the performance is still very good. Since it is not very optimal and also not good in the long run I'm now thinking of rewriting the code into modules. I'm struggling a little bit to rewrite the functions. E.g. consider following function in a model: @

[web2py] Re: sessions and logout

2014-01-05 Thread Wonton
Thank you very much! Everything is clear to me now. On Saturday, January 4, 2014 7:48:34 PM UTC+1, Anthony wrote: > > - A session file is created associated to a user each time that user logs >> in. Is this ok? >> > > Yes, it is OK. > > >> - My users make a login through auth.login_bare(user, p

[web2py] Re: How to declare a pre-defined sqlite database

2014-01-05 Thread pythonic . jonathan
Thanks! I'll give it a go and see what happens. :-) On Sunday, January 5, 2014 1:02:52 PM UTC, Niphlod wrote: > > > > On Sunday, January 5, 2014 1:57:24 PM UTC+1, pythonic...@gmail.com wrote: >> >> Thanks. That allows me to narrow it down to two questions: >> >> 1) I'm just going to want to use va

[web2py] Audio Streaming View

2014-01-05 Thread Asher S
Hey all, Still getting my grounding in web2py but I wanted to create a site that streams audio. I found a lovely guide by Massimo. But need help building a view around it. I tried things like {{=music.f

[web2py] Change auth.wiki _create form

2014-01-05 Thread Ezer Silva
I'm trying to change the auth.wiki's _create form to put ckeditor as the widget. Is that possible? Happy new year everybody and good luck to Massimo on the Edison Awards! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: Where should I put my application logic code?

2014-01-05 Thread Anthony
If you want to do it with a decorator, you can use @lazy_cache (see http://web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules). Otherwise, you can just use current.cache to store the return value of the function. Anthony On Sunday, January 5, 2014 8:13:59 AM

[web2py] Re: convert dict to gluon.dal.Row

2014-01-05 Thread Anthony
from gluon.dal import Row myrow = Row(mydict) Anthony On Sunday, January 5, 2014 8:00:03 AM UTC-5, lucas wrote: > > hey everyone, > > what is the best way to convert a dict with appropriate key names to a row > of a table? > > thanx in advance, lucas > -- Resources: - http://web2py.com - http:

[web2py] "invalid request" with a simple view

2014-01-05 Thread pythonic . jonathan
I'm starting at the start with trying to understand the structure of web2py and how it all fits together (reading books doesn't work for me). To that end I've created a view, the entire content of which is: > hello world This is in a view file called "index.html" - I'm not extending anything,

[web2py] Re: Change auth.wiki _create form

2014-01-05 Thread Ezer Silva
Actually I could alter web2py's code to allow me to pass an widget to the body as an argument, but I don't feel it's the best solution -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/iss

[web2py] Appengine no longer works with

2014-01-05 Thread Pystar
I just upgraded to the latest version of web2py, and discovered that trying to use appengine locally and online no longer works and I can not view the error tickets spewed. Also, before I did this upgrade, my app worked perfectly with google app engine, is there something I need to know about t

[web2py] Re: IS_IN_SET in SQLFORM.dictform

2014-01-05 Thread Massimo Di Pierro
Unfortunately dictform does not support this. You can do: session.config = dict(NAME = 'a') form = SQLFORM.factory(Field('NAME',default=session.config['NAME'],requires=IS_IN_SET(('a','b','c','d','e'), error_message="Choose between a and e"))) if form.process().accepted: session.config

[web2py] Re: "invalid request" with a simple view

2014-01-05 Thread Massimo Di Pierro
The purpose of a view is that or converting the output of a controller action (a python function) into HTML. you can have views/default/index.html containing only "hello world" but you also need a file controllers/default.py containing "def index(): return dict()" On Sunday, 5 January 2014 09

[web2py] Re: Appengine no longer works with

2014-01-05 Thread Massimo Di Pierro
Can you please tell us how you upgraded and aht you mean by no-longer works? The changes are mostly motivated by the fact that GAE changed (no more support for python 2.5, etc.) Massimo On Sunday, 5 January 2014 09:58:09 UTC-6, Pystar wrote: > > I just upgraded to the latest version of web2py,

Re: [web2py] Re: Where should I put my application logic code?

2014-01-05 Thread Alex
thanks Anthony! it's working with lazy_cache decorator. I guess the @ is missing in the documentation example: lazy_cache('key', time_expire=60, cache_model='ram') def f(a,b,c,): Alex Am Sonntag, 5. Januar 2014 16:20:37 UTC+1 schrieb Anthony: > > If you want to do it with a decorator, you

[web2py] routes.py Problem

2014-01-05 Thread Rockiger
Hello together, I have a problem with routes.py. My goal is it to have a English and a German (de) version of my site: I have the following code in there: routers = dict( # base router BASE = dict( default_application = 'rockiger', ), rockiger = dict( default

[web2py] Re: IS_IN_SET in SQLFORM.dictform

2014-01-05 Thread brushek
Thank You Masimo for answer, Hm... so this is huge problem for me, because I have in dict many other options (I showed only one field to show the problem). Is there any easy way to append or insert Field (with corect select option generated in the view) to the form created by SQLFORM.dictform ?

Re: [web2py] routes.py Problem

2014-01-05 Thread Jonathan Lundell
On 5 Jan 2014, at 8:44 AM, Rockiger wrote: > Hello together, > > I have a problem with routes.py. My goal is it to have a English and a German > (de) version of my site: > > I have the following code in there: > > routers = dict( > # base router > BASE = dict( > default_applica

[web2py] Re: "invalid request" with a simple view

2014-01-05 Thread pythonic . jonathan
Thanks, I'm on example 3 which is the one this is based on. My issue isn't that even something this simple isn't working and I don't know why. In fact, I've already tried the controller thing (example 3) and got the same error (same error). So I went back to basics and converted to "hello worl

[web2py] Re: "invalid request" with a simple view

2014-01-05 Thread Annet
> > My controller is called index.py: > >> def index(): >> return dict(message=T("Hello World")) > > In that case your url should be http://localhost:8000/test/index/index > > And now I've edited my view to: > >> hello world >> {{=message}} > > > and your view should be in views/index/inde

[web2py] Re: "invalid request" with a simple view

2014-01-05 Thread pythonic . jonathan
Sorry, but that doesn't seem to do it either. I've tried all of the following. Error "invalid view (index/index.html)" http://localhost:8000/test/index/index.html http://localhost:8000/test/index/index http://localhost:8000/test/index And the following all give: "invalid controller (views/index)

[web2py] Re: "invalid request" with a simple view

2014-01-05 Thread Anthony
On Sunday, January 5, 2014 10:52:42 AM UTC-5, pythonic...@gmail.com wrote: > > I'm starting at the start with trying to understand the structure of > web2py and how it all fits together (reading books doesn't work for me). > I think you should consider going through at least some of the document

[web2py] Re: Unable to send email on server in web2py.....

2014-01-05 Thread Alan Etkin
> > Sorry for late reply man. I checked the same no luck in that... !! > :( > Please post the output of mail.result and mail.error after the call to .send() -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - ht

[web2py] Re: "invalid request" with a simple view

2014-01-05 Thread Anthony
Not sure how much more descriptive it can be -- in the first case, it is saying there is no index/index.html view in the /views folder, and in the second, it is saying there is no "views" controller (the request is for views/index). To understand how and where to create views and controllers, y

Re: [web2py] Re: "invalid request" with a simple view

2014-01-05 Thread Jonathan Lundell
On 5 Jan 2014, at 11:53 AM, Anthony wrote: > On Sunday, January 5, 2014 10:52:42 AM UTC-5, pythonic...@gmail.com wrote: > I'm starting at the start with trying to understand the structure of web2py > and how it all fits together (reading books doesn't work for me). > > I think you should conside

[web2py] drop question

2014-01-05 Thread Alex Glaros
Tried to drop a table and got an error perhaps due to reference to other table but the error message misspelled "Organization" as "Orgnization" but I can't find any reference to Orgnization. Doesn't that mean I had "Organization" misspelled somewhere? If yes, where? In [2] : db.Party.drop()

[web2py] cpdb from sqlite to postgresql

2014-01-05 Thread Martin Weissenboeck
I want to change from sqlite to postgresql. At first I have installed postgresql and prepared everything as described in the book. Next I have built a sample application with a line like db1 = DAL("postgres://web2py:web2py123@localhost:5432/securedb") Works fine! Now I have tried cpdb ( I have

Re: [web2py] Re: Important New Year News: Edison Award

2014-01-05 Thread Michele Comitini
In bocca al lupo! >From your mountains: https://it.wikipedia.org/wiki/Canis_lupus_italicus ;-) 2014/1/5 Mirko Scavazzin > Way to go !! > Congrats ! > > > 2014/1/5 Cliff Kachinske > >> Best of luck. >> >> Hope you (and web2py) bring back an award. >> >> >> On Friday, January 3, 2014 11:08:38

[web2py] extend the permissions

2014-01-05 Thread www.diazluis.com
Greetings to all and happy 2014! I'm using oauth facebook. I can extaer basic user data and contact list. but now need to extend the permissions to see the list of groups, upload pictures, post. documentation of facebook, how to extend the permit, is not clear to me. in the way in which I deploy

Re: [web2py] Important New Year News: PyCon 2014 Tutorial

2014-01-05 Thread Michele Comitini
+1 Good job Clifford! 2014/1/4 Massimo Di Pierro > There will be a web2py tutorial at PyCon 2014. > > https://us.pycon.org/2014/schedule/presentation/133/ > > Congratulations to Clifford Williams for proposing the tutorial and > passing the selection process. > > -- > Resources: > - http:/

[web2py] Why web2py and AnguljarJS?

2014-01-05 Thread Ruud Schroen
I see more and more about using angularjs with web2py. But why? What would be an example of a benefit from using those two. Cause when i look at AngularJS, it already looks alot like web2py. Not saying that it's a bad idea, just wondering ;) -- Resources: - http://web2py.com - http://web2py.com

[web2py] Re: "invalid request" with a simple view

2014-01-05 Thread pythonic . jonathan
> > > I think you should consider going through at least some of the > documentation, as it will be frustrating for you and for us if you just try > random things and keep asking questions about what you're doing wrong. The > Overview chapter is a tutorial -- read the Intro and Overview at leas

[web2py] How to structure json from database query

2014-01-05 Thread pix
Hello, I would like to use a web2py json service but I am not sure how to create the database query to do what I want to output the correct json. This is what I have atm: @service.json def places(): project_info = db(db.project_info.id > 0).select(orderby=~db.project_info.id) project_u

[web2py] OFF TOPIC - deployd

2014-01-05 Thread António Ramos
I like it http://www.deployd.com/ I can imagine DAL as an equivalent and having a DAL.js to be used in the client to connect to the DAL server using websockets. worth a try looking. António -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/

Re: [web2py] Re: Where should I put my application logic code?

2014-01-05 Thread Alex
It's working fine locally but when I try to run it on the server (compiled application) I get the following error: ImportError: No module named myapp.modules.room any idea what I could be missing? on the server the module .py files are under myapp/modules Alex Am Sonntag, 5. Januar 2014 17:25

Re: [web2py] Re: Where should I put my application logic code?

2014-01-05 Thread 黄祥
i think it related with module name, try to change your module file name into unique name. i usually use the app name with the controller file name. e.g. modules/myapp_mycontroller.py of course you can use whatever module file name as you want, but please make it unique. best regards, stifan -

[web2py] Re: How to structure json from database query

2014-01-05 Thread 黄祥
web2py have the table field type 'json', had you already try that? ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Record-representation best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/w

Re: [web2py] Why web2py and AnguljarJS?

2014-01-05 Thread António Ramos
I´m using angular recently and for UI Experience its something out of this world. Well, almost ... :) With angular its very easy to recalc every dom element without goind to the server and refresh the page. Without angular you have to code a lot more with plain javascript or using ajax to tell th

[web2py] Re: "invalid request" with a simple view

2014-01-05 Thread Anthony
> > I've taken a glance at it, but the Overview section alone is ~12,000 words > - that's a *lot* given it's a technical manual rather than a light bedtime > read. Instead I'm working through the examples because I learn better that > way: http://www.web2py.com/examples/default/examples > You

Re: [web2py] drop question

2014-01-05 Thread Marco Mansilla
El Sun, 5 Jan 2014 12:22:00 -0800 (PST) Alex Glaros escribió: > Tried to drop a table and got an error perhaps due to reference to > other table but the error message misspelled "Organization" as > "Orgnization" but I can't find any reference to Orgnization. Doesn't > that mean I had "Organizati

Re: [web2py] drop question

2014-01-05 Thread Alex Glaros
Thanks Marco, I have too many sqlLite constraint violations. I'm just going to delete all tables and add them one at at time. That should do it. Alex Glaros On Sunday, January 5, 2014 6:13:16 PM UTC-8, marco mansilla wrote: > > El Sun, 5 Jan 2014 12:22:00 -0800 (PST) > Alex Glaros > escrib

[web2py] Re: Getting a 'list' object has no attribute 'xml' error when exporting smartgrid data in HTML format.

2014-01-05 Thread Rahul
To be more specific, this ticket is raised if you have applied a filter to your grid and then you try to export in HTML format. Any one encountered the same ? Rahul On Tuesday, December 31, 2013 4:12:22 PM UTC+5:30, Rahul wrote: > > Hi All, > I am getting below exception under web2py 2.8.