True, I was just hoping there was a way DAL could use an "alias" for the
field name so we could do db.table.password but the Field() would actually
reference the "pass" field in the table. Seems like an odd corner case that
I'll have to work around with using executesql instead of full DAL
abstraction for now.
On Saturday, December 15, 2012 7:30:36 AM UTC-8, Massimo Di Pierro wrote:
>
> pass is a python keyword. You would would not be able to do db.table.pass:
>
> >>> class A(object): pass
> ...
> >>> a=A()
> >>> a.pass
> File "<stdin>", line 1
> a.pass
> ^
> SyntaxError: invalid syntax
>
>
>
> On Saturday, 15 December 2012 08:51:28 UTC-6, Kurt Grutzmacher wrote:
>>
>> Ok.
>>
>> I want to utilize DAL to read data from a database, build forms, grid,
>> tables, etc. One of the tables looks like this:
>>
>> db.define_table('credentials',
>> Field('id', type='id'),
>> Field('user', type='string'),
>> Field('pass', type='string'),
>> )
>>
>> The 'pass' field does not pass the REGEX_PYTHON_KEYWORDS match on line
>> 8548 of dal.py.
>>
>>
>> On Saturday, December 15, 2012 6:09:21 AM UTC-8, Niphlod wrote:
>>>
>>> tell us more about what you're trying to do, and the model, also if
>>> throws errors, that are you willing to use....
>>>
>>> On Saturday, December 15, 2012 3:23:23 AM UTC+1, Kurt Grutzmacher wrote:
>>>>
>>>> I need to access a static third-party data source that uses some Python
>>>> keywords in the Field name. This obviously is not good and dal.py syntax
>>>> errors when loading the app.
>>>>
>>>> Any way I can work around this?
>>>>
>>>>
>>>>
>>>>
--