larken

勤奋的人生才有价值

导航

2018年9月5日 #

Django入门与实践-第19章:主题回复(完结)

摘要: http://127.0.0.1:8000/boards/1/topics/1/reply/ http://127.0.0.1:8000/boards/1/topics/1/ #myproject/urls.py url(r'^boards/(?P\d+)/topics/(?P\d+)/reply/$',views.reply_topic, name='reply_topic'), #b... 阅读全文

posted @ 2018-09-05 13:51 larken 阅读(207) 评论(0) 推荐(0) 编辑

Django入门与实践-第18章:访问已登录用户(完结)

摘要: http://127.0.0.1:8000/boards/1/topics/1/ #boards/views.py @login_required def new_topic(request, pk): board = get_object_or_404(Board, pk=pk) if request.method == 'POST': form = N... 阅读全文

posted @ 2018-09-05 13:37 larken 阅读(192) 评论(0) 推荐(0) 编辑

Django入门与实践-第17章:保护视图(完结)

摘要: http://127.0.0.1:8000/boards/1/ #boards/views.py from django.contrib.auth.decorators import login_required @login_required def new_topic(request, pk): {% csrf_token %} {% include... 阅读全文

posted @ 2018-09-05 13:27 larken 阅读(161) 评论(0) 推荐(0) 编辑

Django入门与实践-第16章:用户登录(完结)

摘要: # myproject/settings.py LOGIN_REDIRECT_URL = 'home' EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' http://127.0.0.1:8000/login/ http://127.0.0.1:8000/signup/ http://127.0.0.1:8000/... 阅读全文

posted @ 2018-09-05 13:26 larken 阅读(319) 评论(0) 推荐(0) 编辑

Django入门与实践-第15章:用户注销(完结)

摘要: # myproject/settings.py LOGOUT_REDIRECT_URL = 'home' http://127.0.0.1:8000/logout/ # myproject/urls.py from django.conf.urls import url from django.contrib import admin from django.contrib.auth imp... 阅读全文

posted @ 2018-09-05 10:30 larken 阅读(195) 评论(0) 推荐(0) 编辑

Django入门与实践-第14章:用户注册(完结)

摘要: http://127.0.0.1:8000/signup/ django-admin startapp accounts INSTALLED_APPS = [ 'accounts', ] # myproject/urls.py from django.conf.urls import url from django.contrib import admin from accou... 阅读全文

posted @ 2018-09-05 10:24 larken 阅读(158) 评论(0) 推荐(0) 编辑

Django入门与实践-第13章:表单处理(完结)

摘要: http://127.0.0.1:8000/boards/1/ http://127.0.0.1:8000/boards/2/ http://127.0.0.1:8000/boards/3/ http://127.0.0.1:8000/boards/1/new/ http://127.0.0.1:8000/boards/2/new/ http://127.0.0.1:8000/boards/3/... 阅读全文

posted @ 2018-09-05 10:12 larken 阅读(664) 评论(0) 推荐(1) 编辑

Django入门与实践-第12章:复用模板(完结)

摘要: http://127.0.0.1:8000/ http://127.0.0.1:8000/boards/1/ http://127.0.0.1:8000/boards/2/ http://127.0.0.1:8000/boards/3/ .navbar-brand { font-family: 'Peralta', cursive; } {% load static %} ... 阅读全文

posted @ 2018-09-05 10:03 larken 阅读(227) 评论(0) 推荐(0) 编辑

Django入门与实践-第11章:URL 分发(完结)

摘要: http://127.0.0.1:8000 http://127.0.0.1:8000/boards/1/ http://127.0.0.1:8000/boards/2/ http://127.0.0.1:8000/boards/3/ # myproject/urls.py from django.conf.urls import url from django.contrib import... 阅读全文

posted @ 2018-09-05 09:50 larken 阅读(175) 评论(0) 推荐(0) 编辑

Django入门指南-第10章:Django Admin 介绍(完结)

摘要: 在浏览器中打开该URL:http://127.0.0.1:8000/admin/ 我们可以检查一切是否正常,打开URL http://127.0.0.1:8000 我们首先创建一个管理员帐户: python manage.py createsuperuser 按照说明操作: Username (leave blank to use 'vitorfs'): larken Email addr... 阅读全文

posted @ 2018-09-05 09:47 larken 阅读(137) 评论(0) 推荐(0) 编辑