Ejemplo n.º 1
0
from core.models import (DatabaseList, SqlOrder, Usermessage, Account,
                         globalpermissions, onlineinfo_db, CloudOrder,
                         extendinfo_db, addnewpcinfo_db, modelist_db,
                         attachmentinfo)
from settingConf import settings

iteration_list = {
    'upversion': '版本上线',
    'upemergency': '紧急上线',
    'upiteration': '迭代版本'
}
env_name_list = {'test': '测试环境', 'pre': '预发布', 'pro': '生产'}

CUSTOM_ERROR = logging.getLogger('Yearning.core.views')

conf = util.conf_path()
addr_ip = conf.ipaddress


class cancelview(baseview.BaseView):
    def put(self, request, args: str = None):
        try:
            from_user = request.data['from_user']
            to_user = request.data['to_user']
            text = request.data['text']
            workid = request.data['workid']
            print(request.data)
        except KeyError as e:
            CUSTOM_ERROR.error(f'{e.__class__.__name__}: {e}')
            return HttpResponse(status=500)
        else:
Ejemplo n.º 2
0
import logging
import json
from libs import baseview, util
from libs import call_inception
from core.task import submit_push_messages
from rest_framework.response import Response
from django.http import HttpResponse
from core.models import (
    DatabaseList,
    SqlOrder
)

CUSTOM_ERROR = logging.getLogger('Yearning.core.views')

conf = util.conf_path()
addr_ip = conf.ipaddress


class sqlorder(baseview.BaseView):
    '''

    :argument 手动模式工单提交相关接口api

    put   美化sql  测试sql

    post 提交工单

    '''

    def put(self, request, args=None):
        if args == 'beautify':
Ejemplo n.º 3
0
"""
Django settings for auto_deploy project.

Generated by 'django-admin startproject' using Django 1.10.6.

For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
import datetime
from libs import util

CONF_DATA = util.conf_path()

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'u)zall!ag&mci+ja5u&-6*1e^ufyu)l4i8+^=mw$845@k!ie+3.txt'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

# ALLOWED_HOSTS = [str(CONF_DATA.ipaddress).split(':')[0]]
ALLOWED_HOSTS = ['*']
Ejemplo n.º 4
0
"""
Django settings for auto_deploy project.

Generated by 'django-admin startproject' using Django 1.10.6.

For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
import datetime
from libs import util

CONF_DATA = util.conf_path()

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'u)zall!ag&mci+ja5u&-6*1e^ufyu)l4i8+^=mw$845@k!ie+3.txt'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

# ALLOWED_HOSTS = [str(CONF_DATA.ipaddress).split(':')[0]]
ALLOWED_HOSTS = ['*']