The way I see it is that your comment notification is not tied to any  
particular application that has commentable models but instead is more  
like a project related thing. So depending on your source layout, I'd  
put them somewhere in the project. Basically this relates to the  
application reuse topic -- when you connect the handler to the comment  
signal, is it something you want to reuse in the future or it's just a  
one time thing for the current project?

Erik

On 28.09.2008, at 14:58, Benjamin Buch wrote:

> Hi,
>
> I'm using the new comments framework, and I'd like to get notified  
> by mail when someone posts a comment.
> How to di it I think I know, but I'm not quite sure where the code  
> should live.
> The website has several kinds of entries where users can comment on,  
> so it would feel a little odd to put the comments' signal-code in  
> just one models.py.
> As I have even more signals, I thought it would be great to have a  
> file signals.py, where all signal handling is done.
>
> But where should signals.py live?
> Documentation says to signals:
> "Where should this code live?
> You can put signal handling and registration code anywhere you like.  
> However, you'll need to make sure that the module it's in gets  
> imported early on so that the signal handling gets registered before  
> any signals need to be sent. This makes your app's models.py a good  
> place to put registration of signal handlers."
> What means "the module it's in gets imported early"?
> I suppose it's not enough to put my signals.py right there in my  
> projects' root folder?
> -benjamin
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
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