44 Commits

Author SHA1 Message Date
291919a69b Add some more fixtures based on current data
This includes most models that just contain "metadata" as well as the
complete feature matrix (because it's useful).

Also add a script to refresh the contents of the fixtures. Still has to
be run manually, but mayeb it helps us keep it slightly more up to date.
2021-05-04 12:39:31 +02:00
4f1bf70ea0 Remove unused imports 2020-07-13 14:53:07 +02:00
5c838c57ea Fix up some incorrect imports 2020-07-04 15:52:36 +02:00
46606e5284 Set on_delete=models.CASCADE on all ForeignKey fields
This is the bardware compatible value that will be needed once we
upgrade django later.
2020-03-31 22:34:51 +02:00
c6c0bf1948 Update print and input syntax for python 3 2019-01-26 16:19:26 +01:00
a156829375 Generic unicode updates 2019-01-26 16:19:26 +01:00
7547b6f766 Update syntax for relative imports 2019-01-26 16:19:26 +01:00
0883ac6423 Fix whitespace and indentation, per pep8 2019-01-17 20:47:43 +01:00
87237f6536 Tabs, meet your new overlords: spaces
In a quest to reach pep8, use spaces to indent rather than tabs.
2019-01-17 15:35:39 +01:00
0c6099e236 Remove unused imports 2018-06-29 13:40:04 +02:00
aea6cc82a2 Only report "updated list n" if it's actually updated 2018-03-21 14:40:24 +01:00
d48c7b3406 Remove stupid debugging code left behind 2018-03-21 14:28:56 +01:00
f4b7d00503 Add tool to sync list information from archives server
pgweb is no longer the master of this information, so add a tool to make
it sync it from the archives server.

Any changes made locally will be overwritten by this tool except the
sortkey field on groups which is local. For now.
2018-03-21 14:18:42 +01:00
26fcd668e2 Remove externallink field from Mailinglist model
This is not used for anything...
2018-03-21 14:16:17 +01:00
6714054c48 Remove temporary API used during pglister migration 2018-03-21 13:16:43 +01:00
fd37389a3b Replace NavContext and render_to_response with render_pgweb
render_to_response does not work on newer django, so it needs to be
replaced. And using a speicfic context actually overcomplicates things,
it's easier to just use a wrapper function. For those cases where we
don't need NavContext, just use render() (the new shortcut function from
django), which also removes the need to use RequestContext.
2018-03-10 10:38:11 -05:00
d0aa8ac119 Remove majordomo2 subscription form
Replace it with a redirect to lists.postgresql.org, where pglister lives.
2018-01-23 21:20:19 +01:00
2f52c4f7c4 Clean up whitespace in primary Python / HTML files
Clean up the whitespace in the primary Python / HTML files in
order to make it easier to apply changes going forward.
2017-11-29 08:21:35 -05:00
cfcb543478 Make mailinglist name unique in the database
This should have been the case from the beginning, there are many things
that would break if this was not followed.
2017-07-08 21:31:12 +02:00
20a0e178c5 Add simple API endpoint to activate and deactivate a list
Access is restricted by IP for the list server. Once the migration is
done, we should probably remove the endpoint again.
2017-07-03 15:35:55 +01:00
7053f08d0a Add information about pglister migration to subscription pages 2017-06-22 21:15:17 +02:00
8b76bdd84a Remove support for nomail and digest on new subscriptions
A step towards simplification as this moves to a legacy section
2017-06-22 20:30:51 +02:00
a8500c3853 Add migrations for all existing models
When migrating on existing installations, run the

python manage.py migrate --fake-initial

command.
2016-05-14 19:49:12 +02:00
da812e682b mimetype is now called content_type 2016-05-14 19:49:12 +02:00
8058accee0 Get rid of PgModel, replacing it with simple signals
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.
2016-03-07 21:41:45 +01:00
51c10ee9df Replace simpljson imports with json
This has been in standard python since 2.6, and we don't really care
about supporting anything older than that (even our old and soon to
be upgraded environments use 2.7)
2015-12-12 17:44:22 +01:00
1ef4b58872 Fix how the mailinglist subscription form handles parameters
This was plain broken for things like nomail and digest, but even with
the right syntax it probably did not work right together with the fact
that we require confirmation for subscriptions.

Issue spotted by Amir Rohan, fix suggested by Alvaro Herrera, (broken) code by me
2015-10-03 13:02:44 +02:00
fa3bc9b2ad Add a link to the archives policy. 2014-07-18 16:29:40 +01:00
5ace77f1d9 avoid creating a header field with a completely empty value, should
reduce the chance that SA is getting confused on it
2014-02-28 20:53:31 +01:00
8f0b7e6b50 Switch email sending go through a queue table in the database
Import the code from the PostgreSQL Europe website to handle this, since it's
well proven by now.

Any points that send email now just write them to the database using the
functions in queuedmail.util. This means we can now submit notification
emails and such things within transactions and have them properly roll bcak
if something goes wrong (so no more incorrect notifications when there is
a database error).

These emails are picked up by a cronjob that runs frequently (typically
once per minute or once every 2 minutes) that submits them to the local
mailserver. By doing it out of line, this gives us a much better way of
dealing with cases where mail delivery is really slow.

The submission from the cronjob is now done with smtp to localhost instead
of opening a pipe to the sendmail command - though this should have no
major effects on anything.

This also removes the setting SUPPRESS_NOTIFICATIONS, as no notifications
are actually ever sent unless the cronjob is run. On development systems
they will just go into the queuedmail table, and can be deleted from there.
2014-01-11 12:33:06 +01:00
94e3b79dce Replace wildcard imports with explicit ones 2014-01-01 16:33:52 +01:00
756aa6ffbe Clean up imports
Remove unused imports and some other completely unused code.
2014-01-01 15:42:30 +01:00
8e317528ee Replace /community/lists/ page with a redirect to /list/
This new page is served from the archives backend, and has been enhanced
to contain the combination of the contents of both pages.
2013-09-14 14:13:20 +02:00
bfd7911aa6 Make it possible to pre-select a mailinglist in the subcription form
This is done by putting #<id> at the end of the URL.
2013-06-20 17:12:43 +02:00
20c18846b8 Make the mailinglist subscription form csrf exempt, so it works again 2012-11-11 16:12:09 +01:00
0cb1a64836 Include listgroup sortkey in the JSON API 2012-07-11 18:05:28 +02:00
62983855ba Export list information as json
This makes it easier to sync information about which lists we have,
and how they are grouped, to external sites (such as the search crawler)
2012-01-21 14:50:01 +01:00
efbe9fc843 Add property to return the negative id of a listgroup
This is used so we can reference the group as a negative id number from
a template, which is the standard way we separate it from lists when
included in the same dropdowns.
2011-12-03 12:58:57 +01:00
5bcbf1253e All purge_urls must be rooted, since we add ^ at the beginning 2011-11-27 13:31:20 +01:00
76d7be576c Set proper title on list subscription form. 2011-11-07 21:47:37 +01: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
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
77a5690dc8 Add handling of mailinglist subscription 2009-12-28 18:57:01 +01: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