mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-11 00:22:29 +03:00
Merge branch 'migrate-post-gen-hook-pathlib' into lint-format-template-with-ruff
This commit is contained in:
commit
9902f4d76c
|
@ -3,6 +3,15 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
|
||||||
|
|
||||||
<!-- GENERATOR_PLACEHOLDER -->
|
<!-- GENERATOR_PLACEHOLDER -->
|
||||||
|
|
||||||
|
## 2025.01.16
|
||||||
|
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
|
||||||
|
- Update ruff to 0.9.2 ([#5646](https://github.com/cookiecutter/cookiecutter-django/pull/5646))
|
||||||
|
|
||||||
|
- Bump amazon/aws-cli from 2.22.1 to 2.23.0 ([#5645](https://github.com/cookiecutter/cookiecutter-django/pull/5645))
|
||||||
|
|
||||||
## 2025.01.15
|
## 2025.01.15
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -397,9 +397,7 @@ def remove_aws_dockerfile():
|
||||||
def remove_drf_starter_files():
|
def remove_drf_starter_files():
|
||||||
Path("config", "api_router.py").unlink()
|
Path("config", "api_router.py").unlink()
|
||||||
shutil.rmtree(Path("{{cookiecutter.project_slug}}", "users", "api"))
|
shutil.rmtree(Path("{{cookiecutter.project_slug}}", "users", "api"))
|
||||||
Path("{{cookiecutter.project_slug}}", "users", "tests", "test_drf_urls.py").unlink()
|
shutil.rmtree(Path("{{cookiecutter.project_slug}}", "users", "tests", "api"))
|
||||||
Path("{{cookiecutter.project_slug}}", "users", "tests", "test_drf_views.py").unlink()
|
|
||||||
Path("{{cookiecutter.project_slug}}", "users", "tests", "test_swagger.py").unlink()
|
|
||||||
|
|
||||||
|
|
||||||
def main(): # noqa: C901, PLR0912, PLR0915
|
def main(): # noqa: C901, PLR0912, PLR0915
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[project]
|
[project]
|
||||||
name = "cookiecutter-django"
|
name = "cookiecutter-django"
|
||||||
version = "2025.01.15"
|
version = "2025.01.16"
|
||||||
description = "A Cookiecutter template for creating production-ready Django projects quickly."
|
description = "A Cookiecutter template for creating production-ready Django projects quickly."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = [
|
keywords = [
|
||||||
|
|
|
@ -4,14 +4,14 @@ import pytest
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
|
||||||
|
|
||||||
def test_swagger_accessible_by_admin(admin_client):
|
def test_api_docs_accessible_by_admin(admin_client):
|
||||||
url = reverse("api-docs")
|
url = reverse("api-docs")
|
||||||
response = admin_client.get(url)
|
response = admin_client.get(url)
|
||||||
assert response.status_code == HTTPStatus.OK
|
assert response.status_code == HTTPStatus.OK
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
def test_swagger_ui_not_accessible_by_normal_user(client):
|
def test_api_docs_not_accessible_by_anonymous_users(client):
|
||||||
url = reverse("api-docs")
|
url = reverse("api-docs")
|
||||||
response = client.get(url)
|
response = client.get(url)
|
||||||
assert response.status_code == HTTPStatus.FORBIDDEN
|
assert response.status_code == HTTPStatus.FORBIDDEN
|
Loading…
Reference in New Issue
Block a user