Skip to content

Commit e417bc3

Browse files
committed
Merge branch 'release/7.0.1'
2 parents cb781d6 + 6f6dcde commit e417bc3

File tree

12 files changed

+136
-21
lines changed

12 files changed

+136
-21
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: ["3.7", "3.8", "3.9", "3.10"]
12-
django: ["3.2", "4.0"]
11+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
12+
django: ["3.2", "4.0", "4.1"]
1313
exclude:
1414
- python-version: "3.7"
1515
django: "4.0"
16+
- python-version: "3.7"
17+
django: "4.1"
1618
steps:
1719
- uses: actions/checkout@v2
1820
- name: Set up Python ${{ matrix.python-version }}
@@ -26,6 +28,7 @@ jobs:
2628
- name: Test
2729
run: |
2830
python runtests.py
31+
2932
lint-black:
3033
runs-on: ubuntu-latest
3134
needs: test
@@ -35,7 +38,8 @@ jobs:
3538
with:
3639
options: "--check --verbose"
3740
src: "."
38-
version: "21.5b1"
41+
version: "22.3.0"
42+
3943
lint-isort:
4044
runs-on: ubuntu-latest
4145
needs: test
@@ -49,7 +53,8 @@ jobs:
4953
python -m pip install --upgrade pip
5054
pip install isort
5155
isort . --check-only
52-
deploy:
56+
57+
publish:
5358
runs-on: ubuntu-latest
5459
needs: [test, lint-black, lint-isort]
5560
steps:

CHANGELOG.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
### Added
10+
### Changed
11+
### Fixed
12+
### Removed
13+
14+
## [7.0.1] - 2023-01-07
15+
16+
### Added
17+
- Add changelog
18+
19+
### Fixed
20+
- Add python 3.11 support (@marteinn)
21+
- Add django 4.1 support (@marteinn)
22+
- Fix invalid assert (code-review-doctor)
23+
24+
## [7.0.0] - 2022-01-04
25+
26+
### Fixed
27+
- Add Django 4.0 support
28+
- Add Python 3.10 support
29+
30+
### Removed
31+
- Drop Python 2 support
32+
- Drop Python 3.6 support
33+
- Drop support for EOL versions of Django (1 and 2)
34+
35+
## [6.0.2] - 2020-09-05
36+
37+
### Fixed
38+
- Make context_processor mandatory again
39+
40+
## [6.0.1] - 2020-08-30
41+
42+
### Fixed
43+
- Solved XSS issue (@anthonynsimon, @marteinn)
44+
- Add security policy
45+
46+
## [6.0.0] - 2020-04-28
47+
48+
### Added
49+
- Add official support for Hypernova SSR service
50+
- Add attribute “no_placeholder” when you want to skip the DRTT provided placeholder
51+
52+
### Fixed
53+
- Add official Django 3 support (@niespodd, @marteinn)
54+
- Remove context_processor required to run library (@niespodd)
55+
- Solve issue with requests import (Aria Moradi)
56+
- Use unit.patch instead of responses to mock requests (Umair)
57+
58+
### Removed
59+
- Drop Django 1 support
60+
- Drop pypy support
61+
62+
63+
## [5.4.0] - 2019-04-28
64+
65+
### Added
66+
- Make it possible to use your own SSRService
67+
68+
### Fixed
69+
- Update docs
70+
- Add project logo
71+
72+
## [5.3.0] - 2019-04-24
73+
74+
### Added
75+
- Add SSRContext for passign values to SSR (@mikaelengstrom, @marteinn)
76+
- Add support for disabling SSR using header HTTP_X_DISABLE_SSR
77+
78+
### Fixed
79+
- Include example project
80+
- Drop python 3.4 support
81+
82+
## [5.2.1] - 2018-08-10
83+
84+
### Fixed
85+
- Add better SSR errors (thanks @mikaelengstrom)
86+
87+
## [5.2.0] - 2018-08-09
88+
89+
### Fixed
90+
- Use render() if SSR is not available
91+
- Fix bug when passing in standalone primitives in react_render
92+
- Update docs
93+
94+
## [5.1.0] - 2018-05-22
95+
96+
### Added
97+
- Add support for a replaceable tag manager (@aleehedl)
98+
- Add configurable headers for SSR (@aleehedl, @marteinn)
99+
100+
## [5.1.0] - 2018-04-05
101+
102+
### Fixed
103+
- Update react requirements in readme
104+
- Change NotImplemented error to to_react_representation
105+
106+
### Removed
107+
- Drop django support for django 1.10 and below
108+
- Drop custom JSON serializer
109+
110+
## [4.0.0] - 2017-12-06
111+
112+
### Fixed
113+
- Solved bug where to_react_representation triggered twice under SSR
114+
115+
### Removed
116+
- Dropped support for django 1.8
117+
- Removed templatetags for filters

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-2021 Fröjd Interactive
3+
Copyright (c) 2015-2023 Fröjd Interactive
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

