Re: [web2py] Re: Emails never making it to hotmail accounts

2012-04-29 Thread tsvim
i just looked up your domain. You should setup DKIM and SPF records for your domain. Don't have the links to explanations handy, but basically those are two different technologies that allow you to authenticate the source of the mail thereby proving that a spammer didn't just set the from field

[web2py] Viewing tickets outside of admin

2012-03-28 Thread tsvim
Hi, Lately, I've been using pythonanywhere to work on my pet project together with Dropbox. It's very fun, as it allows me to test all kinds of access (mobile, desktop), various environments (work, home), os's etc. Obviously I'm unable to access the admin as I'm not at a local machine and I don

Re: [web2py] Re: DAL or SQL?

2012-03-26 Thread tsvim
Not sure if this is relevant, but you can do the following with datetime. >>> import datetime >>> a = datetime.datetime(2007, 12, 6, 16, 29, 43, 79043) >>> b = datetime.datetime(2011, 10, 3, 12, 0, 0, 0) >>> c = b-a >>> c datetime.timedelta(1396, 70216, 920957) >>> (c.microseconds + (c.seconds +

[web2py] Re: auth.login() from inside a component in a dialog

2012-03-22 Thread tsvim
I think this actually is a bug. I haven't looked at it more, but I changed my default controller/function to home/index When I login (regular login except for the following lines in my model) it returns me to default/index (my old controller still exists there until I finished refactoring the co

[web2py] Re: Possible bug with a referenced field?

2012-03-01 Thread tsvim
This issue seems to be related to the one that was mentioned sone time ago about multi-tenancy and validators. I think IS IN DB should deal with this. So unless you specify the request tenant field IS IN DB should only relate to the specific tenant. I'll build a patch accordingly. Please notify

[web2py] Re: Possible bug with a referenced field?

2012-02-29 Thread tsvim
over the weekend, Thanks, Tsvi On Wednesday, February 29, 2012 12:47:04 AM UTC+2, tsvim wrote: > > Hi, > > In my models I have 2 tables, where table 1 has field "a" referencing > table 2. As each user has a bunch of fields both in table 1 as well as > in table 2, I used t

[web2py] Re: Nesting HTML tables

2012-01-31 Thread tsvim
Well apparently you're correct. Nesting a table within a table is only possible if the inner table is within a td according to the HTML spec. (Not that it doesn't render ok in most browsers) I was copying from some Google result on nested tables. I managed to get my wanted result by setting a cor

[web2py] Re: Auth.registration_requires_invitation

2012-01-23 Thread tsvim
Hi all, I'd be happy to collaborate on such a feature if needed, as it is something on my roadmap for my app. Basically, I want to allow 2 users to collaborate on the same data, by allowing a user to invite a friend to collaborate. If you have some code already, please share. Tsvi

[web2py] session.token does not get picked up by default value for database entry

2012-01-18 Thread tsvim
Hi all, I get the following weird behavior. I defined a common_fields, being request_tenant as such: db._common_fields.append(Field('request_tenant',default=session.table_token,writable=False)) session.table_token is a uuid generated by the controller. There I have the following code: session

[web2py] Inherit type from parent

2012-01-15 Thread tsvim
Hi all, once again I turn to you with my latest question. I have a self-referencing table: db.define_table('accounts', Field('name','string'), Field('parent_account','reference accounts'), Field('account_type','string')) What I'm trying to achieve i

[web2py] global functions in models

2012-01-04 Thread tsvim
Hi all, I'm trying to use the callbacks for auth.settings.register_onvalidation. I first put the function in controllers, when I discovered it should be in models as the settings are there. Now I have them in models, but I get a invalid syntax error on the last line: def register_new_table_toke

[web2py] Custom registration action

2012-01-03 Thread tsvim
Ok, I changed my code again. Incredible how so many things were though through before. (Multi-tenancy, common_fields, extra_fields in auth, ...) A big thumbs up to all the devs on this. What I'd like to do now is have a custom registration action (not form). I added an extra_field to the auth_us

[web2py] Re: Smartgrid trouble: exceptions KeyError

2011-12-15 Thread tsvim
Ok, after reading up on user_signature, I don't really like to turn it off. If I do turn it off, I'd like at least something that will allow the same for anonymous users. Is there anyway I can generate a user_signature for some anonymous user? Thanks, Tsvi

[web2py] Re: Smartgrid trouble: exceptions KeyError

2011-12-14 Thread tsvim
SOLVED: I forgot to have the define_table statement in the main part, otherwise the table is not defined. I still have trouble as I can'tedit the table. I get a flash response not authorized. I suppose I need to change some setting when calling the smartgrid method.

[web2py] Smartgrid trouble: exceptions KeyError

2011-12-14 Thread tsvim
Ok, getting more experienced here I did some nice cleanup to my code. I managed to get my 100+ line controller to around 30 :-) I decided to generate new tables for every user. Instead of filtering one huge tabe. The forst time I load the page everything seems fine, although I'm missing the add

