diff --git a/Server01/static/img/post/121-lisa.jpg b/Server01/static/img/post/121-lisa.jpg new file mode 100644 index 0000000..4908391 Binary files /dev/null and b/Server01/static/img/post/121-lisa.jpg differ diff --git a/Server01/views/__pycache__/post.cpython-39.pyc b/Server01/views/__pycache__/post.cpython-39.pyc index f90aa35..c1ab6c7 100644 Binary files a/Server01/views/__pycache__/post.cpython-39.pyc and b/Server01/views/__pycache__/post.cpython-39.pyc differ diff --git a/Server01/views/post.py b/Server01/views/post.py index 9975250..822b738 100644 --- a/Server01/views/post.py +++ b/Server01/views/post.py @@ -83,7 +83,7 @@ def query_post_index(request): ) else: posts = models.Post.objects - posts = filter_querySet(posts, offset, limit=5) + posts = filter_querySet(posts, offset, limit=10) if posts: return JsonResponse({'info': list(combine_index_post(posts))}, status=200) # 没有内容了 diff --git a/webServer/__pycache__/settings.cpython-39.pyc b/webServer/__pycache__/settings.cpython-39.pyc index 5f18727..b09ac14 100644 Binary files a/webServer/__pycache__/settings.cpython-39.pyc and b/webServer/__pycache__/settings.cpython-39.pyc differ diff --git a/webServer/__pycache__/urls.cpython-39.pyc b/webServer/__pycache__/urls.cpython-39.pyc index f96b341..9433eac 100644 Binary files a/webServer/__pycache__/urls.cpython-39.pyc and b/webServer/__pycache__/urls.cpython-39.pyc differ diff --git a/webServer/settings.py b/webServer/settings.py index 36ebf82..bc98ebe 100644 --- a/webServer/settings.py +++ b/webServer/settings.py @@ -29,10 +29,10 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ - "django.contrib.admin", + # "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", - "django.contrib.sessions", + # "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", "Server01.apps.Server01Config", diff --git a/webServer/urls.py b/webServer/urls.py index e5e5f30..7f5423f 100644 --- a/webServer/urls.py +++ b/webServer/urls.py @@ -13,13 +13,13 @@ Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ -from django.contrib import admin +# from django.contrib import admin from django.urls import path from Server01.views import user, post, comment urlpatterns = [ - path("admin/", admin.site.urls), + # path("admin/", admin.site.urls), # 用户相关 path("login/", user.login), path('register/', user.register),