快过年了,公司事情忙,好几天没有继续写博客,今天开始写账户模块系统登录,账户管理以及登录日志, 首先新建登录日志数据表: USE [MVCSystem] GO /****** Object: Table [dbo].[UsersLoginLogs] Script Date: 01/29/2016 15:28:02 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[UsersLoginLogs]
基本代码结构 url.py: from django.conf.urls import url, include from app import views urlpatterns = [ url(r'^test/', views.TestView.as_view()), ] views.py: from rest_framework.views import APIView from rest_framework.response import Response from rest_frame