On Apr 10, 1:27 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Fri, Apr 10, 2009 at 2:24 PM, Joe Sr. <joeleg...@gmail.com> wrote:
>
> > I have been using this little trick to get a list of all my model
> > classes that are subclasses of Component:
>
> > component_list = []
>
> > for k in django.contrib.admin.site._registry:
> >    if issubclass(k, Component):
> >        component_list.append(k)
>
> > It works splendidly under the development server or using the shell
> > under manage.py.  However, under an apache server with mod_python, it
> > doesn't work.  I only get 2 of my classes out of about 12.
>
> > Does admin.site.register() function differently under mod_python?
>
> > The apache2 error_log only had something about "server reached
> > MaxClients setting, consider raising the MaxClients setting."
>
> Where exactly do you have this code?  The issue is that this code might be
> getting excecuted before all your applications have been added to the admin.
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your right to
> say it." --Voltaire
> "The people's good is the highest law."--Cicero

That's a good idea I will check on, but it wouldn't explain why it
works with the development server and not mod_python.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to