I had a similar problem to solve and tried several solutions. The one that
worked best for me is a 'super' table 'node' and 'sub' tables
'organization', 'person' and 'groups' (groups because group is a reserved
word) and in the auth_user table a field referencing the id of table
'node'. Table
Sometimes the app does not react on web requests. Restarting apache
sometimes helps. That is why I went to the Apache logs to find out what
was going on.
Regards
Johann
On 6 June 2013 21:01, Niphlod niph...@gmail.com wrote:
ehm... I maybe missing something but your traceback starts here
I'm trying to concatenate the results of two represents clauses for the
same field: relationshipTypeIDThe first represents clause returns
subjectAreaCode and the second returns relationshipTypeCode. Without
all the queries, this could normally be accomplished by '%(field_1)s
HI,
I'm not totally sure what the gpio file is about, but an easy way to do it
is to have while loop in a python file. Each time it goes through the loop
it can do things like check the serial line for sensor data, run any
automated items like turning on the lights in the evening, and read for
Sorry to disappoint you but raspberry pi go a lot better with nodejs
javascrcipt framework.Almost no CPU usage
check this
http://pijs.io/
2013/6/10 Jason (spot) Brower encomp...@gmail.com
HI,
I'm not totally sure what the gpio file is about, but an easy way to do it
is to have while
Sounds interesting. Personally my system ran with very little cpu at all.
There are way to make it run effeciently.
Node is a fun new technology, but I personally don't trust it for
commercial use yet. It's still at that young and fragmenting stage so the
technology could change to fast. :)
Have
Thanks Jason and Antonio for your help.
Jason, thanks for the additional tips and info. You are right is not web2py
related, it's just python related when it comes to having the GPIO working,
then again anything assembled with web2py is related to it... the GPIO file
contains that while loop
If you want to return the results in a google results page it is easy
form action=https://www.google.com/search;
input name=q/
input type=submit value=search /
/form
If instead you want to send the query to your server, you want the server
to ask google and return the results in JSON, than you
locs=[row for row in dept_locs if row.id in todept_locs.as_dict()]
The . was missing.
On Monday, 10 June 2013 00:21:43 UTC-5, webpypy wrote:
locs=[row for row in dept_locs if row.id in todept_locs as_dict()]
is invalid syntax.
what is the problem?
--
---
You received this
Hi,
I am trying to create a web2py app from command line with -S ...
However, I would like to create an app without the No app, Create one?
question. Is there someway I can create it in a forceful manner.
I have tried app_create() from gluon.admin but there I face the problem of
the
Assuming you are under the web2py folder using the linux Bash shell you can
do
mkdir applications/appname
cd applications/appname
tar zxvf ../../welcome.w2p
If instead you want to do it from Python, also assuming you are in the
web2py folder:
import os
from gluon.admin import w2p_unpack
Hi,
I have multitenancy application, in my application i have a table called
countries where i have fields:
id
name
alpha_2_code
alpha_3_code
numeric_code
request_tenant
My loged user has request tenant value of 3 but in my log i see query
without this condition:
SELECT country.id,
I' not spanishhh.
Portuguese from Portugal.
I have a web2py app to control all outside workers via an RFID reader. I
use arduino to read the card and send it via serial. Then in the
local PC I have nodejs to read it and call a web2py service that via
tornado sockets updates a web page.
My web2py
I found the solution to my problem but i still dont understand why this
doesnt workd like it should.
Line:
rows = db().select(db.country.ALL, limitby=limit_by)
Must be:
rows = db(db.country.id 0).select(db.country.ALL, limitby=limit_by)
And then request_teneant = 3 is added as a condition
Hello All
I am using the layout pluggin's provided by web2py and I observed that
browser independence and screen resolution independence has not been
handled properly in them. Can anyone suggest me how to resolve these
problem???
--
Thanks
Apoorve
--
---
You received this message
OK, I'm starting to think it's a wrongly defined table. The table I would
like to import has following structure:
CREATE TABLE `cities` (
`ID` int(8) unsigned NOT NULL auto_increment,
`country` char(2) NOT NULL,
`region` char(3) NOT NULL,
`url` varchar(50) NOT NULL,
`name` varchar(50)
Yeah, the question is: how 'country' can be a UNIQUE KEY if countries have
hundreds of cities. In the table, hundreds of cities will have the belong
to the same country, so the no wonder the contry code (which is two
letters) will not be unique. I'm confused.
On Monday, June 10, 2013 12:59:26
Further with my monolog... Seems I need to implement this im my table
definition:
UNIQUE KEY `country` USING BTREE (`country`,`name`,`region`)
How do I do it in web2py?
On Monday, June 10, 2013 1:24:20 PM UTC+2, lesssugar wrote:
Yeah, the question is: how 'country' can be a UNIQUE KEY if
Thanks. (Sorry for the ugly font size in my earlier related message.)
On Sun, Jun 9, 2013 at 2:59 PM, Alan Etkin spame...@gmail.com wrote:
is it my web2py version which gets used?
My bad, I meant the web2py instance in pythonanywhere
--
---
You received this message because you are
OK, found a way around. I executed the following commands in postgres and
the CSV file imported correctly:
ALTER TABLE city DROP CONSTRAINT city_country_key;
ALTER TABLE city ADD CONSTRAINT city_country_key UNIQUE (name, country,region
);
Cheers.
On Monday, June 10, 2013 1:36:47 PM UTC+2,
I think most of those templates come from http://www.freecsstemplates.org/ and
pre-date responsive design principles. It's all HTML and CSS, so you'll
have to consult other resources to figure out how to achieve what you want.
If you have specific questions (particularly that are specific to
Hello,
I'm using web2py since a few months and this is my first message on this
group. I hope it's the right place to report what seems to be a little bug.
I'm actually developping a web2py application on top of an oracle
database. By convention, all the primary keys of the database
Tell us more. Have some pictures or screenshots?
On Monday, 10 June 2013 05:21:50 UTC-5, Ramos wrote:
I' not spanishhh.
Portuguese from Portugal.
I have a web2py app to control all outside workers via an RFID reader. I
use arduino to read the card and send it via serial. Then in the
Thank you. Can you please open a ticket about this?
On Monday, 10 June 2013 05:28:16 UTC-5, Lionel Tokarz wrote:
Hello,
I'm using web2py since a few months and this is my first message on this
group. I hope it's the right place to report what seems to be a little bug.
I'm
It is a bug. Please open a ticket about this (there may actually already be
a ticket about this).
On Monday, 10 June 2013 05:25:26 UTC-5, Domagoj Kovač wrote:
I found the solution to my problem but i still dont understand why this
doesnt workd like it should.
Line:
rows =
Hello all
What are the steps to publish a website/app on web2py poweredby or
appliances?
Thank you
--
---
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
If there's a NULL value in my postgresql DB, SQLFORM.grid renders it as
None. Is it there something that can be done globally for an SQLFORM.grid
that would simply make it display all NULL values as an empty string (i.e.
not display anything in the grid for NULLs), or does that have to be
You could do both queries within the lambda and put the results together
with string formatting:
lambda id, r: '%s %s' % (
db((db.RelationshipType.id==id)
(db.RelationshipSubjectArea.id == db.RelationshipType.
relationshipSubjectAreaID)
Ok, I will report it on google code this evening.
Le lundi 10 juin 2013 15:16:08 UTC+2, Massimo Di Pierro a écrit :
Thank you. Can you please open a ticket about this?
On Monday, 10 June 2013 05:28:16 UTC-5, Lionel Tokarz wrote:
Hello,
I'm using web2py since a few months and this is
If it's a live site or a demo of an open source project, then you can post
it on the poweredby site yourself (click the Site Create link at the
top). If it's just code but you don't have a site running it, then it
doesn't belong on poweredby. To post in appliances, the request goes to
Massimo.
I started a discussion about it
here:
https://groups.google.com/d/msg/web2py-developers/E9ug6m6WHhE/XkPjiojqTOIJ.
I was think it might be possible to just specify a base prefix which would
get used both to name the session object and to prefix all the table names
(the default would be auth,
Interesting. There's huge potential for projects like this:
- http://javelinapp.com/
(http://pandodaily.com/2013/06/10/javelin-the-lean-startup-app-thats-a-product-of-lean-startup-methodology/)
-
http://www.kickstarter.com/projects/jmitchel3/coding-for-entrepreneurs/?ref=kicktraq
I´m working on putting here some screenshots or a video showing it.
So far
My arduino hardware...
https://www.dropbox.com/s/rii867stp80pp5z/2013-05-09%2011.15.07.jpg
https://www.dropbox.com/s/0vpsfluq3z0kub4/2013-05-09%2012.17.46.jpg
I use:
fullcalendar
pypdf for the printing cards on the rfid
uhm. I'm not sure I understood what is the bug if you defined tables as
db.define_table('somwthing',
Field('acc_rn', 'id'),
Field('...'),
)
Il giorno lunedì 10 giugno 2013 15:56:53 UTC+2, Lionel Tokarz ha scritto:
Ok, I will report it on google code this evening.
Le
The second one you said (i.e. altering the default repr for None values).
From a theoretical standpoint, a null value is not an empty string. If
your app doesn't care for the difference, set a default='' on the
interested fields.
Il giorno lunedì 10 giugno 2013 15:42:21 UTC+2, Lamps902 ha
sorry to interrupt your monologue but, BTW, web2py's table definition has
no notion of compound unique indexes, so the only way to enforce them (if
you need those) is to alter the table manually (as you did).
Il giorno lunedì 10 giugno 2013 14:51:05 UTC+2, lesssugar ha scritto:
OK, found a
do you have a VERSION file in the folder ?
Il giorno domenica 9 giugno 2013 22:44:36 UTC+2, mike dawson ha scritto:
I downloaded the latest zip file from the web site and unzipped it to
/usr/share/web2py folder
(after deleting the old copy that had been there)
On Sunday, 9 June 2013
Thanks for the clarification, Niphlod.
On Monday, June 10, 2013 10:32:33 AM UTC-5, Niphlod wrote:
The second one you said (i.e. altering the default repr for None values).
From a theoretical standpoint, a null value is not an empty string. If
your app doesn't care for the difference, set a
Correct, the column not found is the eft one.
Below is the error message:
class 'gluon.contrib.pymysql.err.InternalError' (1050, uTable
'auth_user' already exists)Versionweb2py™Version
2.5.1-stable+timestamp.2013.06.06.15.39.19Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
Also, to clarify I'm trying to add this column after I've done some
development and already had an auth_user table created... don't think this
should matter, but wanted to throw this out there. Maybe I need to
manually drop the MySQL table and then see if the migration works with the
Thank you, Massimo.
the following works fine.
locs=[row for row in dept_locs if row in todept_locs]
is as_dict() not mandatory all the time?
Please, explain.
Regards,
Ashraf
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To
Good to know, thanks.
W dniu poniedziałek, 10 czerwca 2013 17:35:04 UTC+2 użytkownik Niphlod
napisał:
sorry to interrupt your monologue but, BTW, web2py's table definition has
no notion of compound unique indexes, so the only way to enforce them (if
you need those) is to alter the table
I've asked this one before, but didn't get an answer; perhaps I was being
too vague, so I'll give it another shot with more detail:
I've got a primary postgresql database (db1), and I've set up a separate
postgresql database (db1_archive) used for archiving several of the tables
from db1.
I am using the Windows web2py.exe binary version Version
2.4.7-stable+timestamp.2013.05.29.16.40.45.
I need to know if web2py.exe supports multilingual, case-independed
matches, such as
SELECT FIELD LIKE 'à' -- should match when field value is 'À' (uppercase)
and field is defined as FIELD TEXT
That's exactly how I define the tables.
In fact the bug appears when web2py generate the database. As there is no
automatic numbering in Oracle, it needs to generate a sequence containing
the value of the primary key and a trigger that get a new number and
attribute it to the primary key of a
On Monday, 10 June 2013 10:14:36 UTC-5, step wrote:
I am using the Windows web2py.exe binary version Version
2.4.7-stable+timestamp.2013.05.29.16.40.45.
I need to know if web2py.exe supports multilingual, case-independed
matches, such as
SELECT FIELD LIKE 'à' -- should match when field
Try, in order:
1)
db = DAL(...,fake_migrate=True)
...
# auth.settings.extra_fields['auth_user'] = [Field('eft', 'integer')]
auth.define_tables(migrate=True)
run appadmin.
2)
db = DAL(...)
...
auth.settings.extra_fields['auth_user'] = [Field('eft', 'integer')]
auth.define_tables(migrate=True)
It should not work without .as_dict(). Are you sure it does?
On Monday, 10 June 2013 10:53:07 UTC-5, webpypy wrote:
Thank you, Massimo.
the following works fine.
locs=[row for row in dept_locs if row in todept_locs]
is as_dict() not mandatory all the time?
Please, explain.
Regards,
The 2nd example, function, gets an error:
- In the controller the function error is: type 'exceptions.NameError'
name 'rtid_represent' is not defined
- If I put the function in the model, error is: type
'exceptions.SyntaxError' 'return' outside function (db.py, line 1013)
The
Tried step 1. I get the same 'auth_user' table already exists.
class 'gluon.contrib.pymysql.err.InternalError' (1050, uTable
'auth_user' already exists)
Step 2 gave the same error. Seems like whenever migrate is set to True
when define_tables is run, I'm getting the table already exists
I am passing the string {'POST' : 'query POST'} to my Web2py server code.
Looking at gluon/main/py and tracing into sj.load(body) at line 225
leads to Python/Lib/json/decoder.py but eventually gets to errmsg(), line
36, with
msg = Expecting proper name.
doc = [{'POST' : 'qwerty POST'}]
pos = 2
Post the whole traceback.
Also, I just want to make the comment that what you put here is not valid
json...
{'POST' : 'query POST'}
Single quotes aren't allowed.
Verify your json by going here:
http://jsonlint.com/
Also, before using JSON you might want to read the spec.
http://www.json.org/
Yes I had a VERSION file in the folder.
Version 2.5.1-stable+timestamp.2013.06.06.15.39.19
This is now fixed.
I deleted the folder again
I uninstalled the binary version
I unpacked the zip file into a new folder as superuser
Started superuser terminal session
cd in /usr/share/web2py
I ran python
Thanks for the reply, Niphlod.
Now there was the following question:
I add the following lines to the controller before the grid = SQLFORM.grid
...
warn = db.executesql ('SELECT t.level_warn FROM TEMPER_RC t;')
for val in warn:
if (val == (1)):
db.TEMPER_RC.level_warn.represent
Sorry my bad deduction ;P Eu no falo Portugues (only IT/EN/ES)... but in all
cases: muito obrigado Antonio! :D
On Jun 10, 2013, at 6:21 AM, António Ramos wrote:
I' not spanishhh.
Portuguese from Portugal.
I have a web2py app to control all outside workers via an RFID reader. I use
Very interesting indeed! I'd love to read your blog/tutorial or watch your
video on this project. Very interesting one... btw I love the wooden box for
the RFID.
Keep up the great work Antonio!
Cheers! :)
On Jun 10, 2013, at 10:46 AM, António Ramos wrote:
I´m working on putting here some
I've been a Fibervolt customer for about a year. When it's up the
performance is great, but recently there's been frequent downtime at both LA
and Chicago. Even though they advertise 99.9% uptime, according to
serverbear.com they actually only get 81.74% currently. Right now the
Chicago Data
there are multiple errors (and lots of unnecessary parenthesis).
first of all, define a single function to represent your value
def represent_colored(value):
if value == 1:
return .. --green
elif value == 2:
yellow
elif value == 3:
I'm quite confident that you did something wrong cause usually the binary
distribution works only on windows. Anyway, I'm glad you resolved ^_^
On Monday, June 10, 2013 7:20:31 PM UTC+2, mike dawson wrote:
Yes I had a VERSION file in the folder.
Version
uhm. web2py handles usual encoded forms in multipart/form-data and
application/x-www-form-urlencoded without problems. Additionally recent
releases parse automatically into request.vars all requests that POST a
json body if they're handled with content-type : application/json.
Inspect your
so probably you don't have an *_auth_user.table in the databases/* folder.
Can you confirm ?
On Monday, June 10, 2013 6:38:18 PM UTC+2, Andre Kozaczka wrote:
Tried step 1. I get the same 'auth_user' table already exists.
class 'gluon.contrib.pymysql.err.InternalError' (1050, uTable
Earlier today I posted a message to this group via google groups web
interface. My message still isn't showing in google groups, but it is in
the osdir archive of google groups? Is this normal or is google groups web
interface not trustworthy? Link to my OP
JSON isn't Python :)
Of course single quotes was the issue!
I've now got data from my Java GWT client app. I'm using JSON because
JavaScript luvs JSON and GWT overlays makes handling such data very
straightforward.
On Monday, 10 June 2013, Niphlod wrote:
uhm. web2py handles usual encoded
now I understand. Usually you use web2py with 'id' when web2py handles the
creation of the tables, but you can use Field('whatever', 'id') with
legacy tables that already exist. You, on the other hand, need to have a
Field('whatever', 'id') in tables directly managed with web2py. That was
the
Correct, I do *not* have that file in the databases folder.
On Monday, June 10, 2013 3:16:42 PM UTC-4, Niphlod wrote:
so probably you don't have an *_auth_user.table in the databases/* folder.
Can you confirm ?
On Monday, June 10, 2013 6:38:18 PM UTC+2, Andre Kozaczka wrote:
Tried step 1.
I'd go for filing a bug on web2py's issues and just removing the constraint
on your archive tables. nothing should break.
I think that the code creating the archive tables is just the one used to
create the original one, so the archive table gets created with the same
constraint as the
No problem, I was probably not explicit enough in my first message.
I will create the issue, even if I found a working solution, I think it could
be useful for other people.
btw, thanks for the answers and the reactivity.
--
---
You received this message because you are subscribed to the
Yes the wooden box is fantastic!
On Monday, 10 June 2013 13:51:06 UTC-5, freäk qnc wrote:
Very interesting indeed! I'd love to read your blog/tutorial or watch your
video on this project. Very interesting one... btw I love the wooden box
for the RFID.
Keep up the great work Antonio!
that's why web2py is trying to create a table on your database.
let's try this
db = DAL(., fake_migrate=True)
#auth.extra_fields[''] =
auth.define_tables(fake_migrate=True)
this will recreate the relevant file. Be sure to comment out your
extra_fields definition so the fake
Worked as described. Thank you!
On Monday, June 10, 2013 4:03:24 PM UTC-4, Niphlod wrote:
that's why web2py is trying to create a table on your database.
let's try this
db = DAL(., fake_migrate=True)
#auth.extra_fields[''] =
auth.define_tables(fake_migrate=True)
this will
The woden box its one piece only with a hole to fix the arduino nano and
the rfid reader.
A friend made it.
I asked him to make another one.
I need 2 boxes, one to be used in the entrance of our company, so users can
pass the card to enter.
The other to be used by our security dept to issue cards
So far, this seems to work fine. I struggle though when trying to write
this data in my database.
I tried doing:
data = sj.loads(request.body.read())
#and later
return dict(db.someDatabase.insert(data))
#or
return dict(db.someDatabase.validate_and_insert(data))
for all of which I got the error
return dict(db.someDatabase.insert(**data))
#or
return dict(db.someDatabase.validate_and_insert(**data))
On Monday, 10 June 2013 15:58:16 UTC-5, Philipp Müller wrote:
So far, this seems to work fine. I struggle though when trying to write
this data in my database.
I tried doing:
data =
ps: recent web2py releases should parse application/json POSTs
transparently, no need to request.body.read() anymore it goes all in
request.vars and request.post_vars as usual.
On Monday, June 10, 2013 11:02:36 PM UTC+2, Massimo Di Pierro wrote:
return dict(db.someDatabase.insert(**data))
Thanks so much. This works for
dict(db.someTable.validate_and_insert(**data))
but for some reason not for
dict(db.someTable.insert(**data))
That's fine for me, I'm just wondering though.
Btw: What exactly does ** do in this case?
Thanks again and regards,
Philipp
Am Montag, 10. Juni 2013
Thank you very much for that suggestion! It solved my problem, for which
I'm most appreciative.
Thanks jonten!
On Sunday, June 9, 2013 5:17:47 PM UTC-4, jonten wrote:
I had a similar problem when I recently did a setup with Web2py and Apache
which I did not want to dedicate to the directory
When enable_record_versioning is being utilized, db rows aren't actually
deleted, but the is_active bit is flipped off instead. As far as I can
tell, this means that the _after_delete callback for a given table won't be
called, which is problematic when you are using this callback to
Thanks a lot, Niphlod! I'll go ahead and file it.
On Monday, June 10, 2013 2:29:38 PM UTC-5, Niphlod wrote:
I'd go for filing a bug on web2py's issues and just removing the
constraint on your archive tables. nothing should break.
I think that the code creating the archive tables is just the
does anybody know what happens to web2py.com/plugins? :)
On Monday, 10 June 2013 04:16:59 UTC+2, Oleg wrote:
subj.
--
---
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
I've frankly never tried to pass two values with the same name, so I have
no idea how I'd do it. I suppose I'd extend the CSV beyond the RFC 4180 by
adding in subfields and a seperator of '^' as is commonly done.
Yes, building your own serialization is a task to be done. You'd have to do
that
I could see your original post trough the web interface and I still see it,
the link to it is
https://groups.google.com/d/msg/web2py/8wMlTzRixq0/udOdjEerFeUJ
I've seen others mention that posts sometimes disappear and I had this
happen once to me... And it was one of the longest posts I've
Hi Massimo,
I haven't been able to isolate the reason for our memory leak other than
having it be triggered when encountering an unknown page (i.e. 404 page).
The investigation continues and will definitely keep you posted, especially
if the problem is with web2py and not our own application
I wrote some code here extending auth to create different sessions...
Then I could create here the second instance of Auth...
However I strongly think you are right... do all that code is not worth...
too much code and handling to solve a minor problem...
the field in the auth table is much
welll... this should work:
db.someTable.insert(**data)
but insert returns a number (actually a Reference object) and therefore you
cannot pass it to a dict as in:
dict(db.someTable.insert(**data))
Insert and validate returns a dict instead (containing the id and errors)
On Monday, 10
I do not have a good answer but with of all I would try isolate the
problem. Can you reproduce it with the built-in web server? Can you
reproduce it with a smaller application? Can you reproduce it with am app
that does not use cache? etc. If you could post a minimalist code to
reproduce it,
I agree there is a problem. For now I have disabled it. I will check
tomorrow. I think it is a caching issue.
On Monday, 10 June 2013 17:13:21 UTC-5, Oleg wrote:
does anybody know what happens to web2py.com/plugins? :)
On Monday, 10 June 2013 04:16:59 UTC+2, Oleg wrote:
subj.
--
---
files presented below:
controller
modules
models
and throws error
controller:
##
@auth.requires_login()
def update():
ubicacion = db.ubicacion(auth_user=auth_user_id)
db.ubicacion.ciudad_pais.widget = SQLFORM.widgets.autocomplete(
request, db.ciudad_pais.nombre, min_length=2,
Can you use the _after_update callback instead?
On Monday, June 10, 2013 5:32:12 PM UTC-4, Lamps902 wrote:
When enable_record_versioning is being utilized, db rows aren't actually
deleted, but the is_active bit is flipped off instead. As far as I can
tell, this means that the _after_delete
On Monday, June 10, 2013 12:18:51 PM UTC-4, Alex Glaros wrote:
The 2nd example, function, gets an error:
- In the controller the function error is: type
'exceptions.NameError' name 'rtid_represent' is not defined
- If I put the function in the model, error is: type
Anthony,
I forgot that the “represent” clause could be in the controller. Yes, it
works fine, thanks!
I was wondering if you could help me with a problem that I’ve been
submitting for months without getting any reply posts.
I’m looking for a best practice example of a way to
90 matches
Mail list logo