Hi Achipa,
Sorry for delay in response. I managed to upgrade my Python2.4.4 to
Python2.6.1 just now, so finally I can play web2py from source. Then I
try your patch. The result is, mm, very strange.
1. First I am using Windows XP Home edition, Python 2.6.1, web2py
source 1.59, ORIGINAL cron.
Hi Massimo,
I spend some time on py2exe and web2py then have some proof-of-concept
conclusion here.
1. web2py is using py2exe now, so it is easy for web2py to have an
official "no-console" edition of web2py.exe.
2. Even better, we can build a traditional web2py.exe and a new web2py-
no-console.
Hi,
last night i found there is no possibility to force DAL to create an
index on some column. Sometimes it is necessary to select records not
only by primary key and in that case index built on some other column
should do the work better than full scans on database.
So I suggest to implement
I have a wiki app which has problems when I try and run it in GAE SDK.
Essentially it is a modifies version of the standard example wiki app
from the web2py book.
The GAE SDK throws an error when I try index view with the following
model, controller, and error output from GAE
model:
db.define_ta
I posted this when I got up - must have been still asleep as problem
is withcreat function
as it is not working there probably is nothing in db table to select?
Here is code for create controller and subsequent error output from
GAE.
Controller:
def create():
"creates a new empty wiki page"
:--)
Glad you are enjoying it...
On Sun, Mar 29, 2009 at 1:30 AM, Michael wrote:
>
> I put that up! :)
>
> I am in love with web2py! I've been a web designer for years, always
> wanting to develop app ideas etc. I just never found the time to learn
> php, or sql, etc. Once all these new framewo
Hello all,
I'm a new guy whit web2py, I have some problem when I Learn web2py!
my controller code:
def basic():
response.menu[['civilized',False,URL(r=request,f='civilized')],
['slick',False,URL(r=request,f='slick')],
['basic',True,URL(r=request,f='basic')
Is it the same. URL is smart enough
On Mar 28, 5:02 pm, Fran wrote:
> On Mar 28, 9:38 pm, Yannick wrote:
>
> > URL(r=request,c='static/js',f='jquery-1.3.2.js')
>
> Should this not be:
> URL(r=request,c='static',f='js',args=['jquery-1.3.2.js'])
>
> F
--~--~-~--~~~---~
If I understand your issue...
One way to do this is
1) put your master.css in applications/yourapp/private/
2) create a controller action in default.py like
def mastercss():
text=open(os.path.join(request.folder,'private/master.css')
# replace the $(...) in text
response.headers[
Can I see the model for db.page
On Mar 29, 6:37 am, murray3 wrote:
> I posted this when I got up - must have been still asleep as problem
> is withcreat function
> as it is not working there probably is nothing in db table to select?
> Here is code for create controller and subsequent error outp
Thank Michael
On Mar 29, 1:30 am, Michael wrote:
> I put that up! :)
>
> I am in love with web2py! I've been a web designer for years, always
> wanting to develop app ideas etc. I just never found the time to learn
> php, or sql, etc. Once all these new frameworks popped out, i spend
> tons of t
response.menu[['civilized',False,URL(r=request,f='civilized')],
['slick',False,URL(r=request,f='slick')],
['basic',True,URL(r=request,f='basic')]]
should be
response.menu=[['civilized',False,URL(r=request,f='civilized')],
['slick',
Thanks a lot for the note and helps I appreciate it... I added the
callback on my ajax function... But I still have problem retrieving
JSON data...Here is the sample example of the JSON converted to string
that i pass to the Action class:
{
"Name":
[
{ "Key1": "value1",
"key2":
I think in the action you should do
import gluon.contrib.simplejson as sj
data=sj.loads(request.body.read())
# then data["Name"][0]["Key1"]=="value1"
On Mar 29, 10:00 am, Yannick wrote:
> Thanks a lot for the note and helps I appreciate it... I added the
> callback on my ajax function... But I
Please let me know what approach you've used...
On Fri, Mar 27, 2009 at 11:35 PM, mdipierro wrote:
>
> There is no standard mechanism for this. One would have to be created.
>
> On Mar 27, 9:48 am, Oliver Heyme wrote:
> > If that's the case I will probably create my own auto mechanism!
> > It w
Yes i think that is what I am looking for! :)
Again, I am a newb programmer! But I wanted to develop a css/design
toolkit for web2py, that I can plugin to my projects everytime so I
don't have to add tons of static files, etc.
I'm compiling a css file with a reset, blueprint grids, and tons of
e
On Mar 29, 1:22 pm, Michael wrote:
> Yes i think that is what I am looking for! :)
>
> Again, I am a newb programmer! But I wanted to develop a css/design
> toolkit for web2py, that I can plugin to my projects everytime so I
> don't have to add tons of static files, etc.
>
> I'm compiling a css
Here's the code:
http://pastie.org/private/wmow1xkoaov5ium6cgf8w
Here's the problem:
ok now a new problem let's say im building a mailbox application (not
like email like a private messaging system) and int he table mailbox I
have account_id (which account its tied to)
On the SQLFORM it shows Acc
Gees, it was right in front of me. Thanks!
Regards,
Jason
On Sat, Mar 28, 2009 at 3:24 PM, Vidul Petrov wrote:
>
> Hi Jason,
>
> tags = db().select(db.tag.ALL,orderby=db.tag.name)
> users = db().select(db.users.ALL,orderby=db.users.nickname)
> tags = db.tag
> users = db.users
>
> sh
I want to buy the book now that I want to make a business with this
product. I couldn't find a link to the book on the website.
Best Regards,
Jason Brower
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web
I also would like to avoid running a query within the controller/
function of db(db.account.name==request.post.account_id) because I
need this function in several places. :)
On Mar 29, 3:19 pm, TheDude wrote:
> Here's the code:http://pastie.org/private/wmow1xkoaov5ium6cgf8w
>
> Here's the proble
I can't seem to connect to my site from other computers. Only from my
localhost addresss (127.0.0.1:8000).
I am using ubuntu linux 8.10.
If I try from my wifes computer and browse to 192.168.0.30:8000 it
doesn't work. But if I go to port 80 I get my apache webserver.
If I try to connect to my si
I wasn't sure if when you do
query = db().select(db.table.ALL)
returns as an array of items?
I am trying to get the last item added into the TABLE. I thought i
could do:
query = db().select(db.table.ALL)
last = query[-1]
return dict(last=last)
but I am getting the following error:
Traceback
Hi Jason,
The startup script should be told to listen on all network interfaces:
python web2py.py -i 0.0.0.0
On Mar 29, 10:36 pm, Jason Brower wrote:
> I can't seem to connect to my site from other computers. Only from my
> localhost addresss (127.0.0.1:8000).
> I am using ubuntu linux 8.10
Happy to know you like it.
http://www.lulu.com/content/4968879
Massimo
On Mar 29, 2:25 pm, Jason Brower wrote:
> I want to buy the book now that I want to make a business with this
> product. I couldn't find a link to the book on the website.
> Best Regards,
> Jason Brower
--~--~-~--~
You can use
class NameValidator:
def __init__(self,error_message='not in db'):
self.error_message=error_message
def __call__(self,name):
users=db(db.users.name==name).select()
if not users: return (name, self.error_message)
return (users[0].id,None)
def
last = db().select(db.table.ALL).as_list()[-1]
On Mar 29, 3:42 pm, Michael wrote:
> I wasn't sure if when you do
>
> query = db().select(db.table.ALL)
>
> returns as an array of items?
>
> I am trying to get the last item added into the TABLE. I thought i
> could do:
>
> query = db().select(db.t
2009/3/29 Jason (spot) Brower
>
> Gees, it was right in front of me. Thanks!
> Regards,
> Jason
>
> On Sat, Mar 28, 2009 at 3:24 PM, Vidul Petrov
> wrote:
> >
> > Hi Jason,
> >
> >tags = db().select(db.tag.ALL,orderby=db.tag.name)
> >users = db().select(db.users.ALL,orderby=db.users.nic
Worked like a charm thanks. :) Also taught me a few things heh ;) Btw,
how was PyCon?
On Mar 29, 5:25 pm, mdipierro wrote:
> You can use
>
> class NameValidator:
> def __init__(self,error_message='not in db'):
> self.error_message=error_message
> def __call__(self,name):
>
I am so jealous - wish I could be there too!
On Mar 29, 12:45 am, TheDude wrote:
> Let us know how it goes! :) Will there be a summary follow up? :D
>
> On Mar 28, 9:27 am, mdipierro wrote:
>
> > See you at the web2py booth after Guido's talk today. (free hats)
>
> > Please attend the web2py D
Here it is I have commented much whilst testing for mistake
thanks for any help
chrism
--
model:
import uuid
try:
from gluon.contrib.gql import * # if running on Google App Engine
except:
db = SQLDB('sqlite://storage.db') # if not, use SQLite or other
DB
else:
db = GQLD
Wouldn't last = db().select(db.table.ALL, orderby=~db.table.id, limit=
(1,))[0] be better? Since this way only one row is being retrieved and
less overhead?
On Mar 29, 5:26 pm, mdipierro wrote:
> last = db().select(db.table.ALL).as_list()[-1]
>
> On Mar 29, 3:42 pm, Michael wrote:
>
> > I wasn'
If you don't need a list, but just the last record, use the return
value from insert:
last_id =db.table.insert(item="some item")
On Mar 30, 2:00 am, TheDude wrote:
> Wouldn't last = db().select(db.table.ALL, orderby=~db.table.id, limit=
> (1,))[0] be better? Since this way only one row is bein
PyCon was great! I will post some more info soon.
Massimo
On Mar 29, 5:44 pm, TheDude wrote:
> Worked like a charm thanks. :) Also taught me a few things heh ;) Btw,
> how was PyCon?
>
> On Mar 29, 5:25 pm, mdipierro wrote:
>
> > You can use
>
> > class NameValidator:
> > def __init__(self
yes. soon
On Mar 28, 8:45 am, TheDude wrote:
> Let us know how it goes! :) Will there be a summary follow up? :D
>
> On Mar 28, 9:27 am, mdipierro wrote:
>
> > See you at the web2py booth after Guido's talk today. (free hats)
>
> > Please attend the web2py Dojo tonight at 6pm in the Open Space.
Yes much better!
On Mar 29, 6:00 pm, TheDude wrote:
> Wouldn't last = db().select(db.table.ALL, orderby=~db.table.id, limit=
> (1,))[0] be better? Since this way only one row is being retrieved and
> less overhead?
>
> On Mar 29, 5:26 pm, mdipierro wrote:
>
> > last = db().select(db.table.ALL).
I don't get this?
I am just trying to display the item added last to a table.
For instance, i have a table of quotes.
I would like to pass variables from that table, and the LAST record to
my view.
such as,
return dict(author=author, quote=quote)
But author, and quote should be from the last
last_id =db.table.insert(item="some item") this method is the best
for you then (all cred to Vidul). Just change last_id to comment and
then pass comment to the view and write down the variables that you
need. :)
Also, this is draginx from IRC, ask your questions there man I'll help
you out aga
Thanks Massimo it works fine... you made my day :)... It was
fine...Thanks this is all fun working on web2py.
On Mar 29, 11:45 am, mdipierro wrote:
> I think in the action you should do
>
> import gluon.contrib.simplejson as sj
> data=sj.loads(request.body.read())
> # then data["Name"][0]["Key1
It's basically a new global list, response.scripts, that is rendered
in the jQuery(document).ready function so you can inject javascript
from the controller. Massimo mentioned that it may go against MVC
separation standards and wanted me to put it out here to get a few
opinions. Sample usage:
d
Hi everybody,
this is a very short summary of what happened at PyCon concerning
web2py.
I have a lightening talk on Saturday morning. 5 minutes only but I
managed to give a demo.
There was this panel discussion
http://www.b-list.org/weblog/2009/mar/28/pycon-orm-panel/
and I think web2py looked
Good question.
I like the idea as it gives us a nice place to put scripts and make them
apply to the views we want very easily. so +1 on that!
Regards,
Jason Brower
On Sun, 2009-03-29 at 20:23 -0700, mr.freeze wrote:
> It's basically a new global list, response.scripts, that is rendered
> in the j
Some clarifications.
Right now one can already do this in views by inserting somewhere:
$(document).ready(function() { do_something(); });
Mr. Freeze's suggestions has pros and cons. In my opinion:
Pros:
- it is more compact
Cons:
- moves into the controller something that (usually) belo
This certainly breaks the MVC architecture, but it is valuable. I
think web2py should be about being able to expand as much as possible
without interfering the people who just want a small and easy
framework (it can be a small plant or a big tree). I do like the idea
of everything going into the s
I personally want to thank Massimo for preparing the slides, and
Wingware.com for providing a 3-O/S WingIDE-Pro liscense (Jon B. was the
winner).
The code sprints for PyCon2009 run this week - I'm going to participate
after work (since I'm in the Chicago area)... there is a cherrypy sprint,
and an
I find this object (response.scripts) very useful, especially if it's
able to manipulate different HTML elements, not only after page load
(__call__ modification?):
response.scripts("$('#post')", "onclick", "$('#post .comments').css
({'value', 'sm.th.'})")
Probably this breaks the MVC views' rul
I may be missing something here, but I do not see any compelling reason for
this... but I do see compelling reasons against this... maybe someone can
explain the rationale they see that lead to this suggestion.
-y
On Mon, Mar 30, 2009 at 1:22 AM, Vidul Petrov wrote:
>
> I find this object (resp
On Mon, Mar 30, 2009 at 1:28 AM, TheDude wrote:
>
> Excellent! I wish there was a video, but I'm sure someone has it
> somewhere on the internet. Good work on the dojo, the only thing I was
> worried about is..
>
> item = db.news_item[request.args[0]]
Yes! - this was a quick introduction to the
On Mon, Mar 30, 2009 at 1:38 AM, Yarko Tymciurak wrote:
> On Mon, Mar 30, 2009 at 1:28 AM, TheDude wrote:
>
>>
>> Excellent! I wish there was a video, but I'm sure someone has it
>> somewhere on the internet. Good work on the dojo, the only thing I was
>> worried about is..
>>
>> item = db.news_
Excellent! I wish there was a video, but I'm sure someone has it
somewhere on the internet. Good work on the dojo, the only thing I was
worried about is..
item = db.news_item[request.args[0]]
If the request.args[0] tries to call from a non existant SQLRow then
it'll throw an error :) Best to app
Thumbs up. Very good idea!
We have had the discussion around MVC. And the conclusion were, that
there is no clear-cut border between MVC. No perfect or true division.
(Java-) scripting functionality in controllers can ease the way for
AJAX forms and functionality in views.
On 30 Mar., 06:15, md
51 matches
Mail list logo