On Monday, December 22, 2014 7:51:58 PM UTC-8, Collin Anderson wrote:
>
> Hi,
>
> The model name is hidden in model.__name__ or model._meta.model_name, and
> you can't access attributes starting with underscore in templates.
>
> This might work:
>
> from django.db.models import get_app, get_model
Hi,
The model name is hidden in model.__name__ or model._meta.model_name, and
you can't access attributes starting with underscore in templates.
This might work:
from django.db.models import get_app, get_models
def index(request):
app = get_app('sampledb')
modeldict = {model._meta.mod
Have you enabled admindocs?
Might be the solution you are looking for.
Connected by Motorola
llanitedave wrote:
>I'm trying to display a list of the models in my app on a web page, similar to
>the way the Django Admin does it. I'm not sure where the admin section is
>coded, which might be
3 matches
Mail list logo