mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-06 09:57:57 +00:00
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.
This commit is contained in:
@ -108,6 +108,7 @@ urlpatterns = patterns('',
|
||||
|
||||
# Override some URLs in admin, to provide our own pages
|
||||
(r'^admin/pending/$', 'pgweb.core.views.admin_pending'),
|
||||
(r'^admin/purge/$', 'pgweb.core.views.admin_purge'),
|
||||
# Uncomment the next line to enable the admin:
|
||||
(r'^admin/(.*)', admin.site.root),
|
||||
|
||||
|
Reference in New Issue
Block a user