On Sun, 2008-09-28 at 21:25 +0200, Gerard Petersen wrote:
> Russel,
>
> Replies inline ...
>
> > The purpose of admin.autodiscover is to discover all the admin.py
> > files in your project. Each admin.py file will then need to contain
> > the ModelAdmin definitions and site.register() calls req
Russel,
Replies inline ...
> The purpose of admin.autodiscover is to discover all the admin.py
> files in your project. Each admin.py file will then need to contain
> the ModelAdmin definitions and site.register() calls required.
Ok, so the autodiscover is a recursive functionality that gathers
On Sun, Sep 28, 2008 at 4:39 PM, Gerard Petersen <[EMAIL PROTECTED]> wrote:
>
> 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?
No - that is
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 th
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 sto
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.
Regards,
Gerard.
Russell Keith-Magee wrote:
> On Sat, Sep 27, 2
On Sat, Sep 27, 2008 at 3:26 AM, Gerard Petersen <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> When I run my test suite, commands like these 'admin.site.register(Product,
> ProductAdmin)' in models.py break my tests with this error:
>
> django.contrib.admin.sites.AlreadyRegistered: The model Product
Hi all,
When I run my test suite, commands like these 'admin.site.register(Product,
ProductAdmin)' in models.py break my tests with this error:
django.contrib.admin.sites.AlreadyRegistered: The model Product is already
registered
When I (temporarily) remove them the tests run properly.
What
8 matches
Mail list logo