mirror of
https://github.com/xishandong/Django_Server_redbook.git
synced 2024-11-25 16:52:42 +08:00
去除了不需要的插件
This commit is contained in:
parent
bacc78806b
commit
9ad53633bc
BIN
Server01/static/img/post/121-lisa.jpg
Normal file
BIN
Server01/static/img/post/121-lisa.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 684 KiB |
Binary file not shown.
@ -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)
|
||||
# 没有内容了
|
||||
|
Binary file not shown.
Binary file not shown.
@ -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",
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user