[web2py] One form for two tables

2016-04-28 Thread Andrea Marin
Hi all, I'm trying to setup a form to manage two tables: db.define_table('pratiche', Field('nome', requires=IS_NOT_EMPTY()), Field('descrizione', 'text', requires=IS_NOT_EMPTY()), Field('stato_pratica', requires=IS_IN_SET(['aperta', 'attesa',

Re: [web2py] Re: How can I pre populate a option column of a form?

2016-04-28 Thread Andrea Marin
rm.process().accepted: > > ... > form.add_button('Back', URL('index')) # it's a DOM-manipulation - > place it after form.process() > > > > > On Friday, April 22, 2016 at 12:23:59 AM UTC+3, Andrea Marin wrote: >> >> Trans a lot >> >>

Re: [web2py] Re: How can I pre populate a option column of a form?

2016-04-21 Thread Andrea Marin
Trans a lot > Il giorno 21 apr 2016, alle ore 05:22, Michael Beller <mjbel...@gmail.com> ha > scritto: > > before you call SQLFORM, insert: > db.pratiche.stato_pratica.default = 'aperta' > > > >> On Wednesday, April 20, 2016 at 6:05:06 PM UTC-4, Andrea

[web2py] How can I pre populate a option column of a form?

2016-04-20 Thread Andrea Marin
Hi I have this type of form in my model file: db.define_table('pratiche', Field('nome', requires=IS_NOT_EMPTY()), Field('descrizione', 'text', requires=IS_NOT_EMPTY()), Field('tipo_allegato', requires=IS_IN_SET(['mandato', 'comparsa preliminare',

[web2py] Show a value only if there is in the db

2016-04-06 Thread Andrea Marin
Hi all, I have a db table where I store some information and sometime a file like *.doc or *.pdf This is my model file db.define_table('pratiche', Field('nome', requires=IS_NOT_EMPTY()), Field('descrizione', 'text', requires=IS_NOT_EMPTY()),

Re: [web2py] Re: Preventing hackers from exploiting web2py with wsgi

2016-02-25 Thread Marin Pranjić
. Regards, Marin On Thu, Feb 25, 2016 at 9:40 AM, Robin Manoli <ramat...@gmail.com> wrote: > They recommended not to use wsgi, and so far I've been using mod_wsgi. > Sorry if I didn't know everything about wsgi. > > Thanks for the tips! Maybe I can amuse myself with some rude peopl

Re: [web2py] Re: DAL is dropping column when not supposed to

2016-02-07 Thread Marin Pranjić
Hey Alex, could it be that you define the table twice in the code? Marin On Mon, Feb 8, 2016 at 6:56 AM, Alex Glaros <alexgla...@gmail.com> wrote: > If that model is consistent with the current state of the database, run > the code once with fake_migrate so web2py will update t

Re: [web2py] Re: Web2py Update

2016-02-07 Thread Marin Pranjić
you can use sqlalchemy if you prefer an ORM. Marin > > > On Sunday, February 7, 2016 at 5:42:15 AM UTC-5, Maurice Waka wrote: >> >> Thanks@Niphlod >> >> On Sun, Feb 7, 2016 at 12:21 PM, Niphlod <nip...@gmail.com> wrote: >> >>> honestly yo

Re: [web2py] oauth2 for google

2016-01-21 Thread Marin Pranjić
from gluon.storage import Storage On Thu, Jan 21, 2016 at 3:51 PM, dirman wrote: > I am getting > > global name 'Storage' is not defined > > when using Storage(json.load(f)['web']) > > I need help > > -- > Resources: > - http://web2py.com > - http://web2py.com/book

Re: [web2py] Re: Why I'm unable to login my gmail in web2py for mailing and getting "sign in prevented messages"?

2016-01-09 Thread Marin Pranjić
This has nothing to do with web2py, it is completely google related. Have you tried clicking on "Learn more" or "Review your devices now"? You might find your answers... Marin On Sat, Jan 9, 2016 at 12:35 PM, RAGHIB R <raghib@iiits.in> wrote: >

Re: [web2py] Why this doesn't work as expected?

2016-01-03 Thread Marin Pranjić
Change your expectations :P You are inserting into database while generating the view, before view even gets to the client (browser). Your "href" needs to point to a controller, for example: {{= x.name}} Then, in "mycontroller.py" file you need to have a "my_insert_function" like this: def

Re: [web2py] DAL alternatives

2015-10-28 Thread Marin Pranjić
of the puzzle are missing here? Regards, Marin On Wed, Oct 28, 2015 at 4:07 PM, António Ramos <ramstei...@gmail.com> wrote: > my inconvenients: > > 1 - Bootstrap, i need layout.html but dont want bootstrap. How do i get > rid of bootstrap or change it to semantic ? >

Re: [web2py] web2py job in Florida

2015-09-08 Thread Marin Pranjić
Here it is: https://jobs.brassring.com/tgwebhost/jobdetails.aspx?jobId=1158965=25326=5443=mail=1=1=5443=1158965_5443=823 :) On Tue, Sep 8, 2015 at 10:58 AM, Michele Comitini < michele.comit...@gmail.com> wrote: > Seems a private link... > > 2015-09-08 10:45 GMT+02:00 Jason (spot) Brower

Re: [web2py] Absolute URLs

2015-06-09 Thread Marin Pranjić
You don't need to force it. Use functools.partial to make your own URL helper instead. Marin On Tue, Jun 9, 2015 at 12:21 PM, Francisco Costa m...@franciscocosta.com wrote: How to force web2py to make all URL's absolute instead of having to write URL(..., scheme=True, host=True) in every

Re: [web2py] Absolute URLs

2015-06-09 Thread Marin Pranjić
Ok, sorry. I don't think there is a way to do it like that. Looking for something similar to auth.settings, right? Marin On Tue, Jun 9, 2015 at 3:32 PM, Francisco Tomé Costa m...@franciscocosta.com wrote: I was looking for a classy way to change the default, didn't want to rewrite the URL

Re: [web2py] Absolute URLs

2015-06-09 Thread Marin Pranjić
Ok, as you wish... Put this in model file: default_URL = URL URL = new code here Marin On Tue, Jun 9, 2015 at 1:30 PM, Francisco Tomé Costa m...@franciscocosta.com wrote: but that way I would have to rewrite all my apps code, can't I change the default variables in models? I would like

Re: [web2py] is this a pydal issue?

2015-06-08 Thread Marin Pranjić
You should be able to just write: if not (op_rec and op_rec2 and op_rec3 and op_rec4) Marin On Mon, Jun 8, 2015 at 1:03 PM, Auden RovelleQuartz oves@gmail.com wrote: What does this error mean - I never got it pre-pydal... { Ticket ID 24.211.17.122.2015-06-08.05-34-25.9f6361e2-d387

Re: [web2py] Restricting Access to database based on roles at the Database level.

2015-05-14 Thread Marin Pranjić
Hey Jason, you'll need to create database and setup users/roles[1]. Then use proper user in database URI string[2]. 1 http://www.postgresql.org/docs/current/static/sql-createuser.html 2

Re: [web2py] Re: idea: new helpers

2015-04-01 Thread Marin Pranjić
Dmitry, you can create your own custom helpers and use them in your app. On Wed, Apr 1, 2015 at 8:30 AM, Niphlod niph...@gmail.com wrote: hell no! On Wednesday, April 1, 2015 at 7:51:26 AM UTC+2, Dmitry Ermolaev wrote: DIV( _class='row my_class') = ROW(_class='my_class') DIV(

Re: [web2py] you mean me?

2015-03-31 Thread Marin Pranjić
Hehe, it seems that my name is written twice but both are wrong so maybe that's not me either :D Marin On Tue, Mar 31, 2015 at 5:34 PM, Manuele Pesenti manuele.pese...@gmail.com wrote: I noticed a Manuele Presenti is mentioned here: http://www.web2py.com/books/default/chapter/29/01

Re: [web2py] web2py framework as iOS app backend

2015-02-25 Thread Marin Pranjić
I have apps that run as android/ios backend services. It's REST, there's nothing special about it. You can use web2py if you like it, I would definitely reccomend it :) Marin On Wed, Feb 25, 2015 at 5:22 PM, Amit Kumar amt.ku...@gmail.com wrote: Hi, We are deciding backend layer for our iOS

Re: [web2py] SQLite, or some other database?

2015-01-03 Thread Marin Pranjić
The latter one works only with postgres: https://groups.google.com/forum/#!topic/web2py/1_DHUrrg6O8 What's the error message? On Sat, Jan 3, 2015 at 5:30 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: On Friday, 2 January 2015 16:03:16 UTC-6, mweissen wrote: I have tried to

Re: [web2py] web2py error on cygwin

2014-11-23 Thread Marin Pranjić
You don't need a gui, just type the password in the console (as in screenshot) Marin On Sun, Nov 23, 2014 at 6:40 AM, Jorge Molongua jorge.molon...@gmail.com wrote: Hi. I'm using cygwin on Windows 8. I'm new to this. It reports a warning when I try to load web2py: WARNING:web2py:GUI

Re: [web2py] if else if in views

2014-10-31 Thread Marin Pranjić
Why don't you use elif? On Wed, Oct 29, 2014 at 6:23 PM, Sriram Gudimella sriramsgudime...@gmail.com wrote: Why does this .. table {{for i in range(0,3):}} tr {{if i==0:}} td Email : /td td

Re: [web2py] Re: Making a DevBar to develop faster in web2py.

2014-09-18 Thread Marin Pranjić
rendering. Marin On Thu, Sep 18, 2014 at 7:56 AM, Encompass solutions encomp...@gmail.com wrote: Yes, this is something that should only be used in a local setup. It's to help development. If there are ways to stop this from showing up accidently anyway, I fully intend on using

Re: [web2py] Trying to post a small improvement to web2py source.

2014-09-13 Thread Marin Pranjić
. You should be able to figure it out in the github UI. Let me know if you need more help. Marin On Sat, Sep 13, 2014 at 8:39 AM, Encompass solutions encomp...@gmail.com wrote: How do I submit a small change I have made the the Web2py source? It's a small improvement. But when I try to git

Re: [web2py] Re: Check is user is the owner of row (help with db query)

2014-09-08 Thread Marin Pranjić
Make sure to read Authorization chapter in book: http://web2py.com/books/default/chapter/29/09/access-control#Authorization -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

Re: [web2py] Re: a proposal for form improvement

2014-09-06 Thread Marin Pranjić
improvements that can be done to forms anyway, which can be implemented in a new standard.For example that it's a bit tricky to remove colons from form labels. SQLFORM is precious for what it does on server side, not because of html. You should still use it even if you write your own html. :) Marin

Re: [web2py] Reasoning behind dict objects, such as request.vars, session, etc

2014-09-06 Thread Marin Pranjić
, such as attrdict: https://pypi.python.org/pypi/attrdict/0.5.1 (haven't tried, but should work very similar) Marin On Sat, Sep 6, 2014 at 9:31 AM, Robin Manoli ramat...@gmail.com wrote: Hey, It is much more clean to write *session.var* than *session['var']* when I can, as well as *if session.var* instead

Re: [web2py] Re: type 'exceptions.RuntimeError' File.../databases/c8b....sales.table appears corrupted

2014-09-05 Thread Marin Pranjić
It can happen if you run out of disk space. You should check it. Btw, maybe just .table got corrupted... Make sure to backup everything, and then do a fake migrate. Marin On Fri, Sep 5, 2014 at 6:51 PM, Greg Vaughan greg.s.vaug...@gmail.com wrote: I wasn't working on the site at the time

Re: [web2py] Re: web2py 2.9.6 is out!

2014-09-02 Thread Marin Pranjić
Home key doesn't work for you? On Tue, Sep 2, 2014 at 5:31 PM, António Ramos ramstei...@gmail.com wrote: Speaking about documentation... In the English online book, the Table of Contents should be fixed. I HATE having to scroll to the top to select another topic. I suppose other peolpe

Re: [web2py] How can I prevent a user from pressing the browser's back button?

2014-08-30 Thread Marin Pranjić
You can't. This is something you should take care of on server side. Use session to store user's state, or store it in DB. On Tue, Aug 26, 2014 at 11:36 PM, Fotis Gioulekas gioule...@gmail.com wrote: Hello to everybody, I have built a quiz that randomlycreates questions. Each time a user

Re: [web2py] Re: float usage; 2 decimals

2014-08-15 Thread Marin Pranjić
Can you show us your table definition? Web2py doesn't have float. There are double and decimal field types. You don't need to use postgres. Marin On Fri, Aug 15, 2014 at 10:22 AM, Stefan van den Eertwegh stefan.eertw...@gmail.com wrote: I use in the model the type float and MySQL as backend

Re: [web2py] Re: float usage; 2 decimals

2014-08-15 Thread Marin Pranjić
Can you change float to double and try if it fixed the issue? Marin On Fri, Aug 15, 2014 at 10:31 AM, Stefan van den Eertwegh stefan.eertw...@gmail.com wrote: db.define_table( 'invoice_rule', Field('invoice', db.invoice, label=T('Invoice no.')), Field('amount', 'float', label

Re: [web2py] Re: float usage; 2 decimals

2014-08-15 Thread Marin Pranjić
to double than it stays as int in mysql. Shall i change the fields manually in mysql? Op vrijdag 15 augustus 2014 10:35:49 UTC+2 schreef Marin Pranjić: Can you change float to double and try if it fixed the issue? Marin On Fri, Aug 15, 2014 at 10:31 AM, Stefan van den Eertwegh stefan

Re: [web2py] Nginx and uwsgi Internal Server Error

2014-08-04 Thread Marin Pranjić
Did you copy wsgihandler.py inside web2py root? Marin On Mon, Aug 4, 2014 at 11:50 PM, Jim S j...@qlf.com wrote: Clean install with all dependencies in place before installing nginx/uwsgi/web2py yields the same results. It works if I don't have pyodbc installed. Any more thoughts on what

Re: [web2py] Nginx and uwsgi Internal Server Error

2014-08-04 Thread Marin Pranjić
Is uwsgi running after restart? ps aux | grep uwsgi On Tue, Aug 5, 2014 at 12:08 AM, Jim Steil ato.st...@gmail.com wrote: I did not. I used the script in the web2py/scripts directory. On Mon, Aug 4, 2014 at 5:07 PM, Marin Pranjić marin.pran...@gmail.com wrote: Did you copy

Re: [web2py] Nginx and uwsgi Internal Server Error

2014-08-04 Thread Marin Pranjić
:/home/www-data/web2py$ On Mon, Aug 4, 2014 at 5:12 PM, Marin Pranjić marin.pran...@gmail.com wrote: Is uwsgi running after restart? ps aux | grep uwsgi On Tue, Aug 5, 2014 at 12:08 AM, Jim Steil ato.st...@gmail.com wrote: I did not. I used the script in the web2py/scripts directory

Re: [web2py] Re: Radio widget not working as a Boolean

2014-06-28 Thread Marin Pranjić
Boolean field is meant to be used with checkbox. Checkbox doesn't even submit if it's not checked and that's how False is identified. You can use filter_in or SQLCustomType to modify the behavior and to map one into another.

Re: [web2py] Do not mask password field

2014-06-13 Thread Marin Pranjić
Can you try if this works? db.auth_user.password.type = 'string' On Sat, Jun 14, 2014 at 12:26 AM, Dave S snidely@gmail.com wrote: On Friday, June 13, 2014 2:09:59 PM UTC-7, Robert O'Connor wrote: You could do it via js likely...but better question is why do you want this? --Rob

Re: [web2py] web2py password encryption/decryption

2014-05-30 Thread Marin Pranjić
desired fromat from CRYPT validator: https://github.com/web2py/web2py/blob/master/gluon/validators.py#L2850 If not, just create your own: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Custom-validators Marin On Fri, May 30, 2014 at 4:22 PM, farmy zdrowia bi...@farmyzdrowia.pl

Re: [web2py] Issue about ,user_signature=True

2014-05-14 Thread Marin Pranjić
are you logged in? Marin On Wed, May 14, 2014 at 5:28 PM, António Ramos ramstei...@gmail.com wrote: Hello i use user_signature=True in an app. I recently moved it to a linux(centos)box at webfaction suddenly i get Not authorized when clicking a link to page B in a page A that has

Re: [web2py] Issue about ,user_signature=True

2014-05-14 Thread Marin Pranjić
...@gmail.com wrote: yes!! 2014-05-14 16:45 GMT+01:00 Marin Pranjić marin.pran...@gmail.com: are you logged in? Marin On Wed, May 14, 2014 at 5:28 PM, António Ramos ramstei...@gmail.comwrote: Hello i use user_signature=True in an app. I recently moved it to a linux(centos)box

Re: [web2py] strange problem with DAL

2014-05-05 Thread Marin Pranjić
that's created by DAL is valid. And this happens even after migrations are fixed. So it's probably SQLite that's broken/corrupted and I'm not sure if those issues are somehow related. Marin On Sun, May 4, 2014 at 8:58 PM, Niphlod niph...@gmail.com wrote: how are your table defined ? the fact

Re: [web2py] strange problem with DAL

2014-05-05 Thread Marin Pranjić
not web2py, it's not sqlite, but it doesn't work. -__- On Mon, May 5, 2014 at 9:05 AM, Marin Pranjić marin.pran...@gmail.comwrote: Well, nothing unusual with my table definitions. Everything by the specs. I just removed all .table files and started with new sqlite file, and that problem is gone

Re: [web2py] Querying Tables from Private Folder

2014-05-05 Thread Marin Pranjić
The command written in previous message is meant to be run along with web2py server, not instead. If that's what you mean by isolation. Not sure if I understand the question. Marin On Sun, May 4, 2014 at 5:35 PM, jaw...@gmail.com wrote: Thanks Marin Is there any way to tun the script

Re: [web2py] strange problem with DAL

2014-05-05 Thread Marin Pranjić
...@gmail.com wrote: What I've read says that you need to specify the full path to the sqlite data file or you will get this error. What's your db.py look like? On Monday, May 5, 2014 12:31:35 AM UTC-7, Marin Pranjić wrote: I copied broken database locally so I can test it. I also added print

Re: [web2py] strange problem with DAL

2014-05-05 Thread Marin Pranjić
File can't just dissapear in the middle of transaction :) And my table is not called main.message anyway. And it's not blank, I have data stored in there that I can read. I can't write into one specific table. Other tables work. Marin On Tue, May 6, 2014 at 12:21 AM, Derek sp1d...@gmail.com

Re: [web2py] if statement always true in view

2014-05-04 Thread Marin Pranjić
You have a typo in there. funciton should be function. That's why it always returns None. Marin On Sat, May 3, 2014 at 5:15 PM, john smith lukaszbur...@gmail.com wrote: Hello! I have a problem with 'reddit-clone' app from this tutorial. I'm stuck at moment in 2:28:00. My problem

Re: [web2py] Querying Tables from Private Folder

2014-05-04 Thread Marin Pranjić
the script, so scriptname.py will have access to DAL and everything. Of course, this expects table definitions in application's model files. Marin On Sat, May 3, 2014 at 2:03 PM, jaw...@gmail.com wrote: I'm trying to query my tables from the private folder: from gluon.tools import DAL db = DAL

Re: [web2py] Virtual Field not working anymore?

2014-05-04 Thread Marin Pranjić
it fails on +. But it is backend-specific, I am not sure. Marin On Sun, May 4, 2014 at 6:02 AM, Leonardo Pires Felix leona...@piresfelix.com wrote: I've created a virtualfield on my table as this: db.define_table(alunos, SQLField(nome, string, length=255, label=Nome, notnull=True

Re: [web2py] Howto deploy web2py on a shared host?

2014-05-04 Thread Marin Pranjić
python 2.6 or 2.7 and have mod_wsgi you are able to run web2py. Marin On Sat, May 3, 2014 at 1:28 AM, jansende janusendi...@gmail.com wrote: Hi guys, I am searching for a web-framework for my website, and are currently trying several option. I would be interested in using web2py, but I do

[web2py] strange problem with DAL

2014-05-04 Thread Marin Pranjić
Hi. I have application hosted on EC2. It is a testing server. It's like production environment except it uses SQLite. I have a table called message_receiver. When I fetch records (for ex. in appadmin) it works, but when I try to insert something (appadmin or in-app) i get the following error:

Re: [web2py] strange problem with DAL

2014-05-04 Thread Marin Pranjić
To confirm... https://github.com/web2py/web2py/blob/master/gluon/dal.py#L1262 This gets executed on every request. However I still don't understand why sqlite fails on insert. It fails on testing server but it works on my local instance. Marin On Sun, May 4, 2014 at 3:13 PM, Marin Pranjić

Re: [web2py] parallel shell cause portal block

2014-04-24 Thread Marin Pranjić
It might be that database is blocking because you never end a transaction. Do you have db.commit() in your task? Marin On Thu, Apr 24, 2014 at 8:58 PM, Manuele Pesenti manuele.pese...@gmail.comwrote: Hi! I want to notify a strange behaviour. If I run any kind of parallel command

Re: [web2py] Admin is disabled because insecure channel error Hosting web2py app on Amazon EC2 Linux server

2014-04-21 Thread Marin Pranjić
http is insecure. you need to use https to access admin app. Marin (mobile) On Apr 21, 2014 5:02 AM, Pawan Gupta pawangupt...@gmail.com wrote: Hi Everyone We are having serious problem with our website 911india.com. We have hosted it on Amazon EC2 server and there is a ticket that is issued

Re: [web2py] Login ajax component

2014-04-21 Thread Marin Pranjić
This sounds like a bug. Marin (mobile) On Apr 18, 2014 9:10 PM, Louis Amon moo...@msn.com wrote: I'm trying to build an Ajax-based login form using web2py's LOAD() helper. I made a controller named 'users.py', in which I defined a 'signin()' function : def signin(): form=auth.login

Re: [web2py] autodelete(?) on computed field

2014-04-15 Thread Marin Pranjić
Ok, I'll just code it by myself. I was hoping there is better solution. Marin On Mon, Apr 14, 2014 at 11:49 AM, Marin Pranjić marin.pran...@gmail.comwrote: db.define_table(..., Field('image', 'upload', autodelete=True), Field('thumbnail', 'upload', autodelete=True, compute

[web2py] autodelete(?) on computed field

2014-04-14 Thread Marin Pranjić
delete_uploaded_files defined inside gluon/dal.py. Is there an easier way or I have to manually do the code? Marin -- 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

Re: [web2py] Re: Password feild type seems to save in plain text for me.

2014-03-26 Thread Marin Pranjić
, requires=[is_crypted]), so, yeah, you need to add CRYPT validator by yourself. Marin On Wed, Mar 26, 2014 at 1:14 PM, Encompass solutions encomp...@gmail.comwrote: How do I do this? And is this how it is don't in db.auth_user? Cause it's rather confusing that it doesn't do

Re: [web2py] please help testing windows and mac binary

2014-03-20 Thread Marin Pranjić
windows 8.1 C:\Users\Marin\Desktop\web2pyweb2py.exe Traceback (most recent call last): File string, line 6, in module File __main__.py, line 128, in module File __main__web2py__.py, line 18, in module File /home/mdipierro/make_web2py/web2py/gluon/__init__.py, line 15, in modu le File

Re: [web2py] Password feild type seems to save in plain text for me.

2014-03-18 Thread Marin Pranjić
')) If you use SQLFORM(db.tablename...) it will automatically validate (=hash the password) Marin On Tue, Mar 18, 2014 at 6:04 PM, Encompass solutions encomp...@gmail.comwrote: I am trying to create a model with an encrypted key so it's harder for someone to maliciously screw over my customers. I

[web2py] How to use multiple SQLALL objects in groupby

2014-03-04 Thread Marin Pranjić
but that's not a way to go. It should be easier :) Marin -- 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 message because you

Re: [web2py] Re: session security issue?

2014-03-03 Thread Marin Pranjić
Isn't this why session.renew() was added? On Mon, Mar 3, 2014 at 2:29 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I will check and release a patch soon. Please do not discuss possible security issues on this mailing list. Report them to the developers directly. On Monday, 3

Re: [web2py] Re: email on logging in is case sensitive. Is this a good idea?

2014-02-24 Thread Marin Pranjić
It is sensitive by default, and by design: http://email.about.com/od/emailbehindthescenes/f/email_case_sens.htm :( but not by implementation, i don't think anyone is using case sensitive emails. I'd like to see the above line in welcome app, as I have it in all my apps. Marin On Mon, Feb 24

Re: [web2py] how login_onaccept works ?

2014-02-20 Thread Marin Pranjić
you are calling the function and assigning the return value use = lambda: check_production(1) or just = check_production, without (1) Marin (mobile) On Feb 21, 2014 12:56 AM, brushek luk...@chrustek.net wrote: Hello web2py users and devs, I have simple question: does

Re: [web2py] Virtual Fields not working on print.

2014-02-19 Thread Marin Pranjić
most likely get_country is failing for some reason Marin On Wed, Feb 19, 2014 at 9:40 AM, Jason Brower encomp...@gmail.com wrote: I have this in the model... import uuid import os import pygeoip gi = pygeoip.GeoIP(os.path.join(request.folder, 'private', 'GeoIP.dat')) def get_country(row

Re: [web2py] Absolute URL issue in PythonAnywhere when using scheduled script

2014-02-15 Thread Marin Pranjić
As explained here: http://www.web2py.com/books/default/chapter/29/04/the-core#Absolute-urls You should use: URL(..., scheme='http', host='www.mysite.com') Marin On Sat, Feb 15, 2014 at 4:49 PM, Ykä Marjanen yka.marja...@gmail.comwrote: I got the scheduled background script working in PA

[web2py] Single form for many to many relationship

2014-02-14 Thread Oleg Marin
Hi! I'm looking for solution for nice single SQLFORM for many to many relationship. For example I have such model: db.define_table('person', Field('name'), Field('position'), Field('office', 'integer')) db.define_table('thing', Field('name'), Field('color')) db.define_table('person_thing',

Re: [web2py] Re: [CLOSED] XMLHttpRequest cannot load https://www..... disallowed for cross-origin request ...

2014-02-14 Thread Marin Pranjić
complete, so once I found that issue, the CORS started to function properly. Thanks again for your responses. On Monday, December 16, 2013 11:16:05 PM UTC+8, Marin Pranjić wrote: Well, as I said, try your own jquery.ajax call. If it works, then CORS is enabled but component load is failing

Re: [web2py] Re: Javascript runs locally but not when deployed

2014-02-14 Thread Marin Pranjić
Do you use http or https? What if you try another one? Marin On Fri, Feb 14, 2014 at 4:31 PM, Leonel Câmara leonelcam...@gmail.comwrote: There are no errors at all on the browser javascript console? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http

Re: [web2py] Third-party image grabs being redirected...

2014-02-13 Thread Marin Pranjić
Maybe redirection based on request.env.http_referer ? Not sure if I understood (not a twitter user) but if you give a link to an actual tweet it may help :) Marin On Thu, Feb 13, 2014 at 2:27 PM, Jason Brower encomp...@gmail.com wrote: Is there a way to redirect those that try to download

Re: [web2py] Re: Latest thinking -- Bootstrap vs. Foundation?

2014-02-11 Thread Marin Pranjić
At the moment I like Foundation more then any other. Semantic UI also looks great (and promising). Bootstrap is still awesome, of course. Marin On Tue, Feb 11, 2014 at 3:39 PM, Michele Comitini michele.comit...@gmail.com wrote: I agree with the article. Nothing prevents using Foundation

[web2py] Re: binary(1024) field truncates to 255

2014-02-08 Thread Oleg Marin
I'm sorry for long silence, I was busy. I solved my problem. At first, I didn't specified TDS version in connection string. Then I found that connection string at least for mssql not fully URI-compliant, multiple parameters after question sign separating by ; instead of . I think it needs to

Re: [web2py] Why does redirect() always append '#'?

2014-02-03 Thread Marin Pranjić
We can only guess without seeing the code. My guess is: 1. redirect doesn't append #, something else does it client side 2. # doesn't break script execution, something else does (probably same issue that appends #) Can you check your console for javascript error logs? Marin On Mon, Feb 3

[web2py] Re: binary(1024) field truncates to 255

2014-01-30 Thread Oleg Marin
12:55:51 PM UTC+1, Oleg Marin wrote: Hi! I'm using MSSQL2008 in readonly without tables definition, and when I run stored procedure with executesql, it returns field of type binary(1024) truncated to size of 255. Running same procedure directly with pyodbc works well. Is it a bug

[web2py] binary(1024) field truncates to 255

2014-01-29 Thread Oleg Marin
Hi! I'm using MSSQL2008 in readonly without tables definition, and when I run stored procedure with executesql, it returns field of type binary(1024) truncated to size of 255. Running same procedure directly with pyodbc works well. Is it a bug, or something I have missed? -- Resources: -

[web2py] MSSQL binary(1024) field truncated to length of 255

2014-01-29 Thread Oleg Marin
Hi! I'm using MSSQL 2008, and when I run stored procedure with executesql, among other it returns field of type binary(1024) truncated to length of 255. Pyodbc directly works well. Is it a bug? Or maybe I have missed something? -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] web2py.js disables submit buttons when submitting form with ajax

2014-01-28 Thread Oleg Marin
Hi! I'm trying to submit form with $.post(), by attaching function handling event submit. And when it send ajax request to server some handler from web2py.js disables submit button, and changes it's value to Working Alright, it is good behavior. But it doesn't re-enable it after ajax

Re: [web2py] Re: Form input prolem

2014-01-23 Thread Marin Pranjić
INPUT(_name='password', _type='password') because INPUT(_password='password') is a nonsense. On Wed, Jan 22, 2014 at 8:14 PM, Lucas Schreiber lucas.schreiber.pri...@gmail.com wrote: Hi, i thought the form worked good, but unfortunally i was wrong. name = form.vars.name contains the data

Re: [web2py] auth.is_logged_in and @auth.requires_signature() under investigation

2013-12-21 Thread Marin Pranjić
this be treated as a bug in JS-part of components load? Marin On Sat, Dec 21, 2013 at 3:44 PM, weheh richard_gor...@verizon.net wrote: I am dead in the water trying to make an https ajax call from an http session. CORS is enabled on server but the web2py_component https URL with user_signature=True

Re: [web2py] auth.is_logged_in and @auth.requires_signature() under investigation

2013-12-21 Thread Marin Pranjić
, you should write your own javascript function that, using $.ajax, sends CORS requests and handles it. Marin On Sat, Dec 21, 2013 at 4:19 PM, Marin Pranjić marin.pran...@gmail.comwrote: Hello, I tried to trace down the problem. If you sign an url on different scheme (http - https

Re: [web2py] Re: XMLHttpRequest cannot load https://www..... disallowed for cross-origin request ...

2013-12-16 Thread Marin Pranjić
@weheh can you try a custom jQuery.ajax cross domain call for testing/debugging? (just load something from HTTP to HTTPS) On Mon, Dec 16, 2013 at 2:38 PM, weheh richard_gor...@verizon.net wrote: Hi Anthony, I added CORS stuff to my Apache httpd.conf as per this

Re: [web2py] Re: XMLHttpRequest cannot load https://www..... disallowed for cross-origin request ...

2013-12-16 Thread Marin Pranjić
it properly. On Mon, Dec 16, 2013 at 4:12 PM, weheh richard_gor...@verizon.net wrote: @Marin: Thanks for your suggestion. I believe that that is precisely what is causing this issue. The original call is an HTTP call. It's followed by an HTTPS that results in the error message. But still no idea how

Re: [web2py] Re: Error with session when user tries to login

2013-12-14 Thread Marin Pranjić
with a previous version? On Friday, 13 December 2013 13:40:18 UTC-6, Marin Pranjić wrote: This happens when customer tries to login. I have no idea why it happens and it works when I try it on localhost. web2py™ Version 2.8.2-stable+timestamp.2013.11.28.07.51.37 PythonPython 2.7.3: /usr/bin/python

[web2py] Error with session when user tries to login

2013-12-13 Thread Marin Pranjić
= getstate() TypeError: 'NoneType' object is not callable Any ideas? It's urgent so any suggestion is welcome. Marin -- 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

Re: [web2py] Re: Error with session when user tries to login

2013-12-13 Thread Marin Pranjić
Ok, let's continue discussion there. Marin On Fri, Dec 13, 2013 at 9:16 PM, Leonel Câmara leonelcam...@gmail.comwrote: Yes, Lucas and I are having the same problem. https://groups.google.com/forum/#!topic/web2py/CSuT_CknD20 Restarting the webserver temporarily solves the problem for me

[web2py] Re: login crash under 2.8.2

2013-12-13 Thread Marin Pranjić
I just found this: https://groups.google.com/forum/#!searchin/web2py/weird$20auth$20error/web2py/jkqyPM5_zaE/Ve5gy7greuoJ This is version 2.4.5 so it is NOT something introduced in recent version. I am also privileged to feel the pain that this issue causes in production. Marin -- Resources

[web2py] Scheduler - observation

2013-12-13 Thread Marin Pranjić
the issues as it usually does, but somehow failed even if it acts completely ok (has heartbeat, schedules tasks). Scheduler still rocks. Marin -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p

Re: [web2py] session cookie for two subdomains

2013-12-06 Thread Marin Pranjić
up Marin (mobile) On Dec 6, 2013 12:12 AM, Marin Pranjić marin.pran...@gmail.com wrote: ^bump On Thu, Dec 5, 2013 at 8:22 PM, Marin Pranjić marin.pran...@gmail.comwrote: Hi, I have two subdomains for one app, and I need to use both. So I have to set Domain header in session cookie

[web2py] Re: session cookie for two subdomains

2013-12-06 Thread Marin Pranjić
what you are trying to do. On Thursday, 5 December 2013 13:22:08 UTC-6, Marin Pranjić wrote: Hi, I have two subdomains for one app, and I need to use both. So I have to set Domain header in session cookie to the domain root (. domain.com). Where should I put that code? Not sure how exactly

Re: [web2py] Re: session cookie for two subdomains

2013-12-06 Thread Marin Pranjić
Yes, it works. Marin On Fri, Dec 6, 2013 at 6:37 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I think putting this in a model file should do it: response.cookies['session_id_appname']['domain'] = '.example.com' Have you tried it? On Friday, 6 December 2013 10:28:44 UTC-6

[web2py] session cookie for two subdomains

2013-12-05 Thread Marin Pranjić
Hi, I have two subdomains for one app, and I need to use both. So I have to set Domain header in session cookie to the domain root (.domain.com). Where should I put that code? Not sure how exactly to do it for session cookie. Marin -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] session cookie for two subdomains

2013-12-05 Thread Marin Pranjić
^bump On Thu, Dec 5, 2013 at 8:22 PM, Marin Pranjić marin.pran...@gmail.comwrote: Hi, I have two subdomains for one app, and I need to use both. So I have to set Domain header in session cookie to the domain root (. domain.com). Where should I put that code? Not sure how exactly to do

[web2py] request.folder

2013-12-04 Thread Marin Pranjić
With trunk (and 2.8.2) I don't get absolute path. request.folder is applications/appname Shouldn't it be absolute instead of relative? Marin -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p

Re: [web2py] request.folder

2013-12-04 Thread Marin Pranjić
update: It only happens when I use background task (-S appname -M -R ...) I thought it would also print absolute path. But this happens with older versions so I guess it's expected? Marin On Wed, Dec 4, 2013 at 11:39 AM, Marin Pranjić marin.pran...@gmail.comwrote: With trunk (and 2.8.2) I

Re: [web2py] Re: admin app killed!

2013-12-02 Thread Marin Pranjić
Clear your sessions, clear existing error tickets and then try again. Marin On Mon, Dec 2, 2013 at 4:59 PM, Jonathan Lundell jlund...@pobox.com wrote: On 2 Dec 2013, at 7:49 AM, JoeCodeswell joecodesw...@gmail.com wrote: Here's a zip of C:\web2py\applications\admin\errors contents. Stype

Re: [web2py] auto compiled like in django

2013-11-17 Thread Marin Pranjić
. If you want more django-like behavior, you can write your code inside modules. Marin On Sun, Nov 17, 2013 at 9:02 AM, 黄祥 steve.van.chris...@gmail.com wrote: hi, just wondering, why web2py didn't have auto compiled like in django? e.g. everytime create the new python file in django

[web2py] grid exception, what is wrong?

2013-10-29 Thread Marin Pranjić
? Exception is: type 'exceptions.AttributeError' 'Row' object has no attribute 'uuid' While 2.7.1 would print: Query Not Supported: ('ERROR', '42703', 'column file_queue.uuid does not exist') Marin -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py

Re: [web2py] Re: web2py scheduler not working

2013-10-24 Thread Marin Pranjić
-recipes#Start-the-scheduler-as-a-Linux-service-%28upstart%29 Marin On Wed, Oct 23, 2013 at 7:43 AM, ranjith ranjith2...@gmail.com wrote: Thanks for the response. Other than the below script, it was mentioned in the document that scheduler workers can be started via cron@reboot The scheduler does

  1   2   3   4   >