增加安装脚本

This commit is contained in:
virusdefender
2015-08-09 22:06:23 +08:00
parent a90fdd3f1d
commit b6c31ba7a6
7 changed files with 22 additions and 0 deletions
View File
+3
View File
@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.
View File
+3
View File
@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.
+3
View File
@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.
+12
View File
@@ -0,0 +1,12 @@
# coding=utf-8
from django.shortcuts import render
from django.http import HttpResponse
from account.models import User
def install(request):
user = User.objects.create(username="root", admin_type=2)
user.set_password("root")
user.save()
return HttpResponse("success")