Commit Graph

11 Commits

Author SHA1 Message Date
bd539a392e Fix creation of new objects with notifications that have ManyToMany relationships
This broke in django 1.4 since it fires based on the contents of an error message,
and the message changed. Most visible due to the fact that it completely broke
creation of new organsation objects.
2013-06-20 12:29:27 +02:00
d704962f41 Send notification emails on deletes
There are no signals for them, but it appears to work to just override
the delete() method in PgModel.

Fixes #121
2011-12-20 13:56:53 +01:00
125f023404 Stops sending M2M updates from PgModel objects upon every single update
Prevents changes from M2M updates from appearing after every single
save to a PgModel derived class. The unfortunate side effect is that
no M2M updates will appear, but this has to do with the context in how
the diff between two objects it taking place.  An expanded note appears in
the explanation to #110

Fixes #110
2011-12-17 18:29:13 -05:00
2d8849272a Create prettier text for many-to-many fields in mail notifications
Creates prettier text for many-to-many fields for mail notifications by detecting if such a field is of a many-to-many type, and if so, joins the list together based on the related object's default unicode representation

    Fixes #110

    removed extra line of commented code
2011-11-29 13:06:38 -05:00
f92709d2a6 Implement basic varnish purging
This allows all models inherited from PgModel to specify which
URLs to purge by either setting a field or defining a function
called purge_urls, at which point they will be purged whenever
the save signal is fired.

Also implements a form under /admin/purge/ that allows for manual
purging. This should probably be extended in the future to show
the status of the pgq slaves, but that will come later.

Includes a SQL function that posts the expires to a pgq queue. For
a local deployment, this can be replaced with a simple void function
to turn off varnish purging.
2011-06-14 19:48:48 +02:00
d2d359776b Make it possible to add new organisations again - they need to be tagged
with the logged in user as the first manager, or they become orphans before
they're even created...
2010-02-26 12:53:26 +01:00
770ef1689e Break out sendmail() to a separate function, so we can use it from
more places.
2009-12-28 18:52:35 +01:00
ffd7084fe5 Exclude fields from notification emails if they are foreign keys pointing
to this object, since their data is not available.
2009-12-28 14:17:16 +01:00
bff6f3e379 Generate and send proper MIME messages with notifications. If
SUPPRESS_NOTIFICATIONS is set, instead print them to the server
output pipe instead (only to be used in development server, obviously).
2009-09-18 16:52:57 +02:00
1e1955a588 Add URLs to all modified fields in the notification message. 2009-09-18 16:32:15 +02:00
90b758c247 A first very basic import.
Contains basic functionality, and an import of most of the static content
from the old site.

There is still plenty more to do...
2009-09-14 14:39:25 +02:00