添加log models

添加 docs目录
pull/6/head
ibuler 2014-12-26 22:54:37 +08:00
parent 37fe5dc4e3
commit bcf3281a10
5 changed files with 38 additions and 1 deletions

1
docs/__init__.py Normal file
View File

@ -0,0 +1 @@
__author__ = 'Hudie'

21
docs/developer_doc.txt Normal file
View File

@ -0,0 +1,21 @@
# coding: utf8
Jumpserver开发者文档
开发规范:
1. 遵守PE8规范 1) 命名规范 2) 导入模块规范 3) 空行规范 4) 长度规范
2. 缩进统一4个空格
3. 变量命名明了易懂多个单词下划线隔开
4. 注释到位
框架说明:
1. 项目名称 Jumpserver
2. APP:
juser 用户管理
jasset 资产管理(设备管理)
jpermission 授权管理
jlog 日志管理
3. connect.py 用户登录入口程序
4. logs 日志保存目录
5. jumpserver.conf 配置文件

View File

@ -1,3 +1,17 @@
from django.db import models
# Create your models here.
from juser.models import User
from jasset.models import Asset
class Log(models.Model):
username = models.ForeignKey(User)
asset = models.ForeignKey(Asset)
log_path = models.CharField(max_length=100)
start_time = models.IntegerField()
pid = models.IntegerField(max_length=10)
is_finished = models.BooleanField(default=False)
end_time = models.IntegerField(blank=True, null=True)
def __unicode__(self):
return self.log_path

View File

@ -49,6 +49,7 @@ INSTALLED_APPS = (
'juser',
'jasset',
'jpermission',
'jlog',
)
MIDDLEWARE_CLASSES = (