Compare commits
No commits in common. "84bf8b079ad678103ecf2a470b036c8e0de9dab9" and "9a2759bb211bc3a7f6ac17102311f78962be9c3d" have entirely different histories.
84bf8b079a
...
9a2759bb21
3 changed files with 5 additions and 11 deletions
|
@ -52,7 +52,7 @@ class PostAdmin(admin.ModelAdmin):
|
||||||
"post_id",
|
"post_id",
|
||||||
"source_site",
|
"source_site",
|
||||||
"creator",
|
"creator",
|
||||||
"title_at",
|
"title",
|
||||||
"description_at",
|
"description_at",
|
||||||
"mature",
|
"mature",
|
||||||
"date_created_fromated",
|
"date_created_fromated",
|
||||||
|
@ -60,14 +60,6 @@ class PostAdmin(admin.ModelAdmin):
|
||||||
"date_last_import_formated",
|
"date_last_import_formated",
|
||||||
]
|
]
|
||||||
|
|
||||||
@admin.display(description="Title")
|
|
||||||
def title_at(self, obj):
|
|
||||||
if obj.title.first() is not None:
|
|
||||||
if len(str(obj.title.first().content)) >= 80:
|
|
||||||
return obj.title.first().content[:77] + "..."
|
|
||||||
else:
|
|
||||||
return obj.title.first().content
|
|
||||||
|
|
||||||
@admin.display(description="Description")
|
@admin.display(description="Description")
|
||||||
def description_at(self, obj):
|
def description_at(self, obj):
|
||||||
if len(str(obj.description.first().content)) >= 80:
|
if len(str(obj.description.first().content)) >= 80:
|
||||||
|
|
|
@ -17,6 +17,7 @@ from pathlib import Path
|
||||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
|
|
||||||
|
|
||||||
# Quick-start development settings - unsuitable for production
|
# Quick-start development settings - unsuitable for production
|
||||||
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
|
||||||
|
|
||||||
|
@ -28,6 +29,7 @@ DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "northpaw.aroy.hs.tun"]
|
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "northpaw.aroy.hs.tun"]
|
||||||
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
|
@ -45,7 +47,6 @@ INSTALLED_APPS = [
|
||||||
"corsheaders",
|
"corsheaders",
|
||||||
"django_celery_results",
|
"django_celery_results",
|
||||||
"django_celery_beat",
|
"django_celery_beat",
|
||||||
"sorl.thumbnail",
|
|
||||||
# API apps
|
# API apps
|
||||||
"api",
|
"api",
|
||||||
"api.schema",
|
"api.schema",
|
||||||
|
@ -53,7 +54,7 @@ INSTALLED_APPS = [
|
||||||
"api.user",
|
"api.user",
|
||||||
"api.posts",
|
"api.posts",
|
||||||
"api.creators",
|
"api.creators",
|
||||||
# Apps for Backend logic
|
"images",
|
||||||
"apps",
|
"apps",
|
||||||
"apps.archive",
|
"apps.archive",
|
||||||
"apps.files",
|
"apps.files",
|
||||||
|
|
|
@ -21,4 +21,5 @@ from django.urls import include, path
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path("api/", include("api.urls")),
|
path("api/", include("api.urls")),
|
||||||
|
path("", include("images.urls")),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Reference in a new issue