Age | Commit message (Collapse) | Author |
|
This is the bardware compatible value that will be needed once we
upgrade django later.
|
|
|
|
|
|
|
|
In a quest to reach pep8, use spaces to indent rather than tabs.
|
|
Review by Stephen Frost and Jonathan S. Katz
Discussion: https://postgr.es/m/6EEB2B47-D274-4E65-83B1-2EF8C917C55F%40yesql.se
|
|
Clean up the whitespace in the primary Python / HTML files in
order to make it easier to apply changes going forward.
|
|
Without this only the survey result page is purged, not the actual
survey form on the main page.
|
|
1. ForeignKey with unique -> OneToOneField
2. IPAddressField -> GenericIPAddressField
3. Fix fields with default=datetime.now() which gives server start time,
not the insert time (clearly this default was never used, and the
field was always explicitly set, but it should still not be incorrectly
defined)
|
|
We were already using signals for everything except delete, and even
in our old version of django the delete signal exists (it didn't exist
when this code was first written).
Django doesn't really like models to be OOP like this, so keeping PgModel
would cause issues with upcoming changes in django 1.8. Using simple functions
is easier, and the actual functionality is replicated straight off.
|
|
Remove unused imports and some other completely unused code.
|
|
|
|
In passing, make answers up to 500 characters, because that's required
to perform the migration of existing ones...
|
|
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.
|
|
|