django-cms-qe 3.6.2__py3-none-any.whl → 3.7.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cms_qe/settings/base/constants.py +11 -0
- cms_qe/urls.py +2 -0
- cms_qe/views/redirect_to_page.py +23 -0
- {django_cms_qe-3.6.2.dist-info → django_cms_qe-3.7.1.dist-info}/METADATA +1 -1
- {django_cms_qe-3.6.2.dist-info → django_cms_qe-3.7.1.dist-info}/RECORD +8 -7
- {django_cms_qe-3.6.2.dist-info → django_cms_qe-3.7.1.dist-info}/WHEEL +1 -1
- {django_cms_qe-3.6.2.dist-info → django_cms_qe-3.7.1.dist-info}/licenses/LICENSE +0 -0
- {django_cms_qe-3.6.2.dist-info → django_cms_qe-3.7.1.dist-info}/top_level.txt +0 -0
|
@@ -139,6 +139,14 @@ MAILCHIMP_CONSTANCE_CONFIG = (
|
|
|
139
139
|
)),
|
|
140
140
|
)
|
|
141
141
|
|
|
142
|
+
REDIRECT_TO_PAGE = (
|
|
143
|
+
('REDIRECT_TO_PAGE', (
|
|
144
|
+
'',
|
|
145
|
+
mark_safe('<div>Redirect to page from path <code>/redirect-to-page/</code>.</div>'
|
|
146
|
+
'<div>Example: <pre>/path/one/\n/path/two/ localhost:8000</pre></div>'),
|
|
147
|
+
)),
|
|
148
|
+
)
|
|
149
|
+
|
|
142
150
|
# The content ready for .well-known/security.txt
|
|
143
151
|
SECURITY_TXT_CONTENT = None # "Contact: mailto:abuse@nic.cz"
|
|
144
152
|
|
|
@@ -156,12 +164,14 @@ SECURITY_TXT_CONFIG = (
|
|
|
156
164
|
]),
|
|
157
165
|
)
|
|
158
166
|
|
|
167
|
+
|
|
159
168
|
CONSTANCE_CONFIG = OrderedDict(
|
|
160
169
|
GOOGLE_ANALYTICS_CONSTANCE_CONFIG + # type: ignore
|
|
161
170
|
GOOGLE_TAG_MANAGER_CONSTANCE_CONFIG + # type: ignore
|
|
162
171
|
PIWIK_CONSTANCE_CONFIG + # type: ignore
|
|
163
172
|
DJANGOCMS_GOOGLEMAP_CONSTANCE_CONFIG + # type: ignore
|
|
164
173
|
MAILCHIMP_CONSTANCE_CONFIG + # type: ignore
|
|
174
|
+
REDIRECT_TO_PAGE + # type: ignore
|
|
165
175
|
SECURITY_TXT_CONFIG # type: ignore
|
|
166
176
|
)
|
|
167
177
|
|
|
@@ -171,6 +181,7 @@ CONSTANCE_CONFIG_FIELDSETS = {
|
|
|
171
181
|
'Google tag manager options': dict(GOOGLE_TAG_MANAGER_CONSTANCE_CONFIG).keys(),
|
|
172
182
|
'Piwik options': dict(PIWIK_CONSTANCE_CONFIG).keys(),
|
|
173
183
|
'Mailchimp options': dict(MAILCHIMP_CONSTANCE_CONFIG).keys(),
|
|
184
|
+
'Redirect to page': dict(REDIRECT_TO_PAGE).keys(),
|
|
174
185
|
'Security.txt': dict(SECURITY_TXT_CONFIG).keys(),
|
|
175
186
|
}
|
|
176
187
|
|
cms_qe/urls.py
CHANGED
|
@@ -14,6 +14,7 @@ from django.urls import include, path
|
|
|
14
14
|
from django.views.i18n import JavaScriptCatalog
|
|
15
15
|
|
|
16
16
|
from cms_qe.views.maintenance import HealthCheckView, ReloadSiteView
|
|
17
|
+
from cms_qe.views.redirect_to_page import RedirectToPage
|
|
17
18
|
from cms_qe.views.search_result import SiteSearchView
|
|
18
19
|
from cms_qe.views.security import SecurityTxtView
|
|
19
20
|
|
|
@@ -45,6 +46,7 @@ urlpatterns = [
|
|
|
45
46
|
path('site-search-result/', SiteSearchView.as_view(), name='site-search-result'),
|
|
46
47
|
path("healthcheck/", HealthCheckView.as_view(), name='healthcheck'), # Used by uwsgi in docker.
|
|
47
48
|
path("superuser/reload-site/", ReloadSiteView.as_view(), name='reload-site'),
|
|
49
|
+
path('redirect-to-page/', RedirectToPage.as_view(), name='redirect-to-page'),
|
|
48
50
|
]
|
|
49
51
|
|
|
50
52
|
# django-simple-captcha
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import re
|
|
2
|
+
|
|
3
|
+
from constance import config
|
|
4
|
+
from django.views.generic import RedirectView
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RedirectToPage(RedirectView):
|
|
8
|
+
"""Redirect to page according to settings in constance."""
|
|
9
|
+
|
|
10
|
+
url = "/"
|
|
11
|
+
|
|
12
|
+
def get_redirect_url(self, *args, **kwargs):
|
|
13
|
+
for line in re.split("\n+", config.REDIRECT_TO_PAGE):
|
|
14
|
+
line = line.strip()
|
|
15
|
+
groups = re.match(r"(?P<path>\S+)(\s+(?P<host>\S+))?", line.strip())
|
|
16
|
+
if groups is None:
|
|
17
|
+
continue
|
|
18
|
+
if groups['host'] is None:
|
|
19
|
+
return groups['path']
|
|
20
|
+
if groups['host'] == self.request.META.get("HTTP_HOST", self.request.META.get("SERVER_NAME")):
|
|
21
|
+
return groups['path']
|
|
22
|
+
continue
|
|
23
|
+
return self.url
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: django-cms-qe
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.7.1
|
|
4
4
|
Summary: Django CMS Quick & Easy provides all important modules to run new page withouta lot of coding. Aims to do it very easily and securely.
|
|
5
5
|
Home-page: https://websites.pages.nic.cz/django-cms-qe
|
|
6
6
|
Author: CZ.NIC, z.s.p.o.
|
|
@@ -7,7 +7,7 @@ cms_qe/fixtures.py,sha256=cq_wnZnqBwPBOHpp_0bHk424iCXKvwmN6ZaKwDvguXk,755
|
|
|
7
7
|
cms_qe/monitoring.py,sha256=5t_o7o0htmAAxVjkN2oz0O0v9XdzfePhSfPGcLNPmE8,769
|
|
8
8
|
cms_qe/signals.py,sha256=MbuLSxPlJA147LEg-lDWDoUNTV1y0OKjwoI3HzgR97g,1253
|
|
9
9
|
cms_qe/staticfiles.py,sha256=OHkfDfpIxN0B-eCRagZzHDHyBgaulcyYgKhp_3mPZuk,1363
|
|
10
|
-
cms_qe/urls.py,sha256=
|
|
10
|
+
cms_qe/urls.py,sha256=npDzzW9SgLVMZECTyOUL5Cpw7RxeuuNssTKOXuXuxtM,3247
|
|
11
11
|
cms_qe/utils.py,sha256=gxsWZmS34ZC0Tv1VW8A7VeGlrPyDshodF1ZWXj7xyWE,3057
|
|
12
12
|
cms_qe/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
cms_qe/api/constants.py,sha256=pdSziATRm6yUaaPBYoD07JXcULMvKD0h5RdNTPpG0rM,64
|
|
@@ -59,7 +59,7 @@ cms_qe/settings/base/app.py,sha256=RGxe4deN_qLGc_aRNKGjmBgsWYYpd-wdm6V47a0VR5I,4
|
|
|
59
59
|
cms_qe/settings/base/auth.py,sha256=OTr1LJ4RSMZm8STs4Q3pwPXmQoURax8OKLJ8eAj7PW4,395
|
|
60
60
|
cms_qe/settings/base/cache.py,sha256=9p6C5lOz1pG-6k15PyvxlShUjBYIbU0ewpA8AX_YFus,297
|
|
61
61
|
cms_qe/settings/base/cms.py,sha256=8icCNxcEp_KRDyP8-LXB21UurJL4wNysY39whAyt3I4,1855
|
|
62
|
-
cms_qe/settings/base/constants.py,sha256=
|
|
62
|
+
cms_qe/settings/base/constants.py,sha256=2lggnUhHesx5HKaz8kJ983JwHEPj4ZLoMfhgOqERPZY,8248
|
|
63
63
|
cms_qe/settings/base/database.py,sha256=qT7ePr2lg4CVJcHnG2nXFPPvzIjBOLB4auvRiWxaDPY,408
|
|
64
64
|
cms_qe/settings/base/email.py,sha256=agT6ZBAyT29TUEQIRYObAdgOSETLlZEi7KizNhr9dVc,357
|
|
65
65
|
cms_qe/settings/base/i18n.py,sha256=n_7esPYSbf9Wj-T23uWds7tCvQ0ol9MfyMtKzy009sM,355
|
|
@@ -89,6 +89,7 @@ cms_qe/views/__init__.py,sha256=3b5FCZ5MaqgiWglC7c5mfvP3WYLWTtNp3YpVb9BgYi8,106
|
|
|
89
89
|
cms_qe/views/errors.py,sha256=zUbCoyXy_MPsQv3UV1mgq-q2bwqPw9G4KgKU2-oue4w,3169
|
|
90
90
|
cms_qe/views/maintenance.py,sha256=Q410LCeeihRWhIJ-zzRpFSjfvA6xhgr6NJlNAoTNO2U,1658
|
|
91
91
|
cms_qe/views/monitoring.py,sha256=1r2s_jm6B6P0gEmiqjH9m3loUW3BmJivvpg6qcUOxVM,1909
|
|
92
|
+
cms_qe/views/redirect_to_page.py,sha256=JijgNrv5ZHBX-oaKeUt6I2Dn1p6x5OhHIqW8cwIkQ1I,750
|
|
92
93
|
cms_qe/views/search_result.py,sha256=H1eMOmtONnWqBDsBvz3MartyHhh42vyi0jPoxWb0X8c,296
|
|
93
94
|
cms_qe/views/security.py,sha256=SNdJe4NSm1vuOGchVF3VqlmFDopt9xYoO-b4Y0UxkFU,1108
|
|
94
95
|
cms_qe/whoosh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -3959,7 +3960,7 @@ cms_qe_video/templates/cms_qe/video/video_source_file.html,sha256=QJF5fs88s9Fznp
|
|
|
3959
3960
|
cms_qe_video/templates/cms_qe/video/video_widget.html,sha256=Yumciq6bGlAYI1lYx5j9V6IF8QYrncNYygPTkXEz6Wk,925
|
|
3960
3961
|
cms_qe_video/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3961
3962
|
cms_qe_video/templatetags/cms_qe_video.py,sha256=NR_mGv91J0rEreZrQjCzaaXSrZsKvrSas12wMJ-Dg24,1168
|
|
3962
|
-
django_cms_qe-3.
|
|
3963
|
+
django_cms_qe-3.7.1.dist-info/licenses/LICENSE,sha256=5wLaeUil0gfU9p8C4zn2Yu_PvZBNieUoYl0z9FcFWdA,1521
|
|
3963
3964
|
example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3964
3965
|
example/urls.py,sha256=H-IJsRGFVZGw6FD9gvK-0B0dLeSOsduziHvDvcHCQZ0,399
|
|
3965
3966
|
example/wsgi.py,sha256=lCKhvtFZlorSIA8qYEqc3pZ1Oflrz_Tc696MWJ62ue4,396
|
|
@@ -3980,7 +3981,7 @@ test_selenium/pages/cms/__init__.py,sha256=_qe4YZYaQbrXp7Szmmeo4TUSkXlE5Rozu8E3t
|
|
|
3980
3981
|
test_selenium/pages/cms/login.py,sha256=UPzJQcYff8NUAT4nvmfQoJQxzOJyPrJ_cKtH35NVfNg,521
|
|
3981
3982
|
test_selenium/pages/cms/page.py,sha256=YQnpZkopfVnhoyQKpRDGqjNeV6xUl-pEHjEcZ9HRiPk,489
|
|
3982
3983
|
test_selenium/pages/cms/wizard.py,sha256=yatbXH-rf1ap4O1hY0I13WikM3zkm_NrAiSK6bqENIU,545
|
|
3983
|
-
django_cms_qe-3.
|
|
3984
|
-
django_cms_qe-3.
|
|
3985
|
-
django_cms_qe-3.
|
|
3986
|
-
django_cms_qe-3.
|
|
3984
|
+
django_cms_qe-3.7.1.dist-info/METADATA,sha256=fp3JLm9GIV1Qid56udfGSru4t3hZKitQavkavutoUB8,5144
|
|
3985
|
+
django_cms_qe-3.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
3986
|
+
django_cms_qe-3.7.1.dist-info/top_level.txt,sha256=T4dauFwJy7FmxCy7WoQI3pPwiDessNB2LkfOAP76ssE,172
|
|
3987
|
+
django_cms_qe-3.7.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|