Skip to content

Commit 99438d9

Browse files
authored
Merge pull request #829 from gpodder/ft/archive-old
inactive user data archival
2 parents 527f283 + 8916b52 commit 99438d9

32 files changed

Lines changed: 868 additions & 181 deletions

.github/workflows/pr-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on: [pull_request, workflow_dispatch]
55
jobs:
66
build:
77

8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-24.04
99
strategy:
1010
matrix:
11-
python-version: [3.8]
11+
python-version: [3.12]
1212
env:
1313
POSTGRES_DB: mygpo
1414
POSTGRES_PASSWORD: mygpo

.travis.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

doc/dev/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Or:
3535
.. code-block:: bash
3636
3737
sudo apt-get install libpq-dev libjpeg-dev zlib1g-dev libwebp-dev \
38-
build-essential python3-dev virtualenv libffi-dev redis postgresql
38+
build-essential python3-dev virtualenv libffi-dev redis postgresql python3-pip
3939
4040
4141
Now install additional dependencies locally:

makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ install-deps:
3939
gettext
4040

4141
format-code:
42-
black --target-version py38 --skip-string-normalization mygpo/
42+
black --target-version py312 --skip-string-normalization mygpo/
4343

4444
check-code-format:
45-
black --check --target-version py38 --skip-string-normalization mygpo/
45+
black --check --target-version py312 --skip-string-normalization mygpo/
4646

4747

4848
.PHONY: all help test clean unittest coverage install-deps format-code

mygpo/administration/views.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,21 @@ def post(self, request):
363363
return HttpResponseRedirect(reverse("admin-resend-activation"))
364364

365365
if user.is_active:
366-
messages.success(request, "User {username} is already activated")
367-
366+
messages.success(
367+
request,
368+
_("User {username} is already activated").format(username=username),
369+
)
370+
elif user.profile.archived_date is not None:
371+
messages.error(
372+
self.request,
373+
_("User {username} data has been archived.").format(username=username),
374+
)
368375
else:
369376
send_activation_email(user, request)
370377
messages.success(
371378
request,
372-
_(
373-
"Email for {username} ({email}) resent".format(
374-
username=user.username, email=user.email
375-
)
379+
_("Email for {username} ({email}) resent").format(
380+
username=user.username, email=user.email
376381
),
377382
)
378383

mygpo/api/advanced/directory.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,12 @@ def episode_data(episode, domain, podcast=None):
179179
"podcast_url": podcast.url if podcast else "",
180180
"description": episode.description,
181181
"website": episode.link,
182-
"mygpo_link": "http://%(domain)s%(res)s"
183-
% dict(domain=domain, res=get_episode_link_target(episode, podcast))
184-
if podcast
185-
else "",
182+
"mygpo_link": (
183+
"http://%(domain)s%(res)s"
184+
% dict(domain=domain, res=get_episode_link_target(episode, podcast))
185+
if podcast
186+
else ""
187+
),
186188
}
187189

188190
if episode.released:

mygpo/core/models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
""" This module contains abstract models that are used in multiple apps """
2-
1+
"""This module contains abstract models that are used in multiple apps"""
32

43
from django.db import models, connection
54

mygpo/publisher/models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
""" This module contains models for the publisher pages """
2-
1+
"""This module contains models for the publisher pages"""
32

43
from django.db import models
54
from django.conf import settings

mygpo/publisher/templates/publisher/advertise.html

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,4 @@ <h2>{% trans "Example Podcasts" %}</h2>
2828
<h2>{% trans "Visitors" %}</h2>
2929
<p>{% blocktrans %}Both the front page and the list of example podcasts are accessed by more than 1000 people daily, who are actively looking for interesting podcasts. We do, however, not guarantee a certain number of visitors during your advertisement period.{% endblocktrans %}</p>
3030

31-
<h2>{% trans "Start your Advertisement" %}</h2>
32-
<p>{% blocktrans with site as sitename %}Contact <a href="mailto:stefan@gpodder.net">stefan@gpodder.net</a> if you would like to advertise on {{ sitename }} or if you have any questions.{% endblocktrans %}</p>
33-
34-
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
35-
<input type="hidden" name="cmd" value="_s-xclick">
36-
<input type="hidden" name="hosted_button_id" value="QZUSX4U6SDNB2">
37-
<input type="image"
38-
src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0"
39-
name="submit" alt="PayPal - The safer, easier way to pay online!">
40-
<img alt="" border="0"
41-
src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1">
42-
</form>
43-
4431
{% endblock %}
45-

mygpo/search/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Contains code for searching podcasts
1+
"""Contains code for searching podcasts
22
33
Uses django.contrib.postgres.search for searching. See docs at
44
https://docs.djangoproject.com/en/1.11/ref/contrib/postgres/search/

0 commit comments

Comments
 (0)