Re: [web2py] Re: Random, wrong strings in Content-Type Response header for .css

2013-05-17 Thread Andriy
Ok, this is really strange. I changed line 68 (69 after Ricardo`s code addition) in *streamer.py* from: *headers.setdefault('Content-Type', contenttype(static_file))* to *headers.setdefault('Content-Type', 'text/css')* And problem gone! .css file have *text/css *headers, all other files have the

Re: [web2py] Re: Random, wrong strings in Content-Type Response header for .css

2013-05-17 Thread Andriy
Web2py version is 2.4.6. I did change in stream_file_or_304_or_206 that you proposed, it did not fix the problem. If my static files are served by web2py, then I understand its wrong for production? Its better to serve them by Apache directly. But how to do this, I`m confused. I thought block

[web2py] Re: web2py not working

2013-05-17 Thread Monte Milanuk
I'm getting a very similar error when starting web2py from the CLI in Xubuntu 13.04: monte@machin-shin:~/web2py$ python web2py.py web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2013 Version 2.4.6-stable+timestamp.2013.04.06.17.37.38 Database drivers available: SQLite(sqlite3),

[web2py] Re: web2py.com Internal error

2013-05-17 Thread weheh
Yah, I saw it, too, but then it went away. I recommend trying again. On Saturday, May 18, 2013 9:49:04 AM UTC+8, samuel bonilla wrote: > > http://www.web2py.com/ in the website > > Internal errorTicket issued: > unknown -- --- You received t

[web2py] web2py.com Internal error

2013-05-17 Thread samuel bonilla
http://www.web2py.com/ in the website Internal errorTicket issued: unknown -- --- 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

[web2py] Re: hi any webchat web2py apps?

2013-05-17 Thread samuel bonilla
no really i use node.js with www.balloons.io , but if u wanna, u can use tornado or twisted El viernes, 17 de mayo de 2013 00:15:29 UTC-5, Mika Sjöman escribió: > > Hi > > We wish to add a button on our frontpage that will enable users to contact > us via a webchat, something like this> http

Re: [web2py] Can't get gmaps plugin to work

2013-05-17 Thread Ricardo Pedroso
On Fri, May 17, 2013 at 3:32 PM, Marko Poutiainen wrote: > I can't seem to get the gmaps plugin to work. > > > The page is https://www2.olka.fi/kiinnostuneet/default/kartta where you > can also see from the source what my view is like. > Try http://www2.olka.fi/kiinnostuneet/default/kartta. Pro

Re: [web2py] Re: Random, wrong strings in Content-Type Response header for .css

2013-05-17 Thread Ricardo Pedroso
On Fri, May 17, 2013 at 7:23 PM, Andriy wrote: > I use Python 2.7.3 > > The problem manifests in all browsers. In FF its really rare. In Opera with > "Max Connections To Server" > 2 its almost every time you load a page. In > Opera with "Max Connections To Server" < 2 its 1 in 30-50 hits, or every

[web2py] Re: Stream audio files

2013-05-17 Thread Anthony
OK, now I see -- in your version, the content type was wrong for both .ogg and .oga. These were all corrected in trunk about a month ago. Note, technically, I believe .ogg should be 'application/ogg', and .oga should be 'audio/ogg'. In the former case, the browser should figure out whether it i

[web2py] Re: GET and POST issue

2013-05-17 Thread Anthony
Assuming you don't want the whole page to reload on form submission, you should do an Ajax post. In that case, you might consider loading the form as an Ajax component. Otherwise, you'll have to explicitly set the action of the form to the URL where you want it to post. By default, the action is

[web2py] Re: GET and POST issue

2013-05-17 Thread Derek
Take a look here... http://www.web2py.com/book/default/chapter/11#Ajax-form-submission On Friday, May 17, 2013 11:21:38 AM UTC-7, Annet wrote: > > Hi Derek, > > Thanks for you reply. > > The key is, you want to submit via ajax, and make sure you do a 'return >> false'. If there is an error in

[web2py] Re: Random, wrong strings in Content-Type Response header for .css

2013-05-17 Thread Andriy
I use Python 2.7.3 The problem manifests in all browsers. In FF its really rare. In Opera with "Max Connections To Server" > 2 its almost every time you load a page. In Opera with "Max Connections To Server" < 2 its 1 in 30-50 hits, or every time if you reload a page with CTRL+F5. In Chrome its

[web2py] Re: GET and POST issue

2013-05-17 Thread Annet
Hi Derek, Thanks for you reply. The key is, you want to submit via ajax, and make sure you do a 'return > false'. If there is an error in your javascript, you may see the post > getting sent to the current url or the action setting of the form. > At the moment I have a SQLFORM.factory() form

[web2py] Re: GET and POST issue

2013-05-17 Thread Derek
Should be fine to have the form in a modal window. I do it on a lot of websites. The key is, you want to submit via ajax, and make sure you do a 'return false'. If there is an error in your javascript, you may see the post getting sent to the current url or the action setting of the form. On Fr

[web2py] Re: Stream audio files

2013-05-17 Thread Zaka Elab
I finally found the solution. I read this post https://groups.google.com/d/topic/web2py/VxQhildrQew/discussion where I got the idea to change the mime type in gluon/contenttype.py I replaced this '.ogg': 'video/x-theora+ogg' by '.ogg': 'audio/ogg', I'm using web2py Version 2.4.5-stable+timestam

[web2py] Re: GET and POST issue

2013-05-17 Thread Annet
Hi Anthony, My mistake :-( The problem is that the form is posted to http://127.0.0.1:8000/init/vcard/index/6 and not to http://127.0.0.1:8000/init/vcard/mailVcard/6 so the index function instead of the mailVcard function and therefore the form isn't being validated and processed. Maybe it i

[web2py] Re: Stream audio files

2013-05-17 Thread Zaka Elab
Same result so far. On Friday, 17 May 2013 18:56:34 UTC+2, Anthony wrote: > > What happens if you change the file extension to .oga? > > On Friday, May 17, 2013 10:58:07 AM UTC-4, Zaka Elab wrote: >> >> Thanks for your answer, >> >> As you can see in: >> > controls="controls" type="audio/ogg"> >>

[web2py] Re: Random, wrong strings in Content-Type Response header for .css

2013-05-17 Thread Massimo Di Pierro
This is really bad. It looks like a buffer overflow error to me (in apache or in python). Which version of python do you use? Do you get the problem only from Opera? How are these CSS served? As static files? Is Apache serving directly or via web2py? On Friday, 17 May 2013 09:06:33 UTC-5, Andri

[web2py] master master module location

2013-05-17 Thread lucas
hello, i have a module that has many common functions that i wrote. most of my web2py applications access it for one thing or another and i also use it for linux scripting because i prefer python scripting over bash. anyway, under a common linux filesystem, centos specifically, what is the be

[web2py] Re: Stream audio files

2013-05-17 Thread Anthony
What happens if you change the file extension to .oga? On Friday, May 17, 2013 10:58:07 AM UTC-4, Zaka Elab wrote: > > Thanks for your answer, > > As you can see in: > controls="controls" type="audio/ogg"> > Your browser does not support the audio element. > > the URL content is not the prob

[web2py] Re: GET and POST issue

2013-05-17 Thread Anthony
What's the problem with the post? The # isn't sent to the server. On Friday, May 17, 2013 11:16:56 AM UTC-4, Annet wrote: > > > I have this url: > > http://127.0.0.1:8000/init/vcard/index/6 > > In the view I have a link: > > data-target="#vCardModal" >Attach to mail > > When I click the link, Fir

Re: [web2py] Re: behaviour of user_signature in URL

2013-05-17 Thread Anthony
Well, the grid defaults to requiring a user_signature itself, unless the requested URL is the same as the base URL for the grid. In this case, you are adding your own arg to the base URL but not telling the grid about it. Maybe try: SQLFORM.grid(..., args=[request.args(0)]) In any case, I don'

[web2py] Not a question a thank for all that helped me

2013-05-17 Thread openoc80
Hi all, I wanted to thank all the persons from this group that helped me to achieve my first little web2py's site. http://openoc.pythonanywhere.com/OpenOc. It is simple but there is a database (cPickle) of 12247 verbs to conjugate, verbs of a language of south of france. it was my first one an

[web2py] GET and POST issue

2013-05-17 Thread Annet
I have this url: http://127.0.0.1:8000/init/vcard/index/6 In the view I have a link: Attach to mail When I click the link, Firebug shows me GET 6 http://127.0.0.1:8000/init/vcard/mailVcard/6 and in the Request Headers referer http://127.0.0.1:8000/init/vcard/index/6 and the form opens in a B

[web2py] Re: Can't get gmaps plugin to work

2013-05-17 Thread Marko Poutiainen
OK, things have changed. The map in it's current state doesn't seem to work on Chrome, but it does work with IE and Firefox. It didn't work with IE either previously so I must have made something to make it work. I tried this with Chrome both on Ubuntu and Win7. -- --- You received this mes

[web2py] Re: Stream audio files

2013-05-17 Thread Zaka Elab
Thanks for your answer, As you can see in: Your browser does not support the audio element. the URL content is not the problem. In that case, I would be able to listen at least one time the audio tag. Nevermind, I corrected the bad once and I still having troubles. I decided to install Ch

[web2py] Re: problem creating new controller

2013-05-17 Thread Anthony
Have you tried re-starting the server or reloading routes in the admin interface? On Friday, May 17, 2013 8:57:47 AM UTC-4, Robin Manoli wrote: > > Hey, > I have created a new file, controller.py under controllers, which has an > index function that returns a dict. > I have created a folder unde

[web2py] Re: How to limit user votes

2013-05-17 Thread Anthony
You'll have to be a little more specific than "doesn't work." What happens? What have you done to diagnose the problem? Does the ajax call get made properly? Etc. #model > db.define_table('content', > Field('username'), > Field('text', 'text'), > Field('file', 'upload'), > Field(

[web2py] Can't get gmaps plugin to work

2013-05-17 Thread Marko Poutiainen
I can't seem to get the gmaps plugin to work. I have this in the model: from gluon.storage import Storage plugin_gmap=Storage() plugin_gmap.set=db(db.t_kiinnostuneet).select() points=db(db.t_kiinnostuneet.id>0).select() plugin_gmap.represent=lambda row: '%(db.t_kiinnostuneet.f_lat)s %(db.t_kii

[web2py] Re: How to limit user votes

2013-05-17 Thread Christian Foster Howes
your code never writes the updated votes string. and i'm not sure that using the "in" operator on a string like that will give you the results that you want. you probably want another table say votelog db.define_table('voetlog', Field('content_id', 'reference content'), Field('user_id', 'r

[web2py] Re: WEB2PY iOS install APP

2013-05-17 Thread Christian Foster Howes
i don't understand the question. what are you trying to do? web2py can run the server code of a client-server application. web2py has nothing specific for iOS and has no control over the installation of iOS apps. On Tuesday, May 14, 2013 3:51:06 PM UTC-7, Allan K wrote: > > Hi, > > I need to

[web2py] Random, wrong strings in Content-Type Response header for .css

2013-05-17 Thread Andriy
I had this problem for a while, but since I was in development stage, I`ve not payed much attention. I use Apache/2.2.22 (Win32) mod_wsgi/3.3 Python/2.7.3 For some reason in some requests Content-Type Response header for .css returns not with "text/css", but with random strings. So browser do

Re: [web2py] Re: Free opensource Janrain alternative - Python Social auth

2013-05-17 Thread Massimo Di Pierro
Thanks for checking. On Friday, 17 May 2013 08:36:16 UTC-5, Marin Pranjić wrote: > > Failing for python 3.3 only > > > On Fri, May 17, 2013 at 3:35 PM, Massimo Di Pierro > > > wrote: > >> We need to support this. It appears to be failing its on travis tests. >> >> >> On Thursday, 16 May 2013 18:

Re: [web2py] Re: Free opensource Janrain alternative - Python Social auth

2013-05-17 Thread Marin Pranjić
Failing for python 3.3 only On Fri, May 17, 2013 at 3:35 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > We need to support this. It appears to be failing its on travis tests. > > > On Thursday, 16 May 2013 18:56:33 UTC-5, Pystar wrote: >> >> https://github.com/omab/**python-social-

[web2py] Re: Free opensource Janrain alternative - Python Social auth

2013-05-17 Thread Massimo Di Pierro
We need to support this. It appears to be failing its on travis tests. On Thursday, 16 May 2013 18:56:33 UTC-5, Pystar wrote: > > https://github.com/omab/python-social-auth > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe

Re: [web2py] form.custom in modal window

2013-05-17 Thread Annet
Thanks for your reply. Have you tested it without modal? > I did test the view outside the modal, and it works fine. > If if works you may have to debug the javascript using firebug for example. > I did try that as well, but the submit button seems to be detached from the form. I figured ou

[web2py] One time setup of few configurations

2013-05-17 Thread Saifuddin Rangwala
Hi, I want to setup some groups like Administrators, Operators etc.. and give them several different permissions. I have added below to db.py to achieve this: admins = auth.add_group(role = 'Administrators') # Give all permissions to administrators auth.add_permission(admins.id, 'create', d

[web2py] problem creating new controller

2013-05-17 Thread Robin Manoli
Hey, I have created a new file, controller.py under controllers, which has an index function that returns a dict. I have created a folder under views, named controller/index.html which extends layout.html Now I thought I should be able to access it under /myapp/controller/index.html, or /myapp/

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Vinicius Assef
Arnon, how many use cases does your application have? Is time to run tests really a bottleneck in your case? On Fri, May 17, 2013 at 9:07 AM, Arnon Marcus wrote: > That's good news! > > Now the only question that would remain, is weather this means that > test-performance using this, would be f

Re: [web2py] How to run web2py on Linux Shared Hosting With No Shell, or SSH access

2013-05-17 Thread Carlos Costa
Have you asked your host for SSH access? I have used hostgator, I have to ask then to grant me SSH access, and even with this is a pain to make web2py run there. If they dont give it anyway, consider change the host, give a try at pythonanywhere.com, you should install web2py with one click. 2013

Re: [web2py] form.custom in modal window

2013-05-17 Thread Carlos Costa
Have you tested it without modal? Just hit the url for mailVcard.load and make shure it works. If if works you may have to debug the javascript using firebug for example. 2013/5/16 Annet > I have the following link to open a view in a modal window: > > > src="{{=URL('static','img/icons/vCard.p

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Arnon Marcus
That's good news! Now the only question that would remain, is weather this means that test-performance using this, would be fast enough for that to be considered fitting for interactive-TDD... Otherwise the dal-using-code would still be better-off 'mocked' away... -- --- You received this m

Re: [web2py] Re: behaviour of user_signature in URL

2013-05-17 Thread António Ramos
this is my code *controller* def empresa(): query= 0 if not request.args(0) else request.args(0) mytable = SQLFORM.grid( db.e_docs.f_emp_ref==query , csv=False, etc etc etc * * *view* Editar empreiteiro In ubuntu i have to use use

[web2py] Re: Create URL with embedded json object

2013-05-17 Thread Anthony
OK, looks like there is at least one solution that uses Flash: https://github.com/dcneiner/Downloadify. Not sure if there are any other client-side possibilities. Anthony On Friday, May 17, 2013 7:49:07 AM UTC-4, Anthony wrote: > > Are you saying you want the user to download a file containing

[web2py] Re: Create URL with embedded json object

2013-05-17 Thread Anthony
Are you saying you want the user to download a file containing the data? As far as I know, that requires an HTTP request that returns a file (and if the file is of a type the browser knows how to display, then the response also needs a Content-Disposition header indicating the file is an attach

[web2py] Re: behaviour of user_signature in URL

2013-05-17 Thread Anthony
Hard to say without seeing any code. On Friday, May 17, 2013 7:24:29 AM UTC-4, Ramos wrote: > > hello > i have my app running in a windows machine. > > I copied it to a ubuntu server and i have a problem with a URL helper in > my code > > The user goes to a pages via a URL(..., user_signature=Tru

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Anthony
On Friday, May 17, 2013 6:19:16 AM UTC-4, Arnon Marcus wrote: > Using this, would it mean that no file is generated in the file-system? > Does this mean that all that temporary-folder/file jazz would not > be required? > In that case, you could even not have to clear-out the tables from > the pr

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Anthony
On Friday, May 17, 2013 4:23:39 AM UTC-4, Arnon Marcus wrote: > I have some more questions about using an alternative database for testing. > > What would happen to the schema-log file? > Wouldn't having the same model-code using 2 different databases, mess up > the log and brake automatic-migrat

[web2py] Re: saving UPS shipping labels

2013-05-17 Thread Jim Gregory
Just to follow up on this, I had not specified the file type in the function call and hence it did not encode it properly. It works fine now. On Friday, April 19, 2013 3:51:29 PM UTC-5, Jim Gregory wrote: > > I'm working on a script to generate UPS shipping labels and save them on > our server.

[web2py] behaviour of user_signature in URL

2013-05-17 Thread António Ramos
hello i have my app running in a windows machine. I copied it to a ubuntu server and i have a problem with a URL helper in my code The user goes to a pages via a URL(..., user_signature=True) in that page he can edit a record via a button This button calls a controller function via a URL helper (

[web2py] edit static content from web interface nginx

2013-05-17 Thread BlueShadow
Hi, since I'm using nginx as a server I can't edit my static files (css, js...) from the webinterface. I can view them but when I want to edit them I get a 404 error. anyone with the same problem? -- --- You received this message because you are subscribed to the Google Groups "web2py-users"

[web2py] Create URL with embedded json object

2013-05-17 Thread Daniel Gonzalez
Hi, In one of my views I am creating a table. During table creation time I have some dictionaries that I want to return as json objects. So in column "data" I want to provide a link to download this json objects. These objects are not stored anywhere (they are dinamically created), and are thu

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Arnon Marcus
Using this, would it mean that no file is generated in the file-system? Does this mean that all that temporary-folder/file jazz would not be required? In that case, you could even not have to clear-out the tables from the previous test-run, as there wouldn't be any, right? But it should still req

[web2py] CSV special characters

2013-05-17 Thread Domagoj Kovač
Hi, I am working on CSV export. I have a function that returns a string. output_string = StringIO.StringIO() csv_writer = csv.writer(output_string, delimiter=';', quotechar=' ',quoting =csv.QUOTE_MINIMAL) csv_writer.writerows(output) contents = output_string.get

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Arnon Marcus
Another issue: Testing controller-actions is not considered unit-testing, as it relies on an external dependancy that is supposed to be generated by the framework. In web2py it's even worse - you have to prepare an entier execution environment, as is done in this experiment... Generally, treating

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Arnon Marcus
I have some more questions about using an alternative database for testing. What would happen to the schema-log file? Wouldn't having the same model-code using 2 different databases, mess up the log and brake automatic-migration capability? I mean, you could turn migration off for when testing, b