Commit Graph

225 Commits

Author SHA1 Message Date
9781cd656e Add a Language model to core
This lists all ISO-639-2 languages, and can be used in foreign keys
from other models.
2013-01-30 15:13:37 +01:00
53cd5a83f5 Show purge type in list of recent varnish purges 2012-11-30 16:23:54 +09:00
a923f93b17 CSRF verification failure now returns HTTP 403 Forbidden, not 200 OK 2012-11-11 16:07:42 +01:00
6008f93843 Fix small bug in api_varnish_purge error path
HttpServerError is a function that returns HttpResponse, not an
exception.
2012-11-11 16:07:40 +01:00
6ba4f789ed Fix CSRF verification in /admin/mergeorg/ and /admin/purge/
All templates using {% csrf_token %} need to be rendered with a
RequestContext.

This reverts most of commit 58a08f2590

Also permit POST requests to /search/ -- these aren't relevant to the
site itself, but this used to be allowed before.
2012-11-11 13:19:29 +01:00
0a69f0b831 Add specific view for handling CSRF failures
This generates the error in a bit nicer way inside our framework,
instead of throwing the default django error.
2012-11-07 20:57:22 +01:00
58a08f2590 Remove csrf from more views that were broken 2012-11-07 18:43:45 +01:00
ef711553b9 Add (protected) API to queue varnish purge requests
We want an API for this so they end up in the queue with all the other
requests, and get delivered to all our frontends without needing each node
to know about which frontends exist.
2012-10-03 14:19:28 +02:00
33ed40343b Add support for varnish purging based on expressions
Previously we would only purge based on URLs, but some of the upcoming
new work requires arbitrary expression purging.

