Hey All,
How can I enable gzip compression in web2py app?
Any help would be highly appreciated.
Thanks,
Hey All,
How can I add expire header to my web2py app to speed up the webpage when
loading.
Any help would be highly appreciated.
Thanks,
Edit views\layout.html
You can add all the header that you want using response.header
it's a python dictionary, so you can set those in the usual way, e.g.
response.headers['myheader'] = 'thevalue'
Il giorno venerdì 4 maggio 2012 09:39:59 UTC+2, nav010 ha scritto:
>
> Hey All,
>
> How can I add expire header to my
Hi,
How to give the argument to unzip a zipped folder and extract files
from the folder the error which I am getting is
' unzip() takes at least 2 arguments (1
given)' and my arguments are def unzip(filename, dir, subfolder=''):
...
and I de
Hi,
Here is my problem. It looks like the databases closes while in my
Generator. I also tried to pass the DB with the send() function as
described in an other post.
In a web page, I have an iframe that calls a function that returns a
generator to get some kind of "asynchronous" update in the
hi i installed this plugin from dev.s-cubism.com
http://dev.s-cubism.com/plugin_elrte_widget
i have a problem with upload/list uploaded files
on local host works fine, but when i upload it to server, upload is done,
but the uploaded file is not listing/appear in dialog
anybody used it? to give
Thank you very much Anthony, as always for your very detailed explanations.
Made it really clear for me.
So the web2py goes through the .html lines and parses them and when it
encounters a code within {{}} it executes it. In the case of just
{{=URL('func')}} is converts that to a text with an ad
If I'm not mistaken as long as you're not going with green threads with
uwsgi (and then some, nothing is too simple with green threads) you need to
remember that returning a generator in a wsgi app basically means that the
webserver will pile up the complete response before actually starting to
It would be great if you can show by an example. I tried putting
response.headers['Cache-Control'] = "max-age=2592000" in layout.html but
Cache Control was not changed.
Thanks in advance,
On Fri, May 4, 2012 at 2:44 PM, Niphlod wrote:
> You can add all the header that you want using response.he
I'm looking over http://packages.python.org/web2py_utils/test_runner.html .
I'm trying to test my controller function "upload". It uses an SQLFORM().
The below code results in:
test_upload (web2py_utils.test_runner.TestDefaultController) ... please
fill out the form
The problem seems to oc
Hi,
I would like to use web2py without DAL. I want to use it with an sqlite
database in a .db file. Are there good examples of how to do this? I am
looking for things such as
(a) Where do I save the .db database file (i.e., which folder within the
application).
(b) Can I connect to it and use
I can't seem to get a CSV file imported in appadmin. The status bar flashes
for an instant but then nothing happens. I'm not really sure how the CSV
file is supposed to be formatted. I exported an empty file and then filled
in the columns.
WhoooO !
Thanks for the answer Niphold, but a bit slower please ;-)
If I understand your answer, my problem with asking web2py to stream a
generator is not working anymore since I changed from the provided web
server to Apache.
BTW, I tried by removing the database accesses, and it does not beh
I'm sorry if my question is lame, but I seem to get this error on
execution: define_tables() got an unexpected keyword argument 'signature'
Maybe you could suugest what I'm doing wrong? Many thanx
On Friday, May 4, 2012 7:11:20 AM UTC+3, Massimo Di Pierro wrote:
>
> This is what I have so far.
Same for me, but i didn't check the code yet (i'm at work).
2012/5/4 Aurelijus Useckas
> I'm sorry if my question is lame, but I seem to get this error on
> execution: define_tables() got an unexpected keyword argument 'signature'
>
> Maybe you could suugest what I'm doing wrong? Many thanx
>
>
I have no idea why you would want to do this but here's a start. test.db
will be in your web2py directory.
def sqlite():
import sqlite3 as lite
con = None
try:
con = lite.connect('test.db')
cur = con.cursor()
cur.execute('SELECT SQLITE_VERSION()')
d
You could go half way and use the DAL to connect to the database and
execute SQL commands directly. This would give you ability to experiment
with sqlite and also allow access to the time saving things in the DAL
later.:
http://web2py.com/books/default/chapter/29/6#Raw-sql
The database file
>
> (a) Where do I save the .db database file (i.e., which folder within the
> application).
>
Anywhere you want. One option is in /web2py/applications/yourapp/databases,
but doesn't have to be in the application folder at all.
> (b) Can I connect to it and use it (read information, store in
On Friday, May 4, 2012 7:20:40 AM UTC-4, nav010 wrote:
>
> It would be great if you can show by an example. I tried putting
> response.headers['Cache-Control'] = "max-age=2592000" in layout.html but
> Cache Control was not changed.
>
You don't have to set it in layout.html -- you can set it in a
I think I figured it out. The importer is *extremely* sensitive. I have
auth.signature on the table and assumed the default/update actions would
apply but found out I need to populate those fields. Excel had switched
True to TRUE which did not work. Also watch our for Excel reformatting the
dat
That belongs to the web server. When you use it with a production server
like apache or nginx, they provide a configuration option to support gzip.
How, depends on which one you use. Rocket does not support it.
On Friday, 4 May 2012 02:38:10 UTC-5, nav010 wrote:
>
>
> Hey All,
>
> How can I enab
This requires the latest trunk.
On Friday, 4 May 2012 07:10:56 UTC-5, Aurelijus Useckas wrote:
>
> I'm sorry if my question is lame, but I seem to get this error on
> execution: define_tables() got an unexpected keyword argument 'signature'
>
> Maybe you could suugest what I'm doing wrong? Many t
Sorry, I had not read all the messages neither tested it but I am
interested as I was think on a similar project.
Maybe I am going off topic but my idea was to use the hackasaurus.org
as an user interface editor. It looks fine.
But I am not aware of license issues or integrability.
Has anyone any i
Actually still not able to import. I'm guessing the appadmin import/export
is not the right tool for importing random data, just database dumps.
Nice, did not know about it.
On Friday, 4 May 2012 08:15:38 UTC-5, yamandu wrote:
>
> Sorry, I had not read all the messages neither tested it but I am
> interested as I was think on a similar project.
> Maybe I am going off topic but my idea was to use the hackasaurus.org
> as an user interfac
It is supposed to have columns with headers, the headers must be the names
of the fields of the table to import. You cannot have have columns with
headers which are not names of fields.
On Friday, 4 May 2012 07:07:12 UTC-5, pbreit wrote:
>
> I can't seem to get a CSV file imported in appadmin.
Well, I resorted to a bunch of .replace(...) statements and beat the text
into submission. Case closed, but it's fugly and inelegant. It's too bad
the interface between web2py and google charts isn't better. They're
claiming to take a json interface, but the json that web2py produces
doesn't se
if you desire to run on google app engine you can use the channel API:
https://developers.google.com/appengine/docs/python/channel/overview. heck
you might be able to import the JS side of it into your views and use it
not on the app engine, though i have not tried it.
i am starting to use it
pbreit, Simon and Anthony,
Thanks very much for your responses. I am trying out Anthony's
suggestions first.
Can you please help me with the path? I can connect when I give the
absolute path on the filesystem, but I want to use relative path so
that it works on different computers and I can email
>
> I tried the path '/myapplicationname/databases/test.sqlite', the sort
> of path that can be used for images. But I get the following error.
>
> unable to open database file
>
> What is request.folder? How do I find it?
>
The request object is available in the web2py environment on every r
Thanks a lot Anthony. I was just going to email that I figured it out.
Sorry, should have searched the documentation for request.folder
earlier.
Thanks to you and everyone else here who is providing help with web2py.
On Fri, May 4, 2012 at 11:41 AM, Anthony wrote:
>> I tried the path '/myapplic
I want to import data from excel sheets to the database in web2py. I wish
to validate the excel sheet before importing data from it.My table
structure is similar to
db.define_table('xlsheets',Field('name'),Field('xl','upload'),Field('filename'))
>From this table, i will obtain the filename field
Hi Bruno,
http://web2py.com/books/default/chapter/29/7#Custom-forms
>
I read this solution in the web2py book, in case of a few fields this works
well, however, the profile form already has six.
I had hoped for a solution that just splits of the tr element with
id="submit_record__row". But tha
I need to do something very similar, but didn't have time to work on it...
But my search on the question bring me to discover :
validate_and_insert, validate_and_update
http://web2py.com/books/default/chapter/29/6?#validate_and_insert,-validate_and_update
So you process the rows contained in you
Here a primer to xlrd : http://scienceoss.com/read-excel-files-from-python/
And a documentation ressource :
http://www.simplistix.co.uk/presentations/python-excel.pdf
I think that you will need to upload the excel file repeatedly (until it
pass validate_and_insert) except if you build your own v
Ok, I had a closer look at what's going on...
Test :
No plugin (no chosen), no validator (no is_in_db), field type
list:reference so multiselect.
What's happen :
Select options will be sorted alphanumerically so if first_name is the id
represent set with format='%(first_name)s' options will be o
A couple comments/questions/suggestions on w2cms, if I may.
1. Definately hackasaurus could be utilised. Great stuff. User friendliness
you were looking for.
2. Would it be possible to not only point to the link of an object
(picture), but upload it as well (Jquery or smth). There is a functio
Two issues with installing the wiki plugin:
1. in my current app, I get the following error immediately after
installing the plugin and trying to access any portion of the app
* (1146, u"Table
'rbl.plugin_wiki_page' doesn't exist"*
2. when loading the plugin in a brand-ne
>
>
>1. * (1146,
>u"Table 'rbl.plugin_wiki_page' doesn't exist"*
>
>
> Sounds like a migration error. Do you have the tables in your DB? If
not, make sure you delete plugin_wiki table defs from the databases folder
so that they can be created
> 2. when loading the plugin
I think, I found a solution :
This answer :
Joss -- to restore a previously saved order, you would just set your server
side script to output the HTML option tags in the order you want them.
In this page :
http://www.ryancramer.com/journal/entries/asmselect_v104/
I think it will need :
IS_IN_DB(
It looks as though the database table generation does not automatically
take place unless you use the wizard.
How can I initiate this and get the plugin active? The "book" doesn't
really give great details on that.
Thanks
On Friday, May 4, 2012 2:38:51 PM UTC-4, villas wrote:
>
>
>>1. *
On Fri, May 4, 2012 at 12:41 AM, Massimo Di Pierro
wrote:
> Dear Tiago,
>
> No problem at all. All comments can help us improve and or give us an
> opportunity for clarification.
>
>
> On Thursday, 3 May 2012 16:04:14 UTC-5, Tiago Almeida wrote:
>>
>> Hi,
>>
>> Other than trying to start a flame w
Thanks howesc!
This is something I am totally not aware of, and it looks promising! Are
you using it with web2py? If so, could you elaborate a bit more on how this
thing can be integrated with web2py? Many thanks!
On Friday, May 4, 2012 10:45:43 AM UTC-4, howesc wrote:
>
> if you desire to r
On Fri, 4 May 2012 16:18:02 -0300
Mariano Reingart
wrote:
Hello Mariano,
> Also, please note that the relational model (and so the DAL) has a
> "mathematical" formal theory behind (relational algebra and database
> normalization) with a industry standard query language (ANSI SQL,
> worldwide rec
yup, i'm using it with web2py. i just RTFM (for once the google docs
are decent) and their python examples work just fine in web2py. the
javascript worked as advertized.
the one thing i had to do was map the /_ah callbacks for
connect/disconnect in app.yaml to go to web2py and in web2py rout
Hi Larry
Generating tables is a general thing, not just for the plugin_wiki. As
you obviously do not have any data in your plugin_wiki yet, I suggest:
1. Get yourself a DB management tool for your DB.
2. Using the tool, have a look in the DB. If you are using Sqlite,
you should
can you make a view that outputs this format given the data as you have it
in the controller? that might be better than json and un-json etc...
On Friday, May 4, 2012 7:24:27 AM UTC-7, weheh wrote:
>
> Well, I resorted to a bunch of .replace(...) statements and beat the text
> into submission.
silly thought.what about an embedded google calendar? they are easy to
edit as an admin and you can set parameters to limit the views. not sure
if that at all meets your requirements.
On Thursday, May 3, 2012 2:32:50 PM UTC-7, Cindy Michalowski wrote:
>
> Hello all,
>
> I am trying to im
Don't forget the appliances page:
http://web2py.com/appliances
I think the AppointmentManager app implements a calendar that might be
interesting.
Anyway, it is easy to download it and take a look.
On Thursday, 3 May 2012 22:32:50 UTC+1, Cindy Michalowski wrote:
>
> Hello all,
>
> I am t
In fact, it is using FullCalendar so I'm sure it will be interesting for
you.
On Friday, 4 May 2012 23:18:48 UTC+1, villas wrote:
>
> Don't forget the appliances page:
> http://web2py.com/appliances
>
> I think the AppointmentManager app implements a calendar that might be
> interesting.
>
Those fields would have different fieldnames...
form.vars.yourfield_1
form.vars.yourfield_2
form.vars.yourfield_3
I hope I understood your question.
Regards, D
On Friday, 4 May 2012 23:26:26 UTC+1, rahulserver wrote:
>
> In the official book of web2py web2py.com/books/default/chapter/29/
"I hope I understood your question. ".Yes u did!
N thanks!
Silly question actually.But I feel that notations used in web2py official
book are a bit ambiguous(at least at some places).Hope it improves!
Regards,
:-)
On 5 May 2012 04:37, villas wrote:
> Those fields would have different fieldnames
You are welcome.
I'm pleased to say that the book is improving all the time and has a major
revision each year.
However, there are so many new features to document that there is always
more editing to be done!
On Saturday, 5 May 2012 00:18:38 UTC+1, rahulserver wrote:
>
> "I hope I unders
I'm sorry I couldn't guess what's happened inside. At least for me, I
haven't encountered that problem. Could you inspect more details for that
(by such as pdb debugger). The process of the uploadify plugin is as
follows. First the client uploads a file via ajax using a flash and the
server sav
Hey Everyone,
I'm trying to figure this one out, but can't seem to find the right way of
doing it.
Basically I want to be able to route incoming urls which have a persons
username in the url to a default chosen controller. It's like how Facebook
and Twitter do it. www.facebook.com/rhys.tague a
your app real address:
localhost/init/default/user/rhys
where in request is
args[0]
And you want to pass:
/args[0]
So you can try it in your models/0.py
my_controllers = ['default', 'other']
my_functions = ['index', 'user', 'contact', 'show']
if not request.controller in my_controllers:
1. The web2py book suggests there is a time picker ajax built in. It
does not work for me, both the date and datetime picker does.
http://web2py.com/books/default/chapter/29/11#web2py_ajax.html I don't
get the time picker shown here or any time picker.
2. I would like to onl
I am importing data from a csv file and the field declaration is
as:Field('Account',requires=IS_NOT_EMPTY(),unique=True). But no exception
is thrown when duplicate values for the field is imported! In one of the
posts, I have read that it is an sqllite specific issue which I am using
for backe
I sort of understand that reasoning but I think it's unwise to fight the
tools, especially as a beginner. Web2py shows the SQL queries on every
page. The DAL syntax mimics SQL to quite an extent. If you want to practice
queries, get the SQLite Manager plugin on Firefox. You'll start to learn
SQ
which web2py version are you using? Which browser?
On Friday, 4 May 2012 22:24:50 UTC-5, Vincent Davis wrote:
>
>
>1. The web2py book suggests there is a time picker ajax built in. It
>does not work for me, both the date and datetime picker does.
>http://web2py.com/books/default/chap
Validators are not applied to CSV import. The unique=True may be ignored if
you are suing sqlite, unless you added it when you first defined the table.
If you added unique=True later it is ignored.
On Friday, 4 May 2012 22:40:12 UTC-5, rahulserver wrote:
>
> I am importing data from a csv file a
version 1.99.7 mac
I have tried Chrome and Safari (osx 10.7)
Just used the wizard to build a simple app. No modification from wizard.
see db below
### we prepend t_ to tablenames and f_ to fieldnames for disambiguity
db.define_table('t_children',
Fi
I am also using 1.99.7 with chrome on mac and it works for me. Perhaps you
expect a different behavior.
The time field does not use timepicker (it used to). It uses jquery
timeentry. It has no popups.
If you start typing a number into the field, it will format it as time and
will allow you to us
As I needed to build my own submit buttons, or add my own widgets, I use
the following function to split a SQLFORM:
import re
def expurgate_form(web2py_form):
'''
Deletes surrounding tag, and submit row.
'''
regexp_opening_tag = re.compile("^<[^><]*>")
regexp_closing_tag = re
65 matches
Mail list logo