Merge pull request #11 from Fluffy-Bean/deepsource-transform-3142e882

format code with black
This commit is contained in:
Michał 2023-09-08 15:25:36 +01:00 committed by GitHub
commit 2cb295cf90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View file

@ -4,10 +4,9 @@ from articles.models import Article
def article_list(request):
articles = (Article.objects.defer('body')
.filter(published=True)
.order_by("-date")
.all())
articles = (
Article.objects.defer("body").filter(published=True).order_by("-date").all()
)
return render(request, "views/articles.html", {"articles": articles})

View file

@ -34,7 +34,7 @@ DEBUG = False
ALLOWED_HOSTS = ["*"]
CSRF_TRUSTED_ORIGINS = [
'https://*.leggy.dev',
"https://*.leggy.dev",
]
@ -87,9 +87,9 @@ WSGI_APPLICATION = "website.wsgi.application"
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': "django.db.backends.sqlite3",
'NAME': BASE_DIR / 'db.sqlite3',
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}