hi Gael,
I think you have to do a join in your query to l1 table to add that field
to grid so it can be searched on. Otherwise, w2p only sees the primary key
id in l1.
Alex
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source
Hi all,
I just updated one of my projects to 2.9.12 and after that all views that
have a code like this does not work:
SCRIPT('somecode(' + response.json + ')')
the response.json is changing the content-type of the page to json...
if we use:
return response.json
there will be no problem,
Do you mean the clear the sessions folder under web2py\applications\admin?
I tried it anyway but the same error...
On Wednesday, January 21, 2015 at 1:40:43 PM UTC-6, Omi Chiba wrote:
The problem occurs for admin app.
Do you mean the clear the sessions folder under web2py\applications\admin?
irregardless of the business logic there's a simple caveat with web2py
grid (and reference fields in general).
for a field to be ordered (or searched, as it poses the exact same deal)
correctly, web2py would have to fetch for each row of the table (not the
page, the entire table) the reference
On Tuesday, January 20, 2015 at 5:18:23 AM UTC-8, Y wrote:
Hello
What are the usual steps for designing a web2py application?
Step 1: Ask what is the site going to show?
Does that fit onto one page or several? What sort of data is involved?
Who can see it? Who can change it? What
Hi,
On 21/01/15 16:13, Omi Chiba wrote:
Hi, I clicked the upload on admin and tried to upgrade from 2.4.6 to
2.9.12. As soon as I clicked I got ticket but cannot see the ticket
because now I get a ticket to see the ticket... It means I cannot open
admin site. My app is still working fine.
I
On Wednesday, January 21, 2015 at 6:09:26 AM UTC-8, Anthony wrote:
On Tuesday, January 20, 2015 at 10:45:53 PM UTC-5, Dave S wrote:
As mentioned in another thread, I started using
TAG.BUTTON('label _type=submit, _name=mybutton,
_value=buttonvalue,
This error is different from the other one, all you need is to clear the
sessions, compiled and cache folders on your apps and everything will be
fine.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
am a beginner also, please excuse my fishing around for more info
I don't see details-creating code above
can you post latest version?
thanks
Alex
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Here is the reason why:
Before 2.9.12 it was (globals.py):
def json(self, data, default=None):
return json(data, default=default or custom_json)
Now it is:
def json(self, data, default=None):
if 'Content-Type' not in self.headers:
self.headers['Content-Type'] = 'application/json'
return
Thanks Alex in fact the join resolve this problem.
Then putting only l1.categories.name and l2.categories.name in the grid it
looks fine.
But now in the details view I have the l1_categories.id instead of the name.
query = db.l1_categories.id==db.l2_categories.l1_category
fields =
On Wednesday, January 21, 2015 at 6:09:26 AM UTC-8, Anthony wrote:
On Tuesday, January 20, 2015 at 10:45:53 PM UTC-5, Dave S wrote:
As mentioned in another thread, I started using
TAG.BUTTON('label _type=submit, _name=mybutton, _value=buttonvalue,
Db is the same
Controler is the one i've post before:
query = db.l1_categories.id==db.l2_categories.l1_category
fields = (db.l1_categories.name,db.l2_categories.name)
grid = SQLFORM.grid(query=query, fields=fields, csv=False, links_in_grid=
False, links=None, searchable=False, editable=True,
The problem occurs for admin app.
Do you mean the clear the sessions folder under web2py\applications\admin?
I didn't migrate admin app so this should be all empty from the
beginning... or are you talking about apache?
On Wednesday, January 21, 2015 at 1:20:42 PM UTC-6, Leonel Câmara wrote:
I'd like a db(query).select(...) operation to return a set of rows in which
there can only be one instance of a row with a particular value for a
certain field. My query is like this:
book_query = ((db.t_article.f_book_id != None)
(db.t_article.f_book_id == db.t_book_image.id))
On Tuesday, January 20, 2015 at 2:28:04 PM UTC-8, E. Wilson wrote:
I'm new to web2py and have been doing tutorials to set up simple apps. I
want to create a blog using web2py with an option where readers can
subscribe to my newsletter using their email address. I have yet to find
Thank you.
Am Dienstag, 20. Januar 2015 16:36:57 UTC+1 schrieb José L.:
Ubuntu takes this package from Debian. I will update the package in Debian
soon, with version 2.9.12 (or maybe .13 if some problems from this list
are confirmed).
Then, you can ask Ubuntu to pull it from Debian.
I guess this is a repeat of
https://groups.google.com/d/msg/web2py/jD50nsb0hXs/r6Wm4Wu2IrIJ
--
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
Thank you again - I did not put that together after the first email. I
realize now that I should have realized what you were saying would solve my
problem.
Really appreciate your help.
Tom
On Monday, January 19, 2015 at 11:32:15 PM UTC-8, Niphlod wrote:
On Monday, January 19, 2015 at
Dear all,
I have a sqlite file test.sqlite, stored in /static/db/, and that contains
a 'Name' table with fields title, number and def.
I have checked that file with sql_browser and the content is Ok.
I just mean to read only the table (never add/remove/edit)
I import the sqlite file in db.py
Hello!
I'm stuck, please help! :)
Trying to setup web2py on FreeBSD jail, so no 127.0.0.1 is available in
jail. Using Apache with SSL, mod_proxy, self signed SSL certs.
Execute web2py: python web2py.py -i localhost -p 7000 -a jyhag, web2py is
listening on 127.0.0.4 (that's loopback address
Thank you Paolo,
I will try you recipe. Regards.
El martes, 20 de enero de 2015, 2:26:41 (UTC-7), Paolo Valleri escribió:
Hi,
I've been using leaflet, it works great.
http://www.web2pyslices.com/slice/show/1899/leaflet-and-geojson-with-web2py
which proposes a starting point example
Hello
Has anybody ever used a graph database with web2py. Is this possible?
Cheers
--
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
Hi,
since you have access to the file system, can you check the content of the
last ticket in the admin error directory?
Paolo
On Wednesday, January 21, 2015 at 5:13:17 PM UTC+1, Omi Chiba wrote:
Hi, I clicked the upload on admin and tried to upgrade from 2.4.6 to
2.9.12. As soon as I
I use auto_import:
db = DAL(mysql://...,
folder='applications/shop/databases',
pool_size=3,
auto_import=True,
migrate_enabled = SETS.migrate_enabled,
migrate=SETS.migrate,
fake_migrate=SETS.fake_migrate,
check_reserved=['all'],
Hi, I clicked the upload on admin and tried to upgrade from 2.4.6 to
2.9.12. As soon as I clicked I got ticket but cannot see the ticket because
now I get a ticket to see the ticket... It means I cannot open admin site.
My app is still working fine.
I don't where to start to fix. Can you guys
Hey Leonel,
I tried that, when I ran the code that you suggested, web2py did not
redirect to display_canvas,
Execution in the following order, with client_side=True:
1.run display_canvas
2.ajax call to display
and with, with client_side=False:
1. run display_canvas
2. ajax call
Hi,
I am using on validation to check for text strings in a form . Is there a
way i stop the database insert happening if the strings are matched ? so
far i am only able to remove the words.
Thanks
def check(form):
check = [this word, or this word]
for x in check:
if
Hello
What are the usual steps for designing a web2py application?
Best regards
--
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
Hi,
i tried to post earlier today but it didn't seem to go through. so please
forgive me if this appears to be a double post.
i am using onvalidation to call a check on the content of the form vars.
if the content matches i would like to stop the form being saved in to the
database . i know
I'm new to web2py and have been doing tutorials to set up simple apps. I
want to create a blog using web2py with an option where readers can
subscribe to my newsletter using their email address. I have yet to find
tutorial where I can learn how to do this. Can someone point me in the
right
If I use auto_import - and add new record - than receive None values
instead default
db = DAL(mysql:/s, #
folder='applications/shop/databases',
pool_size=3,
auto_import=True,
migrate_enabled = SETS.migrate_enabled,
migrate=SETS.migrate,
The auto_import functionality is somewhat limited, as it only reads in the
metadata from the *.table files, which only hold information relevant to
the database (i.e., name, type, unique, not null, etc.). It does not import
web2py specific attributes, such as defaults, validators, widgets, etc.
in this case it's not platform-dependency the issue: it's the method web2py
uses for the upgrade-in-place.
We should label it CLEARLY as things can go wrong if you press this
button and live with it: there are just too much moving parts around an
upgrade.
Most of the times it works (and it
pretty undocumented feature (so its not a bug per se)
response.json() is clearly NOT meant to be used in views just use
json(whatever) instead.
on the can I call it a bug of not matter, that seems to surface every
once in a while, please take the following as a word of caution (from
read the book about onvalidation
http://web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation
. If you want to stop the form from being processed, you have to fill
form.errors.some_field with something.
--
Resources:
- http://web2py.com
- http://web2py.com/book
Right, I think I just need to delete the app on pythonanywhere, install new
web2py from their installer and replace routes.py and my apps Hopefully
this works.
On Wed, Jan 21, 2015 at 2:34 PM, Niphlod niph...@gmail.com wrote:
in this case it's not platform-dependency the issue: it's the
seems like a job for distinct=True (or a groupby) . Docs are here
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#orderby--groupby--limitby--distinct--having-orderby_on_limitby-left-cache
On Wednesday, January 21, 2015 at 7:09:41 PM UTC+1, Spokes wrote:
I'd like a
it's not a matter of read-only. Grid uses urls like
/app/controller/function/tablename/id
for many things. Imagine what happens when id is really something like
https://www.google.com/?gfe_rd=crei=mAjAVNLgGo2DcPzrgXAgws_rd=ssl#q=web2py;
...
--
Resources:
- http://web2py.com
-
I was expecting someone tell me that I am using it wrong :)
Since it was there and I was using it (wrong or not) for past 2 years... I
was not expecting its behavior to change...
And I always consider testing my apps with trunk... bug I was focusing
tests on DAL... sometimes we don`t have much
On Wednesday, January 21, 2015 at 9:36:09 PM UTC+1, André Kablu wrote:
I was expecting someone tell me that I am using it wrong :)
Since it was there and I was using it (wrong or not) for past 2 years... I
was not expecting its behavior to change...
And I always consider testing my apps
Yes, clear for all the apps including admin. Has the admin application been
updated too for the new version?
--
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)
IMHO the issue with upgrading in place (always an HARD thing to do) is that
the upgrade method doesn't take into consideration to prune the directory
BEFORE installing the new version.
When no modules in gluon change (or when things gets added), there is no
issue however, this time with
I was overt-rusting the web2py because it always promise backward
compatibility... but this time it's depanding on platform so no complains.
Now I failed two upgrade work for both pytonanywhere and my windows 2012
hosting server with apache... I just take one for the team and failed... : )
On
Thanks, Niphlod. Guess this will be a bit less straightforward than I
anticipated.
On Wednesday, January 21, 2015 at 3:46:36 PM UTC-5, Niphlod wrote:
I don't think there's a T-SQL statement for it.
If you strongly need it, performance-wise, it's still best to
distinct/groupby on the
On Wednesday, January 21, 2015 at 12:56:18 AM UTC-8, Y wrote:
Hello
Has anybody ever used a graph database with web2py. Is this possible?
If you're wanting to pie graphs and line charts, there's this slice:
URL:http://www.web2pyslices.com/slice/show/1954/web2py-graph-with-rgraph
If
Hello Alex,
If you use the web2py default layout, the easiest way (if you don't want to
customize one yourself) would be to use jquery and add node to the dom.
Richard
On Tue, Jan 20, 2015 at 3:39 PM, Alex Glaros alexgla...@gmail.com wrote:
want to know basic method for displaying data in nav
You may show us your config file for further help... It is easy to broke
config of apache when not using the script provided or tweaking config...
Is apache working? Did you define an password for web2py (parameters_443.py
in your case because you use httpS)? If you can get to the Admin is
On Wednesday, January 21, 2015 at 11:49:52 AM UTC-8, Anthony wrote:
Dave had already responded with:
Both the function for the page with the button and function the button
loads (that is, stuff()) are in the default.py controller, and the relative
URL is working for me, as long as
I think Gael means that when he clicks the view button, the key id is
displayed instead of the field description. Anyone have an easy way to
display that?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
On Wednesday, January 21, 2015 at 1:24:36 PM UTC-8, Yebach wrote:
and one more question. Is there a way to name column headers in csv?
Exporting, that seems to be done for you.
class 'sqlite3.OperationalError' no such table: cp_mods
Versionweb2py™Version 2.9.12-stable+timestamp.2015.01.17.06.11.03PythonPython
2.7.8: C:\Python27\python.exe (prefix: C:\Python27)Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
Traceback (most recent call
in vers 2.9.12 error:
in app1 I use import module from app2:
from applications.app2.modules.cp_api import check_ars
in app2 code:
import module1
rise error -
type 'exceptions.ImportError' Cannot import module
'applications.bs3b.modules.orders_lib'Versionweb2py™Version
see anything wrong with belongs and IS_IN_DB off the top of your head,
with this syntax?
db.Role.roleType.requires = IS_IN_DB(db, db.RoleType.id.belongs(2, 3, 5, 7,
8, 9, 10, 17, 18, 19), '%(roleType)s',zero=T('choose one'))
thanks,
Alex Glaros
--
Resources:
- http://web2py.com
-
I delete all *.pyc files prom all apps
Then run app2 - *.pyc files is made
then run app1 - all impots sucess
четверг, 22 января 2015 г., 9:11:05 UTC+3 пользователь Dmitry Ermolaev
написал:
if in app2 delete all *.pyc files - all work
четверг, 22 января 2015 г., 8:42:45 UTC+3 пользователь
if in app2 delete all *.pyc files - all work
четверг, 22 января 2015 г., 8:42:45 UTC+3 пользователь Dmitry Ermolaev
написал:
in vers 2.9.12 error (in vers 2.5 all worked):
in app1 I use import module from app2:
from applications.app2.modules.cp_api import check_ars
in app2 code:
On Wednesday, January 21, 2015 at 5:17:49 PM UTC-8, Dave S wrote:
On Wednesday, January 21, 2015 at 1:24:36 PM UTC-8, Yebach wrote:
and one more question. Is there a way to name column headers in csv?
Exporting, that seems to be done for you.
URL:
if you intend a triple store, yes. There is nothing stopping you from
using a triple store in web2py if it supports python.
2015-01-22 1:22 GMT+01:00 Dave S snidely@gmail.com:
On Wednesday, January 21, 2015 at 12:56:18 AM UTC-8, Y wrote:
Hello
Has anybody ever used a graph database
On Wednesday, January 21, 2015 at 5:34:56 PM UTC-8, Michele Comitini wrote:
if you intend a triple store, yes. There is nothing stopping you from
using a triple store in web2py if it supports python.
Oooh, obviously I didn't parse the subject properly. Jumping onto WP to
begin my
Hi,
why are you using fake_migrate?
it rebuilds web2py metadata.
Paolo
On Thursday, January 22, 2015 at 6:25:10 AM UTC+1, Dmitry Ermolaev wrote:
class 'sqlite3.OperationalError' no such table: cp_mods
Versionweb2py™Version 2.9.12-stable+timestamp.2015.01.17.06.11.03PythonPython
2.7.8:
I tried db(query).select(limitby = (0, number_of_records), orderby =
'random', distinct = db.t_article['f_book_id']). It produces the error
message:
class 'psycopg2.ProgrammingError' SELECT DISTINCT ON expressions must
match initial ORDER BY expressions LINE 1: SELECT DISTINCT ON
I don't think there's a T-SQL statement for it.
If you strongly need it, performance-wise, it's still best to
distinct/groupby on the backend and randomize on the frontend (via python).
You can also randomize limitby parameters if you're feeling random at
this level (limiting correctly with
Hello
I am trying to create a one button click export to csv, so if a user click
he gets a download popup without redirect to new page
my controller (script.py)
@auth.requires_login()
def excelExport():
import csv
import cStringIO
scriptId = request.args[0]
rows = db(db.result.r_id_script ==
I read about lazy_tables = True in the book. I used it at once. Then I read
about smartgrid. I used it at once. But things did not work well with
reference tables. Looking in this group, I became aware that lazy_tables =
True impact negatively smartgrid's behavior with reference tables. A note
id field in VIEW TABLE - is for view only - why I can't modufy view of id
field?
вторник, 20 января 2015 г., 23:08:03 UTC+3 пользователь Niphlod написал:
field_id MUST be a pkey, so an integer: there's no support for string-like
keys in grid, because it's used as an argument.
On Tuesday,
Hello all
I suggest a new book (so few in web2py world)
Mastering web2py DAL
DAL Its so powerfull and a lot of people dont use it properly.
I see a lot of use cases and people discussing about
I think there should be a book about DAL
Only DAL , nothing else.
Please do it
Regards
António
--
Note, however, you potentially let anyone download any other user's file.
If you do this, make sure you require signed URLs on the display controller
On Thursday, January 8, 2015 at 7:25:11 PM UTC-5, Rob Paire wrote:
Hi Dominic,
I found the simplest way to serve PDF files is to save them in
Hello all.
In my grid if the user click on head columns for reference fields the order
is made by row id and not by the row format.
My db:
db.define_table('l1_categories',
Field('name'),
format = '%(name)s')
db.define_table('l2_categories',
Field('l1_category', 'reference
On Tuesday, January 20, 2015 at 10:45:53 PM UTC-5, Dave S wrote:
As mentioned in another thread, I started using
TAG.BUTTON('label _type=submit, _name=mybutton, _value=buttonvalue,
_onclick='ajax(stuff.load, [val1,val2,
val3], stuff_div)')
I don't know if
69 matches
Mail list logo