I'm trying to get a row count on a query that joins together every instance
of a coalesce set of fields and coming unstuck.
The query in sql looks like:
select sum(1) from (select count(direction) from tracking
where
direction = 1
AND
left(created,10) = '2014-06-13'
group by COALESCE(ticketnumbe
i m using ckeditor from web2slices
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Gro
Am working on a simple game/app. When I call a variable on web2py view, I
get this error:
quack= duck.quack()TypeError: unbound method quack() must be called with duck
instance as first argument (got nothing instead)
my codes are here: In the module module
from gluon import *class duck():
I'm new to python and web2py...I have a small, but non-trivial, web
application and was looking at the various python web frameworks and decided
to look more closely at web2py and a couple of others and to write a couple
of small example applications to see how they work...
I've had a quick read
Hi Graham - Welcome to web2py ! I think you'll find that this group
has many people who can share many types of design patterns.
Web2py has a lot of ajax built into core the framework. Since the original
intent
was using web2py as a teaching tool, the emphasis may have been on simplicity
(self
Try this in modules
class Duck():
def quack(self):
return 'Quacks like a duck'
def walk(self):
return 'Walks like a person'
Then in the controller
def data_filters():
duck = Duck()
fils = duck.quack()
return dict(fils=fils)
--
Resources:
- http://web
Even better:
class Duck(object):
On Thursday, June 19, 2014 12:34:39 PM UTC-4, Leonel Câmara wrote:
>
> Try this in modules
>
> class Duck():
> def quack(self):
> return 'Quacks like a duck'
> def walk(self):
> return 'Walks like a person'
>
>
> Then in the controller
>
>
Much of the code used to create the form is also re-used when it comes time
to process the submitted form, so submitting back to the same action helps
avoid code duplication. You also don't have to worry about explicitly
specifying a URL for submission. In any case, self submission isn't
necess
I too did a double-take when I first saw this concept when learning web2py
some time ago. I came from a TurboGears environment and the
self-submission was new to me. I didn't like it at first, but now couldn't
image being required to do anything differently. Really simplifies/lessens
the cod
On Wednesday, June 18, 2014 1:50:09 AM UTC-7, Rahul wrote:
>
>
> Hi All,
> I am writing an image gallery in my app. I am stuck up here -
> I want to display images that belong to a particular album when I select
> that album in the view. Although I am able to display albums in the view,
>
Hi guys,
I'm new to this group as well as to web2py. So far I'm really happy with
the way it works!
I managed to run web2py with lighttpd using the fastcgi handler and
configured lighttpd to allow acces over ssl in order to get the admin
interface to work.
Now I have a problem with the admin
You are right Anthony, understood now.
Thanks Massimo for the warning as well.
On Saturday, May 31, 2014 8:07:33 PM UTC+7, Anthony wrote:
>
> On Friday, May 30, 2014 7:59:01 PM UTC-4, Pham Quang Dung wrote:
>>
>> Anybody enlighten me on while this form still updates the data? (I
>> expected it wa
Hello,
I'm creating my first Web App with Web2py and I am amazed of all its
capacities!!
I am thinking of deploying my app in GAE but I only realize now that it
doesn't allow JOIN on table queries. I wanted to use GAE because of
scalability and not having to configure and maintain a server for
Hello
Recently I have upgraded the function dni_urlopu() which is used in a
computed field in the table "urlop".
How can I recompute/refresh all instances of already existing records which
where not properly compute
because of error in previous version of function "dni_urlopu()"
Best regards,
Thank you Anthony! This works :)
Thank you too Carlos
On Monday, June 16, 2014 4:33:05 PM UTC+3, Anthony wrote:
>
> If you want to dynamically add a component in the browser, you cannot use
> the LOAD helper, which is a Python helper that is serialized on the server.
> Instead, use the $.web2py
I am using SQLite and it appears no casting is available (or required?).
But I cannot perform a command like this:
db().select('test'+ db.tab.int_account)
can you show me the right syntax to make it happen?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://gith
*its work now*
routes_in =
(('/admin','/admin'),('/admin/$anything','/admin/$anything'),('/$app/appadmin','/$app/appadmin'),('/$app/appadmin/$anything','/$app/appadmin/$anything'),('/Appname/$profileid/','/Appname/default/index/$profileid'),('/Appname/$profileid/$c/$f/','/Appname/$c/$f/$prof
Hi,
I have some undesired behavior in my app that I was able to resolve, but I
would like to understand what goes wrong.
I could easily reproduce the problem with a simple test-application,
containing two pages and two forms (I'm skipping the boilerplate code that
is created when making a new a
I'm having the same issue. I only have one DB associated with my Heroku
account, and it's properly being set in get_db(), as it shows up in the
stack trace. Heroku says that the DB has no tables in it.
I was curious to see if perhaps there were leftover .table files in the
filesystem when I was
can you explain how used web2py with ractive.js please
Le vendredi 16 mai 2014 18:09:04 UTC+2, Massimo Di Pierro a écrit :
>
> No but I do not like angular. It constrains the JS programming too much
> for my taste. I use ractive.js with bootstrap already without problems.
>
> On Wednesday, 14 Ma
we can be used web2py with ractive ?
Le lundi 16 juin 2014 05:31:16 UTC+2, Massimo Di Pierro a écrit :
>
> I have used Angular for a project and it was a nightmare. I soon moved to
> ractive and did not regret it. Angular forces a scope and, for example,
> promises can only live within the sco
sequence item 0: expected string, long found
Versionweb2py™Version 2.9.5-stable+timestamp.2014.03.16.02.35.39PythonPython
2.7.6: C:\Python27\python.exe (prefix: C:\Python27)Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
Traceback (most recent call last):
File "G:\Dropbox\Coding Project
Hey Everyone,
So my problem is this. In my application admins are able to create
discussion groups and invite users to join them, so I have made a form to
do that. For various reasons I decided to make my own tables to keep track
of groups and members of the groups instead of using the built i
I am trying to import a csv file into a table in a database. I don't always
know the number of columns I will have. This is where I am having my
problems. I can't find anywhere how to dynamically add columns to a table.
Does anyone have any ideas on how to do this?
Thank you in advance.
--
Re
I have been struggling with trying to manipulate a database the way I want
to. I have a csv file that I am trying to upload to a table in one of my
databases. The problem I am having is that the number of columns is always
changing. I never know how many columns I will have. So I am trying to
d
Noelse mentioned Backbonejs yet? working on a project with it now, but do
not care for it too much, I am thinking of switching to AngularJS actually.
On Sunday, June 15, 2014 10:34:25 AM UTC+2, Massimo Di Pierro wrote:
>
> Often Angular comes up on this list. I tried it and I was un-impressed.
>
Dear all,
In my javascript code, I would like to have sth like this,
$.getJSON(url_to_REST_api, {
group: 0,
sensors: sensorIDs
}, function(res) {
timestamp = res['timestamp'];
data = res['data'];
});
However, sensorIDs is a rather l
It may be that response.static_version is enabled but the web server is not
setup to handle the resulting URL. Try using your browser's developer tools
to see what the URL for the missing files is; if it includes
/static/_#.#/some/file.CSS this is your problem. See the deployment section
of the
think it is a bug. pushing a new version that should fix that. Check trunk
in 5 minutes.
On Monday, 16 June 2014 09:17:01 UTC-5, Omri Levy wrote:
>
>
> sequence item 0: expected string, long found
> Versionweb2py™Version 2.9.5-stable+timestamp.2014.03.16.02.35.39PythonPython
> 2.7.6: C:\Python2
This is a bug. Can you please open a ticket?
On Monday, 16 June 2014 10:39:33 UTC-5, Greg Vaughan wrote:
>
> Heading says it all... no problems using localhost IPv4...
>
> Is this expected behaviour? Seems rather strange if so...
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Docu
You cannot dynamically add columns. Do you have a superset of possible
column names? If so, give a default value to the optional ones.
On Monday, 16 June 2014 10:46:31 UTC-5, Alex Steinkamp wrote:
>
> I am trying to import a csv file into a table in a database. I don't
> always know the number o
You can do:
jQuery.ajax({
type: "POST",
url: url,
data: JSON.stringify(data),
success: callback,
dataType: "json",
contentType: APPLICATION_JSON,
an you explain what you are trying to achieve? I am not sure from the
example.
On Tuesday, 17 June 2014 01:29:11 UTC-5, Pham Quang Dung wrote:
>
> I am using SQLite and it appears no casting is available (or required?).
> But I cannot perform a command like this:
> db().select('test'+ db.tab.int
I do not think this has to d o with virtual hosts. It appears you are
storing unpickleable options in session.
On Tuesday, 17 June 2014 02:51:44 UTC-5, kita...@gmail.com wrote:
>
> Hi,
> I have a strange error with my sessions. I am running Apache 2.2.12,
> mod_wsgi 4.1.2, Python 2.7.6. I keep
In this thread there are lots of references to various libraries but they
are not all the same and serve different purposes.
I like sugar.js and ractive.js
sugar.js is similar to underscore.js+moments.js and it extends basic
objects like Date, Array, and String so that they have more methods.
Hi Massimo,
Thanks , I experience this bug a lot, I think it's when I update list of
references to the same table in the db.
Can you please explain how to update? (do I need Git?) / Manually fix it?
Thanks again ,
Omri.
On Friday, June 20, 2014 1:17:08 AM UTC+3, Massimo Di Pierro wrote:
>
> th
OK, I hope that I can help with that.
I don't know what you mean by "show runtime preview in div". The editor is
designed to be "attached" to certain fields in a form, as instructed in the
web2py slices page.
The editor works fine as the plugin instructs, when used in the browsers
that I have
*Please Help !!!*
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2
Massimo, in angularjs, if you want use Promises in all the application
scope, you need Factory o services, example :
var module = angular.module('myapp', []);
module.service('userService', function(){
this.api = $http.get('http://example.com/blog/default/index/blog.json');
});
// controller
Hi,
I did some more testing -> uploads in a work just fine; it seems to go
wrong with our automatic thumbnailing stuff.
The thumbs were saved on disk (static/thumbnails) via a compute lambda
construction.
Field('logo','upload', requires=IS_IMAGE(), label=T('Members logo')),
Field('logo_thumb_1
Actually ticket URLs are also broken in this way (since it sends to
/admin/ticket instead of to BASE + /admin/ticket...
On Monday, May 12, 2014 10:06:56 PM UTC-4, cowbert wrote:
>
> When BASE is specified in a parameterized router, and an unauthenticated
> session tries to go to the appadmin URL
>
> trying to find out more about $.web2py.component, but it's not in the
> book. Chapter 11 mentions web2py_ajax_component but it isn't mentioned
> in Chapter 12 as indicated.
It used to be web2py_component (actually, you can still use that), but now
it's $.web2py.component.
Anthony, I don
> *"I am tempted to say Angular is to Django as Ractive is to web2py.*"
>
On Thursday, June 19, 2014 5:41:31 PM UTC-5, Massimo Di Pierro wrote:
Good way to put it!
Besides, angular has routing and other functioinalities that web2py already
has. It doesn't make much sense having to learn and a
Download this:
https://github.com/web2py/web2py/archive/master.zip
Unzip it and copy web2py over the old one.
On Thursday, 19 June 2014 17:28:41 UTC-5, Omri Levy wrote:
>
> Hi Massimo,
>
> Thanks , I experience this bug a lot, I think it's when I update list of
> references to the same table in
Hello Prachi,
On GAE there are no session files.
I am assuming you store sessions in a session table. Recommended behavior
on GAE. You can access the table through the Google Dashboard. You can use
the Dashboard to delete everything in that table and it will logout
everybody. The file name co
In ractive there is nothing equivalent to this;
module.controller('FooController', function($scope, userService){
$scope.data = userService.api.success(function(data) .etc.. );
});
You do not have to bind a controller to a scope. You can still do this:
Hello {{yourName}}!
Notice no ng
Thanks! for replying Dave. While I am open to suggestions, I plan to
redirect the request such that as soon as the user clicks on any album
thumbnail - he gets redirected to a page (perhaps viewalbum.html) where all
images belonging to a particular album are listed.
Thanks, Rahul.
On Friday,
Hey everyone,
I'm glad people have have discovered the RapydML and RapydScript! I
helped develop the original RapydScript, so I can answer some questions
about that. I also have experience with RapydML, but have not really tried
anything tricky with it (about the same level as the Readme).
Can you please help me in comparing two datetime values in db?
I mean i need to select few records in db which lies between a certain
duration of time.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.googl
49 matches
Mail list logo