On Oct 5, 7:12 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> Arnaud Delobelle wrote:
> > Hi Django users,
>
> > I have a project made of several app and I am adding a 'search' app
> > which provides searching facilities across all apps.  Each app whose
> > content can be searched needs to register with the search app with
> > code such as:
>
> > def search_genf(request, search_terms):
> >     # generate weighed results
>
> > from project.search import register
> > register('Category name', search_genf)
>
> > My question is: how should I make an app register?
[...]
> > What, in your opinion, would be a good way to go about doing this?
>
> You might want to look at the code for admin.autodiscover(), which scans
> the various apps for an admin model. You could do something similar for
> your search functionality. It's doing pretty much what you already do,
> though.

I'll have a look there, thanks.

--
Arnaud


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to