Russell,
Is it correct to say that the admin.autodiscover statement should register the
models in 'myapp', and therefore I don't need the individual
admin.site.register statement for each model?
Without the register statements I don't see the group of models (for myapp) and
myapp itself in the main admin gui. With the register statements (originally)
in models.py (and the autodiscover disabled) the command "manage.py test myapp"
complains about the models already being registered.
Below some snippets of possible influence. Since I don't know where to look I
did no paste to much yet.
## taken from settings.py
#(it contains no import statements)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.admindocs',
'djapp.myapp',
)
I have a admin dir. in the templates dir. that contain almost unmodified copies
of admin's index.html and base_site.html.
## A snippet from admin template index.html
{% for app in app_list %}
<div class="module">
-- snip--
{% for model in app.models %}
It safe to say the app_list contains nothing.
Thanx a lot for your effort.
Regards,
Gerard.
Russell Keith-Magee wrote:
> On Sat, Sep 27, 2008 at 9:54 PM, Gerard Petersen <[EMAIL PROTECTED]> wrote:
>> Russel,
>>
>> The example from the docs somehow doesn't work. I've turned on the
>> autodiscover but under admin it stays empty. I don't know if this is
>> related, but putting the register statements in urls.py does stop breaking
>> my tests.
>
> You're going to have to help me out here. "The example from the docs"
> works fine for me - that's why it's in the docs. If you're not seeing
> models registered in the admin, I'm going to guess you're doing
> something wrong, but without an example, its impossible to tell what.
> Which docs? Can you provide a simple example (not just a dump of your
> full application)?
>
> Yours,
> Russ Magee %-)
>
> >
--
urls = { 'fun': 'www.zonderbroodje.nl', 'tech': 'www.gp-net.nl' }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---