[web2py] Re: Getting table a to use as default string from field in table b

2011-12-12 Thread tsvim
Ok here's what I want to do. I want a user to be able to create multiple tables of data, with some information about every table. So instead of creating more tables, I figured I'll have one big table of data with a reference to the record in the table_settings database so I can return to the us

[web2py] Re: Getting table a to use as default string from field in table b

2011-12-11 Thread tsvim
db.define_table('table_settings', Field('name','string'), Field('default_value','string')) db.define_table('data', Field('parent_table',db.table_settings,writable=False,readable=False), Field('datetime','datetime',default=request.now

[web2py] Re: Getting table a to use as default string from field in table b

2011-12-11 Thread tsvim
Obviously you're right. I realized later that I needed to re-think what I was trying to do. The id of current user is stored in the data table. Is there a way I can refernce that field in the line you gaveme? Thanks for all your help.

[web2py] Getting table a to use as default string from field in table b

2011-12-10 Thread tsvim
Hi all, I have 1 table with a lot of fields. Some of them, I want to have a default value dependent on the user. In the user table I have a field called default_x. I tried setting the default for field x in the data table to 'user_table.default_x'. Which did not work. Any ideas how to achieve t

Re: [web2py] Ajax and table rows.

2011-11-21 Thread tsvim
Ok, now that this works seems I'm still in trouble. The page I'm loading is one that has a table that I'm trying to make clickable and a form to enter more data. Here is the controller: @auth.requires_login() def budget(): db.expense.parent_table.default = request.args(0) db.expense.categ

[web2py] Re: Ajax and table rows.

2011-11-21 Thread tsvim
Thanks, you guys rock community support.

[web2py] Ajax and table rows.

2011-11-21 Thread tsvim
Hi all, I'm trying to have a ajax callback function whenever I click a certain row. I'd like that row to return the id of the record the row represents. I'm at loss as to the middle argument for the ajax function. I checked the function in the controller gets called but the argument is wrong. I

[web2py] Re: Passing the newly created record's id to another function in the controller

2011-11-13 Thread tsvim
Thanks for the explanation. Taking this explanation I tried forwarding the id of the record to a "onaccept" action using the same logic you applied using "%(id)s" as an argument to the function. Again I seem to be missing something. How can I pass the record's id to the onaccept action? Thanks a

[web2py] Setting the default value for the first item in a list

2011-11-13 Thread tsvim
Hi all, Another quick question: I want to add a user's email by default to a list:string in my db. So I did the following: db.table_settings.members.default = auth.user.email Obviously that didn't work. Sending table_settings to Crud generated a list with each of the elements being 1 character

[web2py] Re: Passing the newly created record's id to another function in the controller

2011-11-13 Thread tsvim
Thanks. That did the trick. I'd like to understand though what special characters? Isn't the id just a number?

[web2py] Passing the newly created record's id to another function in the controller

2011-11-12 Thread tsvim
Hi, In my current project I have a function (a) in the controller which calls Crud to create a new record. After which function (a) sends the user to function (b) using the "next" directive in Crud. I'd like to have function (b) know the id of the record created which sent them over so it could st