Skip to content

Commit 6e67718

Browse files
committed
feat: deprecate mezzanine.twitter
1 parent 95ecb0d commit 6e67718

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

docs/twitter-integration.rst

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Twitter Integration
33
===================
44

5+
.. deprecated:: 5.0
6+
:mod:`mezzanine.twitter` has been deprecated and will be removed in a
7+
future version.
8+
59
The :mod:`mezzanine.twitter` application exposes the ability to consume,
610
store, and display your own tweets on your site in an efficient manner,
711
as well as the ability to send tweets when publishing new content to

mezzanine/project_template/project_name/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
"mezzanine.blog",
239239
"mezzanine.forms",
240240
"mezzanine.galleries",
241-
"mezzanine.twitter",
241+
# "mezzanine.twitter",
242242
# 'mezzanine.accounts',
243243
]
244244

mezzanine/twitter/apps.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from django.apps import AppConfig
2+
3+
4+
class TwitterConfig(AppConfig):
5+
6+
name = "mezzanine.twitter"
7+
8+
def ready(self):
9+
from . import checks # noqa

mezzanine/twitter/checks.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from django.core.checks import Warning, register
2+
3+
from mezzanine.conf import settings
4+
5+
TWITTER_DEPRECATED = Warning(
6+
"'mezzanine.twitter' is deprecated and will be removed in a future version",
7+
id="mezzanine.twitter.W001",
8+
)
9+
10+
11+
@register()
12+
def check_twitter(app_configs, **kwargs):
13+
issues = []
14+
15+
if "mezzanine.twitter" in settings.INSTALLED_APPS:
16+
issues.append(TWITTER_DEPRECATED)
17+
18+
return issues

0 commit comments

Comments
 (0)