As i said before... somewhere in one of your model files you re-define the 
variable db as a string.

On Wednesday, 28 November 2012 05:32:30 UTC-6, BlueShadow wrote:
>
> If I do that I get the following:
> <DAL uri="sqlite://storage.sqlite">
> in the console.
> and I can open all other sites which are in the default controler. and 
> those use the Article table quite frequently.
>
> On Monday, November 19, 2012 2:07:05 PM UTC+1, Massimo Di Pierro wrote:
>>
>> Somewhere you are redefining db to be a string. Try print db at the top 
>> od your controller.
>>
>> On Monday, 19 November 2012 04:44:39 UTC-6, BlueShadow wrote:
>>>
>>> Hi,
>>> I got a big problem I can't use the databaseadministration of my website 
>>> anymore. I cecked previous versions and two versions ago it works without a 
>>> problem. The funny thing is the db.py files are exactly the same I changed 
>>> nothing in the database mainly in views but I would hate to work from my 
>>> old version and change it all over again to find the error.
>>> Thats the error message:
>>>
>>> Traceback (most recent call last):
>>>   File "F:\Website\web2py\gluon\restricted.py", line 212, in restricted
>>>     exec ccode in environment
>>>   File "F:/Website/web2py/applications/1101/views/appadmin.html" 
>>> <http://127.0.0.1:8000/admin/default/edit/1101/views/appadmin.html>, line 
>>> 450, in <module>
>>> AttributeError: 'str' object has no attribute 'Article'
>>>
>>> Arows=db(db.Article).select(orderby=~db.Article.Submitted, limitby=(0,3))
>>>
>>>
>>> but I didn't change anything in appadmin ristricted or the database. And 
>>> the line in question is ordering something by a date not a str. Is there 
>>> any quick fix?
>>>
>>

-- 



Reply via email to