This is because in the file models/db.py variable 'db' is defined first 
time in row 20:
if not request.env.web2py_runtime_gae:
    ## if NOT running on Google App Engine use SQLite or other DB
    db = DAL(myconf.take('db.uri'), pool_size=myconf.take('db.pool_size', 
cast=int), check_reserved=['all'])

and then we add to the end of this file code from the Manual:
db = DAL("sqlite://storage.sqlite")
db.define_table('image',
   Field('title', unique=True),
   Field('file', 'upload'),
   format = '%(title)s')
...
And by the way column name 'file' from the Manual code raises error because 
'file' is reserved word if 'check_reserved=['all']' is activated.




On Friday, October 19, 2012 at 2:24:09 AM UTC+3, Massimo Di Pierro wrote:
>
> I think you simply had some additional model files that override the db 
> variable.
>
> On Thursday, 18 October 2012 14:36:15 UTC-5, mikech wrote:
>>
>> I uninstalled the images app and reinstalled it using the wizard rather 
>> than the new simple app option.  The auth tables show up now.
>> So, it depends on how the app is setup
>> Mike
>>
>> On Thursday, October 18, 2012 10:59:02 AM UTC-7, Massimo Di Pierro wrote:
>>>
>>> Is it possible you have two db = DAL(...) in your code (perhaps in 
>>> different model files)?
>>>
>>> On Thursday, 18 October 2012 12:36:00 UTC-5, mikech wrote:
>>>>
>>>> Hi Bill don't want to take up much of your time.  I've verified that 
>>>> the auth_* tables are defined using a sqllite2009 pro.  I've included a 
>>>> screen shot attached.  And I've also included a screenshot of the appadmin 
>>>> page which shows just 2 files image and comment.   This is consistent with 
>>>> the image in the book by the way. 
>>>>
>>>>
>>>>
>>>> On Thursday, October 18, 2012 9:21:39 AM UTC-7, mikech wrote:
>>>>>
>>>>> Thanks Bill.
>>>>> What I'm trying to find out is how do I access the tables involved 
>>>>> with security.  Do I need to create views, or is there already some 
>>>>> associated with the appadmin?
>>>>>
>>>>> On Wednesday, October 17, 2012 7:55:02 PM UTC-7, Bill Thayer wrote:
>>>>>>
>>>>>> Try this:
>>>>>> In db.py:
>>>>>> from gluon.tools import Auth, Crud, Service, PluginManager, 
>>>>>> prettydate
>>>>>> auth = Auth(db)
>>>>>> crud, service, plugins = Crud(db), Service(), PluginManager()
>>>>>>
>>>>>> auth.define_tables(username=True) # arg makes it so you can use a 
>>>>>> username instead of email to login
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wednesday, October 17, 2012 6:20:48 PM UTC-5, mikech wrote:
>>>>>>>
>>>>>>> I'm working thru the book again, and when I get to the image 
>>>>>>> tutorial it mentions adding a manager group to the auth tables in 
>>>>>>> appadmin: 
>>>>>>>
>>>>>>> "Using appadmin create a group "manager" and make some users 
>>>>>>> members of the group. They will not be able to access"  
>>>>>>>
>>>>>>> I cannot find where this is, when I bring up the appadmin it just 
>>>>>>> shows the two tables of the application - image and comment.
>>>>>>>
>>>>>>

-- 
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 are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to