mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-18 02:44:51 +03:00
Merge pull request #15 from cookiecutter/master
update to upstream release `2022.02.16`
This commit is contained in:
commit
c73cf8ce51
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -3,6 +3,16 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
|
|||
|
||||
<!-- GENERATOR_PLACEHOLDER -->
|
||||
|
||||
## 2022.02.16
|
||||
|
||||
### Fixed
|
||||
- Fix Swagger schema API endpoint & add a test for it ([#3592](https://github.com/cookiecutter/cookiecutter-django/pull/3592))
|
||||
|
||||
## 2022.02.15
|
||||
|
||||
### Changed
|
||||
- Update the drf-spectacular local dev server url to use http instead of https ([#3591](https://github.com/cookiecutter/cookiecutter-django/pull/3591))
|
||||
|
||||
## 2022.02.13
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -418,7 +418,7 @@ def remove_drf_starter_files():
|
|||
)
|
||||
os.remove(
|
||||
os.path.join(
|
||||
"{{cookiecutter.project_slug}}", "users", "tests", "test_swagger_ui.py"
|
||||
"{{cookiecutter.project_slug}}", "users", "tests", "test_swagger.py"
|
||||
)
|
||||
)
|
||||
|
||||
|
|
2
setup.py
2
setup.py
|
@ -5,7 +5,7 @@ except ImportError:
|
|||
from distutils.core import setup
|
||||
|
||||
# We use calendar versioning
|
||||
version = "2022.02.13"
|
||||
version = "2022.02.16"
|
||||
|
||||
with open("README.rst") as readme_file:
|
||||
long_description = readme_file.read()
|
||||
|
|
|
@ -339,6 +339,7 @@ REST_FRAMEWORK = {
|
|||
"rest_framework.authentication.TokenAuthentication",
|
||||
),
|
||||
"DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.IsAuthenticated",),
|
||||
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
|
||||
}
|
||||
|
||||
# django-cors-headers - https://github.com/adamchainz/django-cors-headers#setup
|
||||
|
|
|
@ -14,3 +14,9 @@ def test_swagger_ui_not_accessible_by_normal_user(client):
|
|||
url = reverse("api-docs")
|
||||
response = client.get(url)
|
||||
assert response.status_code == 403
|
||||
|
||||
|
||||
def test_api_schema_generated_successfully(admin_client):
|
||||
url = reverse("api-schema")
|
||||
response = admin_client.get(url)
|
||||
assert response.status_code == 200
|
Loading…
Reference in New Issue
Block a user