Age | Commit message (Collapse) | Author |
|
This presents the redirection in a legible format, instead of
having to click into each list item to figure out what it is.
|
|
Interestingly enough, this showed up because the migration was out of
sync. Normally this means the migration has not been updated, but in
this case it appears the migration is correct and the actual model is
incorrect. Yet both the model and the migraiton were introduced in
commit e2120f0a.
|
|
The web documentation used to suffer from a problem that if a
documentation page were renamed in a newer version, any references
pointing to said documentation would be lost. For example, the feature
known as "Default Roles" was renamed to "Privileged Roles" but caused
a change in the URL.
This patch introduces the ability to create a "DocPageRedirect" by
specifying the previous name of the documentation page (e.g.
"default-roles.html") and the new name (e.g. "privileged-roles.html")
such that the continuity is preserved between versions.
|
|
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.
|
|
|
|
This allows us to say that "app-pgreceivexlog.html" is actually the same
as "app-pgreceivewal.html" on a different version.
Turns out the templates would already render this correctly if we could
just find the map, so it's a simple case of adding an additional join
(that the django orm can't figure out, but we can do it in manual sql).
Adds a non-django managed unique index to make sure that it's not
possible to add the same alias twice in different "directions".
Violating this will cause a django excpetion in the admin interface
since it doesn't know about it, but as this is a very uncommon operation
and admin only, we don't care about that.
Finally, we don't bother issuing varnish purges for changes here, the
admin is expected to handle those manually. These changes are supposed
to happen very seldom, and the contents are purged automatically when
the docs are loaded anyway.
|
|
This property returns a single digit numbers for versions 10 and up (10,
11 etc), and keeps the two digit number for earlier (9.0, 9.1 etc).
|
|
Per discussion from a long time ago, interactive docs aren't really
working out. The majority of submissions are either support questions
(which then get rejected because they cannot be answered in this
context) or pointing out docs incorrectnesses (which should be submitted
as a docs bug instead, so they can actually be fixed in the main
documentation).
Old references to /interactive/ will get redirected to /static/
automatically, and we expect to keep doing that for a long time (since
there are many links to them around the net).
|
|
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.
|
|
This was originally not done because we had a lot of old legacy data
that didn't have entries in both tables. This is no longer the case,
and the docloads script already enforced that it couldn't happen again.
Requires SQL:
ALTER TABLE core_version ADD CONSTRAINT version_unique_tree UNIQUE(tree);
ALTER TABLE docs ADD CONSTRAINT docs_version_fkey FOREIGN KEY (version) REFERENCES core_version(tree);
|
|
Main patch from Marti Raudsepp, but with some fairly extensive changes
|
|
|
|
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.
|
|
|
|
|
|
Contains basic functionality, and an import of most of the static content
from the old site.
There is still plenty more to do...
|