NOTE! Require the creation of the new SQL procecure in the database,
either from varnish.sql or varnish_local.sql depending on if it's prod
or dev.
2012-10-03 12:48:47 +02:00
1678c93db6 Oops, missed a number of references to publisher :O 2012-06-26 14:59:35 +02:00
7855d1b06c Implement ability for moderators to send notices to organisations
Notices entered will be sent to the organisations email address - so there
needs to be one (if not, the notification field doesn't show up).

Notifications also go in the database, and show up on each object so you
can see the previous history of it, and get emailed to the slaves list.

Finally, it's possible to reject-with-notification, in which case the
notification is sent off to the user and after that the object is deleted.
The notification history stays in the database, but is not linked anywhere
(but can be viewed from the admin interface on that model directly).
Unfortunately, this seems to cause double notifications to the slaves list,
but we'll have to live with that for now.

Closes #137
2012-06-26 14:34:26 +02:00
48d6511186 Fixes in developer install instructions and scripts
Per Josh Kupershmidt
2012-05-23 15:26:33 +02:00
4c40bd2a75 Don't include beta versions in versions.rss 2012-05-15 15:59:39 -04:00
de108bfa7c Allow the use of -1 as minor version to indicate pre-release 2012-05-14 17:05:14 -04:00
c2d330939f Include events that end today in the listing on the frontpage
Make check "greater-than-or-equal" instead of "greater-than".
2012-05-10 13:19:17 +02:00
3442fdde57 Allow all staff users (= admin login users) to purge things from varnish
Previously we required superuser, but that seems a bit excessive. We could
limit it based on specific groups, but for now, we'll allow all staff users.
2012-03-06 10:53:10 +01:00
d3a0bd94dd Allow the use of HTML in form field help texts
Also make the help text show under the field itself for regular fields,
and in the left column only for textarea fields. This makes it possible
to use longer help texts without making things look really bad...
2012-01-20 15:15:02 +01:00
c461f9f0c6 Include support/versioning in search results again! 2012-01-14 17:20:45 +01:00
78ab264578 Include last modified date in sitemap 2012-01-14 16:55:53 +01:00
e4f54e7cb4 Purge supported version list from frontends when changina version object 2012-01-07 13:46:59 +01:00
08b9ac643f Render list of supported versions on the main page
Now that we have more metadata, we can render this on the main page instead of
on the wiki. This commit copies all the text from the current wiki page, and
uses the new fields in the Version model to render the table on the same URL
as the reference was on before.
2012-01-07 13:09:20 +01:00
31fa6e465c Add two fields to the version model, for tracking release dates
This requires the following to be run on all developer installations:

alter table core_version add column "firstreldate" date NOT NULL default current_date;
alter table core_version add column "eoldate" date NOT NULL default current_date;
alter table core_version alter column "firstreldate" drop default;
alter table core_version alter column "eoldate" drop default;
2012-01-07 13:00:23 +01:00
8042d5a8bc Avoid crashing the frontpage when there are zero quotes
This won't happen in production since we don't delete quotes, but it
happens on empty dev environments. It still renders a pretty ugly
frontpage, but it doesn't crash...
2011-12-15 22:14:07 +01:00
a850ad94d2 Fix typo, reported by Cedric 2011-12-05 17:07:59 +01:00
1ea8ecd12a Include docs load timestamp in developer docs
This makes it possible to figure out when the docs were actually
loaded, since developer docs don't carry a version number. This is
actually going to be the docs *load* timestamp, and not build timestamp,
but they should be close enough together that it shouldn't matter.

Fixes #108
2011-12-04 15:14:54 +01:00
f07c0db120 Include list of 20 latest purges in the varnish purging page (in /admin)
It's a way to keep track of what the system is doing, I guess...
2011-12-04 14:54:59 +01:00
22d121f643 Purge related URLs from varnish when a new item is fetched from RSS
Fixes #95
2011-12-04 14:34:52 +01:00
3523989223 Pending page should require staff access, not superuser 2011-12-03 16:49:16 +01:00
e712f987ac Ensure that files we look for in the filesystem are ASCII filenames
We don't have any utf8 or latin1 in the filenames at this point, and
there's no reason to start adding it....

Fixes #111
2011-11-28 18:55:21 +01:00
27fc2a7e3c Migrate ssh keys and store them in a UserProfile table 2011-11-27 14:44:18 +01:00
559721ff51 Don't include version 0.0.0 in RSS feed
(this is used for developer versions of the docs, it's not a real version..)
2011-11-27 12:21:43 +01:00
d604309ea9 Make sure the submitter is always listed as an organisation admin
This fixes organisation submitting again, and also makes it impossible to
orphan oneself from an organisation.
2011-11-15 22:49:48 +01:00
74d8bdd647 Make account editing forms redirect back to list of objects
Instead of like previously, redirect back to the list of object
types.
2011-11-09 22:16:13 +01:00
afa81021b3 Make it possible to add and remove managers from an organisation
(from the general interface, not just from /admin/)
2011-11-09 22:16:12 +01:00
9e710e5456 For multilanguage pages, use english as default language
So we search both for <url>.html, and <url>/en.html. This is consistent
with how we access non-english languages.
2011-11-08 14:40:42 +01:00
70ba99ff01 Fix verbose names 2011-11-07 22:07:08 +01:00
1ab63a3d51 Ensure we always set Content-Length when getting the web_sync_timestamp
This is required by our own automirror scripts...
2011-11-07 16:04:47 +01:00
72977ae59e Must include the leading slash in purges. 2011-11-06 16:12:52 +01:00
223e587479 Version must be a PgModel in order to purge things
And it was already set up to purge things like the front page...
2011-11-06 16:00:19 +01:00
7874abc24d Add a sync_timestamp URL to point automirror at 2011-11-05 18:51:10 +01:00
961359bdab Validate superuser on "hidden" admin views 2011-08-18 10:46:36 +02:00
248d940c7e Implement proper mergeing of organisations 2011-08-18 10:46:25 +02:00
7505a44d4f List supported versions in the admin interface 2011-08-11 15:52:57 +02:00
4ac854a2b0 Only include supported versions on the frontpage 2011-07-12 14:50:23 +01:00
f136a665fe Add concept of supported versions
Also, only index docs for supported versions...
2011-07-12 14:15:20 +01:00
09eb4f1d40 Properly quote URLs in the sitemap 2011-07-12 14:14:18 +01:00
121b336792 Remove print statement that cannot be used when running under a server 2011-06-14 19:51:00 +02: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
079259da7d Fix URLs as generated, and don't index pointless pages 2010-09-29 14:40:28 +02:00
22f5578c29 Add support for generating sitemap.
Each module now contains a struct.py file that will return all
the URLs that it can generate (yes, this is a small break of the
abstraction of url.py, but we've broken that elsewhere as well),
and also which search-engine-weight (0.1-1.0) that this URL should
be given.
2010-09-28 16:12:13 +02:00