perfect it worked I was earlier trying to remove the db definition from
coffee but it used to cause an error  as its should be in alpha numeric
which I was ignoring


On Sat, Dec 14, 2013 at 12:45 PM, Anthony <abasta...@gmail.com> wrote:

> The problem is that you are defining db = DAL(...) in both coffee.py and
> db.py. Because db.py comes after coffee.py, the "db" object defined in
> coffee.py is simply replaced by the one defined in db.py, so none of the
> models in coffee.py will be available to any controller, including the
> appadmin controller.
>
> You should define the "db" object only once, in the first model file that
> runs (model files run in alphanumeric order).
>
> Anthony
>
>
> On Saturday, December 14, 2013 1:35:16 PM UTC-5, deepak sandhu wrote:
>>
>> Its giving me access to models inside db.py but not to models in coffee.py
>> I am attaching screenshots of both coffee.py and appadmin  this might
>> help to clear.
>>
>> inside coffee.py there is just one table
>>
>> On Saturday, December 14, 2013 12:22:11 PM UTC-6, Massimo Di Pierro wrote:
>>>
>>> There is only one app for addpadmin:
>>>
>>> http://127.0.0.1:8000/imageblog/appadmin/
>>>
>>> It should give you access to all the models, including coffee.py
>>>
>>> On Saturday, 14 December 2013 12:01:44 UTC-6, deepak sandhu wrote:
>>>>
>>>> in web2py we I created a new application called imageblog and in models
>>>> on default I have 2 models :
>>>>
>>>>     db.py
>>>>     menu.py
>>>>     coffee.py   #this is new one created by me in models i made some
>>>> tables inside this too
>>>> and if I use the url
>>>>
>>>>     http://127.0.0.1:8000/imageblog/appadmin/
>>>>
>>>> I can see the appadmin of the db.py model but my question is I created
>>>> another model called
>>>> coffee.py how can I open coffee.py in appadmin?
>>>> I tried:
>>>>
>>>>     http://127.0.0.1:8000/imageblog/coffee/appadmin
>>>>
>>>> I get output as : "invalid function (coffee/appadmin)"
>>>> but no luck.
>>>> Is appadmin only available for db.py ???
>>>>
>>>  --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/CrmcJJnDCbc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to