Thanks for the information. I hope so now I can proceed with that.
Also, is there any callbacks for the table creation?? I have a table which
will have the three static entries added to it only one time. Now, I am
manually inserting the records into the table once the table is created. I
want t
Cleared the cache to be sure and retried...
Getting '304 Not Modified' status code for local static items to be cached
But '200 (from cache)' for remote items...
So seems like this has to do with localhost requesting local resources...
Client side caching works perfectly online, so not an issue, b
Thanks for the reply.
On Thu, Oct 17, 2013 at 5:15 AM, 黄祥 wrote:
> other way i think you can add auth.add_permission on your script,
> something like :
>
> # add group
> auth.add_group('Manager', 'Manager')
> auth.add_group('Admin', 'Admin')
> # add user
> db.auth_user.bulk_insert([{'first_name
Thank you for the explanation, Niphlod. I've updated my AliasMatch, and
that is working for me.
Mark Abajian
On Wednesday, October 16, 2013 12:07:53 PM UTC-7, Niphlod wrote:
>
>
> AliasMatch
> ^/([^/]+)/static/*(?:_[\d]+.[\d]+.[\d]+/)?*(.*)/home/www-data/web2py/applications/
> $1/static/$2
>
>
On Thursday, 17 October 2013 14:29:17 UTC+11, Tim Richardson wrote:
>
> This is web2py 2.7.4, on Windows, python 2.7.5
>
> I have rows in an sqlite table with a boolean field. Currently all rows
> have this field set to 0 (via an update query in an sqlite console)
>
> When the table is defined i
This is web2py 2.7.4, on Windows, python 2.7.5
I have rows in an sqlite table with a boolean field. Currently all rows
have this field set to 0 (via an update query in an sqlite console)
When the table is defined in the web2py model as boolean, this query
returns no rows:
query_rows = db(db
Apparently MSSQL ODBC does an implicit DEALLOCATE for cursors, whereas
Teradata doesn't.I'm testing a new close() method for the Teradata
Adapter that does a self.connection.cursor.close() as well. So far so
good. No reason why this couldn't be done in general (explicit close for
each op
Try it:
model:
define_table("YOURTABLE",Field(data,"text"))
controller:
def update():
return db.*YOURTABLE*.insert(data = request.vars.data)
Vào 17:27:14 UTC+7 Thứ bảy, ngày 12 tháng mười năm 2013, Ruud Schroen đã
viết:
>
> I keep getting this error: GET
> http://localhost:8000/ezwireframes
Bootstrap is included w/ web2py, and the provided scaffolding detects if
you are running in GAE and sets up the DAL accordingly. Which means you
can develop running web2py "natively" and switch to GAE w/o having to
change any code.
The section of the book on deployment recipes goes into more d
Hi,
I am trying to hook the tags manager (lldonethings.com/tags/manager/v3)
with web2py ajax functionality. Tags manager uses Twitter typeahead.js to
prefetch data.
Here is what I am doing:
View:
=
1. var tagApi = jQuery("#your_pretty_id").tagsManager({
2. prefilled: ["An
Hi guys,
I'm using 2.6.4-stable+timestamp.2013.09.22.01.43.37 and I trying to log at
db every new record
created with SQLFORM.grid:
My controller:
def bodies():
grid = SQLFORM.grid(db.bodies, orderby=~db.bodies.id, oncreate=
log_action('System','Created new body'))
return dict(grid=gri
I am going to give it a go right now.
On Wednesday, October 16, 2013 7:18:33 PM UTC-5, Anthony wrote:
>
> Actually, I'm not sure this is the right data model. Presumably the
> product table should include just one record per product, so you don't want
> to store a sale id in the product table. I
On Wednesday, October 16, 2013 11:06:23 AM UTC-7, molhokwai wrote:
>
> Well...
> It doesn't seem to work on local dev_appserver, but it actually works,
> when deployed on appspot.com...
> So, anyway, problem solved...
>
>
Different IP or domain name?
If your browser's cache wasn't cleared, the
Actually, I'm not sure this is the right data model. Presumably the product
table should include just one record per product, so you don't want to
store a sale id in the product table. If each sale can include only one
product, then you want a product reference field in the sale table. If each
Thanks Anthony, the default argument, which I am assuming is
"default=auth.user_id",
inserts the user id into the sales table. But what argument should I use to
insert the sale_id into the products table, very much in the same way the
default=auth.user_id inserst the user id in the db.sale.
other way i think you can add auth.add_permission on your script, something
like :
# add group
auth.add_group('Manager', 'Manager')
auth.add_group('Admin', 'Admin')
# add user
db.auth_user.bulk_insert([{'first_name' : 'Manager', 'last_name' :
'Manager',
'email' : 'a...@a.com', 'username' : '
>
> db.sale.user_id.requires = IS_IN_DB(db, 'auth_user.id')
>
The above line is unnecessary, as you get the IS_IN_DB validator
automatically by default.
> This is an improvement on what I had. But I am not sure if I applied the
> code correctly because the 'user_id' and 'sale_id' have been c
db.define_table(
'sale',
Field('user_id', db.auth_user),
Field('start_date', 'date', requires=IS_DATE()),
Field('end_date', 'date', requires=IS_DATE()),
Field('start_time', 'time', requires = IS_TIME()),
Field('end_time', 'time', requires = IS_TIME()))
db.sale.user_id.requi
It looks like a No. Check the dal.py in source.
On Wednesday, October 16, 2013 10:38:43 AM UTC-7, Amit Saharana wrote:
>
> Hi, just for information, does web2py support Cassandra Database. I didn't
> get any specific information about it through search engines.
>
--
Resources:
- http://web2py.c
will do on the weekend.
On Wednesday, October 16, 2013 11:08:40 PM UTC+2, Alan Etkin wrote:
>
> There's a new experimental feature for the admin app in trunk. When you
> visit an app's design page, the plugin download button at the bottom links
> to a page with a list of available contributed pl
On my production boxes, every upgrade of any kind starts like so:
mkdir rollback/
In the admin app, clean the application
sudo apache2ctl stop
tar -cvzf rollback//current_version.tar.gz
/home/www-data/web2py/
sudo apache2ctl start
On Wednesday, October 16, 2013 5:10:58 PM UTC-4, Dave S wrote:
On Wednesday, October 16, 2013 2:10:58 PM UTC-7, Dave S wrote:
>
>
>
> On Wednesday, October 16, 2013 8:59:18 AM UTC-7, 黄祥 wrote:
>>
>> imho, you should use version control (git, subversion, mercurial, etc) to
>> take control for your code . and for change a running system, imho, u
>> should up
On Wednesday, October 16, 2013 6:19:35 AM UTC-7, BlueShadow wrote:
>
> Since my original app was build with web2py 1.8.something. without any
> version control or anything like that I was wondering if there is a good
> tutorial how to set an app up with all the current features. Or if you
> th
This is a problem:
db.define_table(
'sale',
Field('id', db.auth_user, default=auth.user_id),
How about this instead:
db.define_table(
'sale',
Field('user_id', db.auth_user, requires=IS_IN_DB( # See "Forms and
Validators in the Fine Manual
Also do this:
db.define_table(
'prod
On Wednesday, October 16, 2013 8:59:18 AM UTC-7, 黄祥 wrote:
>
> imho, you should use version control (git, subversion, mercurial, etc) to
> take control for your code . and for change a running system, imho, u
> should upgrade to the latest version (for bug fixing purpose, security
> hole, etc)
There's a new experimental feature for the admin app in trunk. When you
visit an app's design page, the plugin download button at the bottom links
to a page with a list of available contributed plugin packages that will be
automagically downloaded and installed for you.
The list of available pl
Here is an excerpt from my model:
db.define_table('product',
# [fields]
Field('make_buy',
requires=IS_IN_SET(['Make', 'Buy','Both'], zero='Selection
Required',),
comment='Choose "Make", "Buy" or "Both".',
label = 'Make/Buy'
),
TODO :)
On Wednesday, October 16, 2013 9:43:42 PM UTC+2, Niphlod wrote:
>
> Since it's getting a quite popular "issue", please look into enabling
> response.static_version to avoid this happening again and again :-P
>
> http://web2py.com/books/default/chapter/29/04/the-core#Static-asset-managemen
Since it's getting a quite popular "issue", please look into enabling
response.static_version to avoid this happening again and again :-P
http://web2py.com/books/default/chapter/29/04/the-core#Static-asset-management
On Wednesday, October 16, 2013 9:24:40 PM UTC+2, lesssugar wrote:
>
> Sh*t, it w
the mail-sending usecase is one of the most clearer to show why a web app
might need an "outside processor" to do the work, and keep the webapp
snappy.
You can choose whatever method you like to schedule the task, all it needs
is a record inserted into the scheduler_task table, with correct valu
complete the request in a second if I insert in queue. and not a minute*
On Thursday 17 October 2013 12:45 AM, Niphlod wrote:
the main point is not that is not inefficient by itself. It's just
that you need to make sure you don't use that in a model because in
web2py models are executed at **ev
I got your point. It is that I made the whole project, its running
except for sending mails I need to run the mail_queue file manually , I
want it to run ever hour or so , so that the mails are being received.
so wanted to schedule the sending of mails once every hour and if the
load increases ,
Yeah I see an other post, it should be that, let see ;)
Richard
On Wed, Oct 16, 2013 at 3:16 PM, Niphlod wrote:
> Of course he has. admin files are now using static_version. If you're not
> using web2py to serve static files, you need to have the configuration of
> the webserver serving static
Sh*t, it was the cache indeed
Sorry guys. And thanks Niphlod.
On Wednesday, October 16, 2013 9:19:01 PM UTC+2, Niphlod wrote:
>
> to make it short, it should work, and usually peoples reporting this bug
> quickly realize that they didn't copy the new web2py.js or that they have
> the browse
to make it short, it should work, and usually peoples reporting this bug
quickly realize that they didn't copy the new web2py.js or that they have
the browser's cached version working. Make sure that your page fetches the
correct web2py.js, then post a simple app to reproduce the issue if the
p
Of course he has. admin files are now using static_version. If you're not
using web2py to serve static files, you need to have the configuration of
the webserver serving static files that follows the same logic.
On Wednesday, October 16, 2013 9:15:08 PM UTC+2, Richard wrote:
>
> Yes but he seem
the main point is not that is not inefficient by itself. It's just that you
need to make sure you don't use that in a model because in web2py models
are executed at **every** request, and you don't seem to want to queue a
task for every request that comes in :-P
On Wednesday, October 16, 2013 8
Yes but he seems to experiment some kind of problem caused by
response.static_version that have been enabled...
Richard
On Wed, Oct 16, 2013 at 3:08 PM, Niphlod wrote:
> Similar thread with explanations
>
> https://groups.google.com/d/msg/web2py/ZOJwVZFavFw/V_TP_94qiS8J
>
> --
> Resources:
> -
Just upgraded to 2.7.4. My LOAD() based component is not displaying,
although it worked in the older version of web2py (2.4.7).
I copied web2py.js from the newest welcome application to my app/static/js/
folder.
What can be wrong?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Do
Similar thread with explanations
https://groups.google.com/d/msg/web2py/ZOJwVZFavFw/V_TP_94qiS8J
--
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 rece
you should use another syntax to have static files served with
static_version enabled.
https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-ubuntu.sh#L110
For the ones not really accustomed with regexes, all we're trying to do is
the following
We have a file
/appname/static/a
it's not an error, it's a feature we enabled for admin (at last) in
combination with your webserver setup lagging behind.
web2py.com/books/default/chapter/29/04/the-core#Static-asset-management
BTW, we have static_version roughly since Oct 2012.
On Wednesday, October 16, 2013 7:43:30 PM UTC+2,
thanks a ton,
I ll try this and what would be appropriate place to insert the file , so
that it is not efficient.
thanks,
regards,
Tushar Tuteja
On 17 October 2013 00:22, Niphlod wrote:
> the scheduler is running fine.
> In the data you pasted here there's the reason why the scheduler isn't
use DAL callbacks if you need "mass inserts" to work in the same way.
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#before-and-after-callbacks
On Wednesday, October 16, 2013 8:07:06 PM UTC+2, ranjith wrote:
>
> Hi,
>
> I want to add a membership to a user when a ne
the scheduler is running fine.
In the data you pasted here there's the reason why the scheduler isn't
picking up any new task.
times_run is 3 and repeats is set to 3, so the task got executed 3 times
already.
Sidenote: append a "return 1" to your function, so you'll get scheduler_run
records ho
is TKL turnkey Linux ? If yes, who is the maintainer of that distribution ?
He's the man to contact for such info
Running web2py with rocket and sqlite is something that should really
happen only on your pc while you develop.
Your production env should use a real backend (mysql is fine, but
The development defaults for a Web2Py App are Rocket Server and SQL Light.
I've deployed my application through the TKL hub and have kept the Web2Py
default configuration. My app runs fast on the local development system and
very slow on a small instance EC2 deployed through the TKL hub.
I ex
I started with that only, but it is still now working.
SO I'll tell you what I did.
I made a file sched.py
*# coding: utf8**
**def fun():**
**import time**
**print 'selecting mails'**
**rows = db(db.queue.status=='pending').select()**
**for row in rows:**
**print 'sending m
Hi,
I want to add a membership to a user when a new user is added to the
auth_user table. It is possible when the user registers via the front end
through the callback auth.settings.register_onaccept.
But in my case, I am adding the bulk entries to the auth_user table using
the script. So, now
Well...
It doesn't seem to work on local dev_appserver, but it actually works,
when deployed on appspot.com...
So, anyway, problem solved...
Thanks
On Wed, Oct 16, 2013 at 4:14 PM, molhokwai wrote:
> Hi,
>
> I've tried changing client side caching headers expires or cache-control
> value (fr
This is great - works perfectly.
Thanks again for all the help!
j
On Wednesday, October 16, 2013 8:46:46 AM UTC-7, Anthony wrote:
>
> Sorry, turns out the filename stored in the db must be the *last* URL
> argument, not the first -- so the order of the URL args should be reversed.
> Actually,
Or the version file have not been updated according to the flagged version
of the repo.
Richard
On Wed, Oct 16, 2013 at 1:42 PM, Richard Vézina wrote:
> If it user response.static_version, maybe the proper version haven't been
> set at the level of repository can't say, but I guess so.
>
> Hav
If it user response.static_version, maybe the proper version haven't been
set at the level of repository can't say, but I guess so.
Have a look at the version file of web2py...
Richard
On Wed, Oct 16, 2013 at 3:13 AM, Róbert Bárdonicsek wrote:
> Hi!
>
> I have many error :(
>
> https://localho
Hi All,
Apologies if this is a repost, my last post did not go through for many
hours, posting again.
I'm a newbie to web development, but quite familiar with python (use it at
work), I'm trying to quickly prototype some ideas for a startup website.
My goal is to deploy it initially with app e
Hi,
I'm trying to quickly set up a website w/o prior experience. Pretty
familiar with Python and hence leaning towards web2py
since I heard good things and am impressed by the support/community around
it.
I am going to use AppEngine for backend store with NDB API, and am
considering Twitter
Hi!
I have many error :(
https://localhost/admin/static/_2.7.3/js/jquery.js
_2.7.3 directory doesn't.
what's wrong?
2013. október 14., hétfő 17:35:17 UTC+2 időpontban Massimo Di Pierro a
következőt írta:
>
> there is no new changelog. It is mostly bug fixes.
>
--
Resources:
- http://web2py.
admin interface is wrong.
Many error :
https://localhost/admin/static/_2.7.3/css/bootstrap_essentials.css
2013. október 14., hétfő 17:35:17 UTC+2 időpontban Massimo Di Pierro a
következőt írta:
>
> there is no new changelog. It is mostly bug fixes.
>
--
Resources:
- http://web2py.com
- http:
I just check the newest version 2.7.4 in windows, when i display the data
grid with 10 columns, it will print each row to console 10 times. Is this
correct behavior or someone forget to turn off the "print" statement during
debugging?
As for 2.7.4, the virtual columns works, and i don't have to
Hi, just for information, does web2py support Cassandra Database. I didn't
get any specific information about it through search engines.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/i
Thanks Stifan,
But that doesn't work either, because the product_id now displays in the
sale form. I need to generate the sale_id first, and then have sow in the
product table/form. Right now, it just shows up blank.
On Wednesday, October 16, 2013 11:08:58 AM UTC-5, 黄祥 wrote:
>
> yeah, my pov
Thanks. That works quite well. While I realize that I can use make the
target element be anything I want like the H1 tag in this example, the
anchor is created by a web text editor called CKEditor. I'll have to see
what I can do to add the class when the anchor is created.
Thanks again.
On Wed
i think you can achieve it using access control. please read the book about
access control in authorization.
ref:
http://web2py.com/books/default/chapter/29/09/access-control#Authorization
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://g
yeah, my pov is because your product never save the sale id. imho, i think
your code should be :
db.define_table(
'sale',
Field('product_id', 'reference product'),
Field('user_id', db.auth_user, default=auth.user_id),
Field('start_date', 'date', requires=IS_DATE()),
Field('end_
imho, you should use version control (git, subversion, mercurial, etc) to
take control for your code . and for change a running system, imho, u
should upgrade to the latest version (for bug fixing purpose, security
hole, etc), but test it carefully first before you upgrade your system (in
testi
db.define_table(
'auth_user',
Field('id'),
Field('first_name', type='string',
label=T('First Name')),
Field('last_name', type='string',
label=T('Last Name')),
Field('email', type='string',
label=T('Email')),
Field('password', type='password',
Sorry, turns out the filename stored in the db must be the *last* URL
argument, not the first -- so the order of the URL args should be reversed.
Actually, there are some limitations regarding characters allowed in URL
args, so it might be a better idea to put the new filename in the query
stri
Hi Anthony,
Thanks for the help.
The download_path variable doesn't change regardless of whether the
download() function includes, or is passed, the 'download_filename' arg.
Indeed, the file downloads successfully when the download function is the
default, ie -
def download():
return resp
hello,
javascript is not colored in the integrated ide of web2py
Is it possible to activate some type of colors?
Thank you
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (R
Hi,
I've tried changing client side caching headers expires or cache-control
value (from 10mns by default?), running the code below from the
corresponding controller, but the values are unaffected.
import datetime
expires = datetime.datetime.now()+datetime.timedelta(0,365*24*360
Hi
here is how my config look lik. is it what you think it should be. it is
not working . But it works for older version.
Thanx
/F
AliasMatch ^/([^/]+)/static/(.*) \
/var/web2py/applications/$1/static/$2
Order Allow,Deny
Allow from all
Den onsdagen den 16:e okto
A classic solution applied in such cases is to assign a css class (named
for example 'hashlinked') to the target element. The related css rule is
the following:
.hashlinked:before {
display: block;
content: " ";
height: 40px; /* the height of the element that hides the target */
visi
I am using apache-wsgi-web2py . Should I config static file in apache
config files for all app in web2py applications ?
/frasse
Den onsdagen den 16:e oktober 2013 kl. 11:28:17 UTC+2 skrev Niphlod:
>
> did you configure your webserver to allow the static files to be served
> with folder ver
I'll check again...
On Wed, Oct 16, 2013 at 9:25 AM, Niphlod wrote:
> you are not using 2.7.4
> Line 218 in trunk doesn't match your traceback.
>
> https://github.com/web2py/web2py/blob/master/gluon/globals.py#L218
>
> Il giorno mercoledì 16 ottobre 2013 13:45:53 UTC+2, __pyslan__ ha scritto:
>
Since my original app was build with web2py 1.8.something. without any
version control or anything like that I was wondering if there is a good
tutorial how to set an app up with all the current features. Or if you
think it's not worth it and never change a running system.
One thing I would love
hi,
i create table from scratch on mysql using web2py 2.7.4. on windows 7 but
return an error :
InternalError: (1005, u"Can't create table 'testingmysql.company' (errno: 150)")
when test the same code using sqlite, no errors occured
my root cause analysis is auth_user have reference field to a
ok. start it with
python web2py.py -K appName -D 0
that sets to DEBUG the logging level
Il giorno mercoledì 16 ottobre 2013 14:46:53 UTC+2, Tushar Tuteja ha
scritto:
>
> Ubuntu 12.04
> i use the command
> python web2py.py -K appName
>
> On Wednesday 16 October 2013 05:53 PM, Niphlod wrote:
>
Ubuntu 12.04
i use the command
python web2py.py -K appName
On Wednesday 16 October 2013 05:53 PM, Niphlod wrote:
a) what ubuntu ?
b) how do you start the scheduler ?
Il giorno mercoledě 16 ottobre 2013 14:06:41 UTC+2, Tushar Tuteja ha
scritto:
Hey I am using web2py on ubuntu.
I am
I store user and password information (the default config) in the default
sqlite db but all my other data in an external PostgreSQL server.
Is it possible to create the graph created by the appadmin/graph_model
controller for my external db?
--
Resources:
- http://web2py.com
- http://web2py.co
there are (ATM) no packagers being able to produce binaries for all
platforms using a single platform (i.e., you can't build a win binary on
linux).
BTW, you can easily redistribute the official binaries with your
application in it, and I really don't see why your requirement needs to be
able t
you are not using 2.7.4
Line 218 in trunk doesn't match your traceback.
https://github.com/web2py/web2py/blob/master/gluon/globals.py#L218
Il giorno mercoledì 16 ottobre 2013 13:45:53 UTC+2, __pyslan__ ha scritto:
>
> I'm using the last version, the 2.7.4... In version 2.7.2 the same thing
> ha
a) what ubuntu ?
b) how do you start the scheduler ?
Il giorno mercoledì 16 ottobre 2013 14:06:41 UTC+2, Tushar Tuteja ha
scritto:
>
> Hey I am using web2py on ubuntu.
> I am trying to use the scheduler but there is not workers name that is
> coming .
> and the task is always queued and it nev
Hey I am using web2py on ubuntu.
I am trying to use the scheduler but there is not workers name that is
coming .
and the task is always queued and it never runs.
I followed the video on Vimeo on scheduler.
it runs on mac but not on ubuntu.
apparently my app is hosted on a ubuntu server.
--
Resou
I'm using the last version, the 2.7.4... In version 2.7.2 the same thing
happened
On Wed, Oct 16, 2013 at 3:36 AM, Niphlod wrote:
> upgrade web2py, it's a known bug.
>
> Il giorno mercoledì 16 ottobre 2013 01:46:08 UTC+2, __pyslan__ ha scritto:
>
>> Hello!
>>
>> I'm trying update a field (tota
did you configure your webserver to allow the static files to be served
with folder versioning ?
as a quick way to restore things as they were is to remove this line
https://github.com/web2py/web2py/blob/master/applications/admin/models/0.py#L84
from the file.
But, you'll be missing quite an im
HI
I upgrade web2py to 2.7.4 from 2.7.3. admin page is not working any more
please see the attach file.
do you have any idea ?
Regards
Frasse
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/w
I have a smartgrid, and need to add a custom form during an insert.
Basically I just want to add some html and hide the original form. Very
easy to do with some javascript. My problem is that this is the first time
I have tried to use the include statement. And it seems to behave very
weird fo
86 matches
Mail list logo