django_react_templatetags/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"""
88

99
__title__ = "django_react_templatetags"
10-
__version__ = "7.0.0"
11-
__build__ = 700
10+
__version__ = "7.0.1"
11+
__build__ = 701
1212
__author__ = "Martin Sandström"
1313
__license__ = "MIT"
14-
__copyright__ = "Copyright 2015-2021 Fröjd Interactive"
14+
__copyright__ = "Copyright 2015-2022 Fröjd Interactive"

django_react_templatetags/ssr/hypernova.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import json
21
import logging
32
import re
43

django_react_templatetags/templatetags/react.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def props_to_json(resolved_data, context):
185185
@staticmethod
186186
def render_placeholder(attributes, component_html=""):
187187
attr_pairs = map(lambda x: '{}="{}"'.format(*x), attributes)
188-
return u"<div {}>{}</div>".format(
188+
return "<div {}>{}</div>".format(
189189
" ".join(attr_pairs),
190190
component_html,
191191
)

django_react_templatetags/tests/test_filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def test_to_model_representation_data(self):
251251
def test_unicode_chars(self):
252252
"Tests that the data is added as correct json into the react render"
253253

254-
self.mocked_context["component_data"] = {"name": u"ÅÄÖ"}
254+
self.mocked_context["component_data"] = {"name": "ÅÄÖ"}
255255

256256
out = Template(
257257
"{% load react %}"

django_react_templatetags/tests/test_manager.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
from django.template import Context, Template
42
from django.test import SimpleTestCase, override_settings
53

django_react_templatetags/tests/test_representation_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django.test import SimpleTestCase, override_settings
1+
from django.test import SimpleTestCase
22

33
from django_react_templatetags.mixins import RepresentationMixin
44

django_react_templatetags/tests/test_ssr.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
except ImportError:
44
import mock
55

6-
from django.template import Context, Template
76
from django.test import SimpleTestCase, override_settings
87
from django.urls import reverse
98

10-
from django_react_templatetags.tests.demosite.models import MovieWithContext, Person
11-
129

1310
class CustomSSRService:
1411
"Used for testing using a custom ssr service"

django_react_templatetags/tests/test_ssr_hypernova_service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import json
21
import logging
32

43
from .mock_response import MockResponse
@@ -202,7 +201,7 @@ def test_only_ssr_html_are_returned_on_no_placeholder(self, mocked):
202201
).render(self.mocked_context)
203202

204203
queue = self.mocked_context["REACT_COMPONENTS"]
205-
self.assertTrue(len(queue), 1)
204+
self.assertEqual(len(queue), 1)
206205
self.assertFalse(out.startswith('<div id="Component_'))
207206

208207

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/usr/bin/env python
22

33
import io
4-
import os
54
import re
6-
import sys
75
from pathlib import Path
86

97
from setuptools import find_packages, setup
@@ -56,9 +54,11 @@
5654
"Programming Language :: Python :: 3.8",
5755
"Programming Language :: Python :: 3.9",
5856
"Programming Language :: Python :: 3.10",
57+
"Programming Language :: Python :: 3.11",
5958
"Framework :: Django",
6059
"Framework :: Django :: 3.2",
6160
"Framework :: Django :: 4.0",
61+
"Framework :: Django :: 4.1",
6262
"Topic :: Utilities",
6363
"Programming Language :: JavaScript",
6464
],

0 commit comments

Comments
 (0)