@ -0,0 +1,8 @@
|
|||||||
|
# 默认忽略的文件
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# 基于编辑器的 HTTP 客户端请求
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
@ -0,0 +1,16 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoredPackages">
|
||||||
|
<value>
|
||||||
|
<list size="2">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="django" />
|
||||||
|
<item index="1" class="java.lang.String" itemvalue="requests" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Black">
|
||||||
|
<option name="sdkName" value="Python 3.11 (pythonProject1)" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (python电影院信息管理)" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/python电影院信息管理.iml" filepath="$PROJECT_DIR$/.idea/python电影院信息管理.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="jdk" jdkName="Python 3.7 (python电影院信息管理)" jdkType="Python SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
<component name="PyDocumentationSettings">
|
||||||
|
<option name="format" value="PLAIN" />
|
||||||
|
<option name="myDocStringFormat" value="Plain" />
|
||||||
|
</component>
|
||||||
|
<component name="TemplatesService">
|
||||||
|
<option name="TEMPLATE_CONFIGURATION" value="Jinja2" />
|
||||||
|
<option name="TEMPLATE_FOLDERS">
|
||||||
|
<list>
|
||||||
|
<option value="$MODULE_DIR$/djangof11e3/templates" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</module>
|
@ -0,0 +1,8 @@
|
|||||||
|
# 默认忽略的文件
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# 基于编辑器的 HTTP 客户端请求
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
@ -0,0 +1 @@
|
|||||||
|
init.py
|
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="django" name="Django">
|
||||||
|
<configuration>
|
||||||
|
<option name="rootFolder" value="$MODULE_DIR$" />
|
||||||
|
<option name="settingsModule" value="dj2/settings.py" />
|
||||||
|
<option name="manageScript" value="$MODULE_DIR$/manage.py" />
|
||||||
|
<option name="environment" value="<map/>" />
|
||||||
|
<option name="doNotUseTestRunner" value="false" />
|
||||||
|
<option name="trackFilePattern" value="migrations" />
|
||||||
|
</configuration>
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="jdk" jdkName="Python 3.11 (pythonProject1)" jdkType="Python SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
<component name="PyDocumentationSettings">
|
||||||
|
<option name="format" value="PLAIN" />
|
||||||
|
<option name="myDocStringFormat" value="Plain" />
|
||||||
|
</component>
|
||||||
|
<component name="TemplatesService">
|
||||||
|
<option name="TEMPLATE_CONFIGURATION" value="Django" />
|
||||||
|
<option name="TEMPLATE_FOLDERS">
|
||||||
|
<list>
|
||||||
|
<option value="$MODULE_DIR$/templates" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</module>
|
@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (pythonProject1)" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/djangof11e3.iml" filepath="$PROJECT_DIR$/.idea/djangof11e3.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -0,0 +1,9 @@
|
|||||||
|
[sql]
|
||||||
|
;support two sql,mysql and mssql,choice one
|
||||||
|
type = mysql
|
||||||
|
host = 127.0.0.1
|
||||||
|
port = 3306
|
||||||
|
user = root
|
||||||
|
passwd = 1234
|
||||||
|
db = djangof11e3
|
||||||
|
charset = utf8
|
@ -0,0 +1,3 @@
|
|||||||
|
import pymysql
|
||||||
|
|
||||||
|
pymysql.install_as_MySQLdb()
|
@ -0,0 +1,155 @@
|
|||||||
|
"""
|
||||||
|
Django settings for dj2 project.
|
||||||
|
|
||||||
|
Generated by 'django-admin startproject' using Django 2.0.
|
||||||
|
|
||||||
|
For more information on this file, see
|
||||||
|
https://docs.djangoproject.com/en/2.0/topics/settings/
|
||||||
|
|
||||||
|
For the full list of settings and their values, see
|
||||||
|
https://docs.djangoproject.com/en/2.0/ref/settings/
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
from util.configread import config_read
|
||||||
|
|
||||||
|
# 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/2.0/howto/deployment/checklist/
|
||||||
|
|
||||||
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
|
SECRET_KEY = 'w5yn#0gn2tt7pvu%hvwt0!lt=!$6+eqp4%m8)u3u#gknm@jm)k'
|
||||||
|
|
||||||
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
|
DEBUG = True
|
||||||
|
|
||||||
|
ALLOWED_HOSTS = ["*"]
|
||||||
|
|
||||||
|
# Application definition
|
||||||
|
|
||||||
|
INSTALLED_APPS = [
|
||||||
|
'django.contrib.admin',
|
||||||
|
'django.contrib.auth',
|
||||||
|
'django.contrib.contenttypes',
|
||||||
|
'django.contrib.sessions',
|
||||||
|
'django.contrib.messages',
|
||||||
|
'django.contrib.staticfiles',
|
||||||
|
"main",
|
||||||
|
]
|
||||||
|
|
||||||
|
MIDDLEWARE = [
|
||||||
|
'django.middleware.security.SecurityMiddleware',
|
||||||
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
'django.middleware.common.CommonMiddleware',
|
||||||
|
# 'django.middleware.csrf.CsrfViewMiddleware',#Forbidden (CSRF cookie not set.)
|
||||||
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
|
'threadlocals.middleware.ThreadLocalMiddleware',
|
||||||
|
"xmiddleware.xparam.Xparam",
|
||||||
|
"xmiddleware.xauth.Xauth",
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
|
||||||
|
SESSION_COOKIE_NAME = "sessionid"
|
||||||
|
SESSION_COOKIE_PATH = "/"
|
||||||
|
SESSION_COOKIE_DOMAIN = None
|
||||||
|
SESSION_COOKIE_SECURE = False
|
||||||
|
SESSION_COOKIE_HTTPONLY = True
|
||||||
|
SESSION_COOKIE_AGE = 1209600
|
||||||
|
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
|
||||||
|
SESSION_SAVE_EVERY_REQUEST = False
|
||||||
|
|
||||||
|
ROOT_URLCONF = 'dj2.urls'
|
||||||
|
TEMPLATES_DIR = os.path.join(BASE_DIR, "templates")
|
||||||
|
TEMPLATES = [
|
||||||
|
{
|
||||||
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
|
'DIRS': [TEMPLATES_DIR],
|
||||||
|
'APP_DIRS': True,
|
||||||
|
'OPTIONS': {
|
||||||
|
'context_processors': [
|
||||||
|
'django.template.context_processors.debug',
|
||||||
|
'django.template.context_processors.request',
|
||||||
|
'django.contrib.auth.context_processors.auth',
|
||||||
|
'django.contrib.messages.context_processors.messages',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
WSGI_APPLICATION = 'dj2.wsgi.application'
|
||||||
|
|
||||||
|
# Database
|
||||||
|
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
|
||||||
|
|
||||||
|
# DATABASES = {
|
||||||
|
# 'default': {
|
||||||
|
# 'ENGINE': 'django.db.backends.sqlite3',
|
||||||
|
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
dbtype, host, port, user, passwd, dbName, charset = config_read("config.ini")
|
||||||
|
dbName=dbName.replace(" ","").strip()
|
||||||
|
print(dbtype, host, port, user, passwd, dbName, charset)
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.mysql',
|
||||||
|
'NAME': 'project',
|
||||||
|
'USER':'root',
|
||||||
|
'PASSWORD':'1234',
|
||||||
|
'HOST':'127.0.0.1',
|
||||||
|
'PORT':3306
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# Password validation
|
||||||
|
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
|
||||||
|
|
||||||
|
AUTH_PASSWORD_VALIDATORS = [
|
||||||
|
{
|
||||||
|
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
# Internationalization
|
||||||
|
# https://docs.djangoproject.com/en/2.0/topics/i18n/
|
||||||
|
|
||||||
|
LANGUAGE_CODE = 'zh-Hans'
|
||||||
|
|
||||||
|
TIME_ZONE = 'UTC'
|
||||||
|
|
||||||
|
USE_I18N = True
|
||||||
|
|
||||||
|
USE_L10N = True
|
||||||
|
|
||||||
|
USE_TZ = True
|
||||||
|
|
||||||
|
# Static files (CSS, JavaScript, Images)
|
||||||
|
# https://docs.djangoproject.com/en/2.0/howto/static-files/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
STATIC_URL = '/assets/'
|
||||||
|
STATICFILES_DIRS =[
|
||||||
|
os.path.join(BASE_DIR, "templates/front/assets"),
|
||||||
|
]
|
||||||
|
|
||||||
|
# media
|
||||||
|
MEDIA_URL = "/media/" # 自定义
|
||||||
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') # 自定义
|
||||||
|
if os.path.isdir(MEDIA_ROOT) == False:
|
||||||
|
os.mkdir(MEDIA_ROOT)
|
@ -0,0 +1,101 @@
|
|||||||
|
"""dj2 URL Configuration
|
||||||
|
|
||||||
|
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||||
|
https://docs.djangoproject.com/en/2.0/topics/http/urls/
|
||||||
|
Examples:
|
||||||
|
Function views
|
||||||
|
1. Add an import: from my_app import views
|
||||||
|
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
||||||
|
Class-based views
|
||||||
|
1. Add an import: from other_app.views import Home
|
||||||
|
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
||||||
|
Including another URLconf
|
||||||
|
1. Import the include() function: from django.urls import include, path
|
||||||
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
|
"""
|
||||||
|
import os
|
||||||
|
from django.contrib import admin
|
||||||
|
from django.urls import path,include,re_path
|
||||||
|
from django.conf.urls import url
|
||||||
|
from django.views.static import serve
|
||||||
|
from django.views.generic import TemplateView
|
||||||
|
|
||||||
|
|
||||||
|
from . import views
|
||||||
|
from dj2.settings import dbName as schemaName
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
path('xadmin/', admin.site.urls),
|
||||||
|
path(r'index/',views.index),
|
||||||
|
re_path(r'admin/lib/(?P<p1>.*)/(?P<p2>.*)$', views.admin_lib2),
|
||||||
|
re_path(r'admin/lib/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)$', views.admin_lib3),
|
||||||
|
re_path(r'admin/lib/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)/(?P<p4>.*)$', views.admin_lib4),
|
||||||
|
re_path(r'admin/page/(?P<p1>.*)$', views.admin_page),
|
||||||
|
re_path(r'admin/page/(?P<p1>.*)/(?P<p2>.*)$', views.admin_page2),
|
||||||
|
re_path(r'admin/pages/(?P<p1>.*)$', views.admin_pages),
|
||||||
|
re_path(r'admin/pages/(?P<p1>.*)/(?P<p2>.*)$', views.admin_pages2),
|
||||||
|
|
||||||
|
re_path(r'front/(?P<p1>.*)$', views.schema_front1),
|
||||||
|
re_path(r'front/(?P<p1>.*)/(?P<p2>.*)$', views.schema_front2),
|
||||||
|
re_path(r'front/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)$', views.schema_front3),
|
||||||
|
re_path(r'front/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)/(?P<p4>.*)$', views.schema_front4),
|
||||||
|
re_path(r'{}/front/(?P<p1>.*)$'.format(schemaName), views.schema_front1),
|
||||||
|
re_path(r'{}/front/(?P<p1>.*)/(?P<p2>.*)$'.format(schemaName), views.schema_front2),
|
||||||
|
re_path(r'{}/front/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)$'.format(schemaName), views.schema_front3),
|
||||||
|
re_path(r'{}/front/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)/(?P<p4>.*)$'.format(schemaName), views.schema_front4),
|
||||||
|
# re_path(r'assets/(?P<p1>.*)$', views.assets1),
|
||||||
|
# re_path(r'assets/(?P<p1>.*)/(?P<p2>.*)$', views.assets2),
|
||||||
|
# re_path(r'assets/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)$', views.assets3),
|
||||||
|
# re_path(r'assets/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)/(?P<p4>.*)$', views.assets4),
|
||||||
|
#re_path(r'admin/(?P<p1>.*)$', views.admin_file1),
|
||||||
|
re_path(r'admin/(?P<p1>.*)/(?P<p2>.*)$', views.admin_file2),
|
||||||
|
re_path(r'admin/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)$', views.admin_file3),
|
||||||
|
re_path(r'admin/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)/(?P<p4>.*)$', views.admin_file4),
|
||||||
|
re_path(r'layui/(?P<p1>.*)$', views.layui1),
|
||||||
|
re_path(r'layui/(?P<p1>.*)/(?P<p2>.*)$', views.layui2),
|
||||||
|
re_path(r'layui/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)$', views.layui3),
|
||||||
|
re_path(r'layui/(?P<p1>.*)/(?P<p2>.*)/(?P<p3>.*)/(?P<p4>.*)$', views.layui4),
|
||||||
|
re_path(r'pages/(?P<p1>.*)$', views.front_pages),
|
||||||
|
re_path(r'pages/(?P<p1>.*)/(?P<p2>.*)$', views.front_pages2),
|
||||||
|
# re_path(r'pages/(?P<p1>.*)$', views.front_file1),
|
||||||
|
# re_path(r'(?P<p1>css|jss|img|image|iamges|font|fonts)/(?P<p2>.*)$', views.front_file2),
|
||||||
|
re_path(r'modules/(?P<p1>.*)$', views.front_modules),
|
||||||
|
re_path(r'css/(?P<p1>.*)$', views.css1),
|
||||||
|
re_path(r'js/(?P<p1>.*)$', views.js1),
|
||||||
|
re_path(r'img/(?P<p1>.*)$', views.img1),
|
||||||
|
path(r'test/<str:p1>/',views.test),
|
||||||
|
path(r'null',views.null),
|
||||||
|
path('{}/'.format(schemaName),include('main.urls')),#导入schemaName
|
||||||
|
]
|
||||||
|
|
||||||
|
#判断admin使用vue还是jquery
|
||||||
|
if os.path.isdir(os.path.join(os.getcwd(),"templates/front/admin/dist/")):
|
||||||
|
urlpatterns.extend([
|
||||||
|
path(r'{}/admin/dist/index.html'.format(schemaName),
|
||||||
|
TemplateView.as_view(template_name='front/admin/dist/index.html')),
|
||||||
|
path(r'{}/admin/'.format(schemaName), TemplateView.as_view(template_name='front/admin/dist/index.html')),
|
||||||
|
# 以下是后台admin的url匹配规则
|
||||||
|
path(r'admin/dist/index.html'.format(schemaName),
|
||||||
|
TemplateView.as_view(template_name='front/admin/dist/index.html')),
|
||||||
|
path(r'admin/', TemplateView.as_view(template_name='front/admin/dist/index.html')),
|
||||||
|
])
|
||||||
|
else:
|
||||||
|
urlpatterns.extend([
|
||||||
|
path(r'{}/admin/index.html'.format(schemaName),
|
||||||
|
TemplateView.as_view(template_name='front/admin/index.html')),
|
||||||
|
path(r'{}/admin/'.format(schemaName), TemplateView.as_view(template_name='front/admin/index.html')),
|
||||||
|
# 以下是后台admin的url匹配规则
|
||||||
|
path(r'admin/index.html'.format(schemaName),
|
||||||
|
TemplateView.as_view(template_name='front/admin/index.html')),
|
||||||
|
path(r'admin/', TemplateView.as_view(template_name='front/admin/index.html')),
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
if os.path.isfile(os.path.join(os.getcwd(),"templates/front/index.html")):
|
||||||
|
urlpatterns.extend([
|
||||||
|
path(r'index.html', TemplateView.as_view(template_name='front/index.html')),
|
||||||
|
path(r'{}/index.html'.format(schemaName), TemplateView.as_view(template_name='front/index.html')),
|
||||||
|
path(r'{}/front/index.html'.format(schemaName), TemplateView.as_view(template_name='front/index.html')),
|
||||||
|
path(r'', TemplateView.as_view(template_name='front/index.html')),
|
||||||
|
])
|
@ -0,0 +1,963 @@
|
|||||||
|
# coding:utf-8
|
||||||
|
__author__ = "ila"
|
||||||
|
import os,sys
|
||||||
|
from django.http import JsonResponse, HttpResponse
|
||||||
|
from django.apps import apps
|
||||||
|
|
||||||
|
|
||||||
|
def index(request):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
msg = {"code": 200, "msg": "success", "data": []}
|
||||||
|
print("=================>index")
|
||||||
|
# allModels = apps.get_app_config('main').get_models()
|
||||||
|
# for m in allModels:
|
||||||
|
# print(m.__tablename__)
|
||||||
|
# print(dir(m))
|
||||||
|
# # for col in m._meta.fields:
|
||||||
|
# # print("col name============>",col.name)
|
||||||
|
# # print("col type============>",col.get_internal_type())
|
||||||
|
# print(allModels)
|
||||||
|
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def test(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
msg = {"code": 200, "msg": "success", "data": []}
|
||||||
|
print("=================>index ", p1)
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
def null(request,):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
msg = {"code": 200, "msg": "success", "data": []}
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
def check_suffix(filelName,path1):
|
||||||
|
try:
|
||||||
|
image_data = open(path1, "rb").read()
|
||||||
|
except:
|
||||||
|
image_data = "no file"
|
||||||
|
if '.js' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
elif '.jpg' in filelName or '.jpeg' in filelName or '.png' in filelName or '.gif' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="image/png")
|
||||||
|
elif '.css' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="text/css")
|
||||||
|
elif '.ttf' in filelName or '.woff' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
elif '.mp4' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
elif '.mp3' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
elif '.csv' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="application/CSV")
|
||||||
|
elif '.doc' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="application/msword")
|
||||||
|
elif '.docx' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.wordprocessingml.document")
|
||||||
|
elif '.xls' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="application/vnd.ms-excel")
|
||||||
|
elif '.xlsx' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
|
||||||
|
elif '.ppt' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="application/vnd.ms-powerpoint")
|
||||||
|
elif '.pptx' in filelName:
|
||||||
|
return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.presentationml.presentation")
|
||||||
|
else:
|
||||||
|
return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
def admin_lib2(request, p1, p2):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p2 or '.woff' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def admin_lib3(request, p1, p2, p3):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2, p3)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p3 or '.woff' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def admin_lib4(request, p1, p2, p3, p4):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2, p3, p4)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p4 or '.woff' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def admin_page(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/page/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def admin_page2(request, p1, p2):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/page/", p1, p2)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p2 or '.woff' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def admin_pages(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/pages/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def admin_pages2(request, p1, p2):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/pages/", p1, p2)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p2 or '.woff' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def admin_file1(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def admin_file2(request, p1, p2):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1, p2)
|
||||||
|
if not os.path.isfile(path1):
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/dist/", p1, p2)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p2 or '.woff' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def admin_file3(request, p1, p2, p3):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1, p2, p3)
|
||||||
|
|
||||||
|
if not os.path.isfile(path1):
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/dist/", p1, p2,p3)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p3 or '.woff' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def admin_file4(request, p1, p2, p3, p4):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1, p2, p3, p4)
|
||||||
|
if not os.path.isfile(path1):
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/admin/dist/", p1, p2,p3,p4)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p4 or '.woff' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
def front_pages(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def front_pages2(request, p1, p2):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1, p2)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p2 or '.woff' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def layui1(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def layui2(request, p1, p2):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1, p2)
|
||||||
|
print("layui2 path1========================>",path1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p2 or '.woff' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def layui3(request, p1, p2, p3):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1, p2, p3)
|
||||||
|
print("layui3 path1========================>",path1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
#
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p3 or '.woff' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def layui4(request, p1, p2, p3, p4):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1, p2, p3, p4)
|
||||||
|
print("layui4 path1========================>",path1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p4 or '.woff' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def pages1(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def pages2(request, p1, p2):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1, p2)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p2 or '.woff' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def front_file1(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def front_file2(request, p1, p2):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p2 or '.woff' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
def schema_front1(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def schema_front2(request, p1, p2):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p2 or '.woff' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def schema_front3(request, p1, p2, p3):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2, p3)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p3 or '.woff' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def schema_front4(request, p1, p2, p3, p4):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2, p3, p4)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p4 or '.woff' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
def assets1(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# elif '.map' in p1:
|
||||||
|
# return JsonResponse({})
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def assets2(request, p1, p2):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1, p2)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p2 or '.woff' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p2:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# elif '.map' in p2:
|
||||||
|
# return JsonResponse({})
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def assets3(request, p1, p2, p3):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1, p2, p3)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p3 or '.woff' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p3:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# elif '.map' in p3:
|
||||||
|
# return JsonResponse({})
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
|
||||||
|
def assets4(request, p1, p2, p3, p4):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1, p2, p3, p4)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p4 or '.woff' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p4:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# elif '.map' in p4:
|
||||||
|
# return JsonResponse({})
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
def css1(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/css/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
def js1(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/js/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
|
||||||
|
def img1(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/img/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
||||||
|
|
||||||
|
# try:
|
||||||
|
# image_data = open(path1, "rb").read()
|
||||||
|
# except:
|
||||||
|
# image_data="no file"
|
||||||
|
# if '.js' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/javascript")
|
||||||
|
# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="image/png")
|
||||||
|
# elif '.css' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="text/css")
|
||||||
|
# elif '.ttf' in p1 or '.woff' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="application/octet-stream")
|
||||||
|
# elif '.mp4' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="video/mp4")
|
||||||
|
# elif '.mp3' in p1:
|
||||||
|
# return HttpResponse(image_data, content_type="audio/mp3")
|
||||||
|
# else:
|
||||||
|
# return HttpResponse(image_data, content_type="text/html")
|
||||||
|
def front_modules(request, p1):
|
||||||
|
if request.method in ["GET", "POST"]:
|
||||||
|
fullPath = request.get_full_path()
|
||||||
|
print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)
|
||||||
|
path1 = os.path.join(os.getcwd(), "templates/front/modules/", p1)
|
||||||
|
|
||||||
|
return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
|
@ -0,0 +1,16 @@
|
|||||||
|
"""
|
||||||
|
WSGI config for dj2 project.
|
||||||
|
|
||||||
|
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||||
|
|
||||||
|
For more information on this file, see
|
||||||
|
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
|
||||||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dj2.settings")
|
||||||
|
|
||||||
|
application = get_wsgi_application()
|
@ -0,0 +1,53 @@
|
|||||||
|
# coding:utf-8
|
||||||
|
# author:ila
|
||||||
|
import click,py_compile,os
|
||||||
|
from configparser import ConfigParser
|
||||||
|
from util.configread import config_read
|
||||||
|
from util.sqlinit import Create
|
||||||
|
@click.group()
|
||||||
|
def sub():
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@click.command()
|
||||||
|
def initdb(ini="config.ini"):
|
||||||
|
dbtype, host, port, user, passwd, dbName, charset = config_read(ini)
|
||||||
|
if dbtype == 'mysql':
|
||||||
|
cm = Create(dbtype, host, port, user, passwd, dbName, charset)
|
||||||
|
cm.create_db("CREATE DATABASE IF NOT EXISTS `{}` /*!40100 DEFAULT CHARACTER SET utf8 */ ;".format(dbName))
|
||||||
|
|
||||||
|
cm.conn_close()
|
||||||
|
elif dbtype == 'mssql':
|
||||||
|
cm = Create(dbtype, host, port, user, passwd, dbName, charset)
|
||||||
|
cm.create_db("CREATE DATABASE IF NOT EXISTS `{}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;".format(dbName))
|
||||||
|
|
||||||
|
cm.conn_close()
|
||||||
|
else:
|
||||||
|
print('请修改当前面目录下的config.ini文件')
|
||||||
|
|
||||||
|
@click.command()
|
||||||
|
def initsql(ini="config.ini"):
|
||||||
|
dbtype, host, port, user, passwd, dbName, charset = config_read(ini)
|
||||||
|
if dbtype == 'mysql':
|
||||||
|
cm = Create(dbtype, host, port, user, passwd, dbName, charset)
|
||||||
|
cm.create_db("CREATE DATABASE IF NOT EXISTS `{}` /*!40100 DEFAULT CHARACTER SET utf8 */ ;".format(dbName))
|
||||||
|
with open("./db/mysql.sql", encoding="utf8") as f:
|
||||||
|
createsql = f.read()
|
||||||
|
createsql = "DROP TABLE" + createsql.split('DROP TABLE', 1)[-1]
|
||||||
|
cm.create_tables(createsql.split(';')[:-1])
|
||||||
|
cm.conn_close()
|
||||||
|
elif dbtype == 'mssql':
|
||||||
|
cm = Create(dbtype, host, port, user, passwd, dbName, charset)
|
||||||
|
cm.create_db("CREATE DATABASE IF NOT EXISTS `{}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;".format(dbName))
|
||||||
|
with open("./db/mssql.sql", encoding="utf8") as f:
|
||||||
|
createsql = f.read()
|
||||||
|
createsql = "DROP TABLE" + createsql.split('DROP TABLE', 1)[-1]
|
||||||
|
cm.create_tables(createsql.split(';')[:-1])
|
||||||
|
cm.conn_close()
|
||||||
|
else:
|
||||||
|
print('请修改当前面目录下的config.ini文件')
|
||||||
|
|
||||||
|
sub.add_command(initdb,"initdb")
|
||||||
|
sub.add_command(initsql,"initsql")
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sub()
|
@ -0,0 +1 @@
|
|||||||
|
default_app_config = 'main.apps.MainConfig'
|
@ -0,0 +1,31 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
from django.apps import apps, AppConfig
|
||||||
|
# Register your models here.
|
||||||
|
|
||||||
|
from dj2.settings import dbName as schemaName
|
||||||
|
from main.users_model import users
|
||||||
|
from main.config_model import config
|
||||||
|
|
||||||
|
try:
|
||||||
|
from main.models import *
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
# change title
|
||||||
|
admin.site.site_title = schemaName # 设置页面标题
|
||||||
|
admin.site.site_header = schemaName # 设置网站页头
|
||||||
|
admin.site.index_title = schemaName # 设置首页标语
|
||||||
|
|
||||||
|
allModels = apps.get_app_config('main').get_models()
|
||||||
|
|
||||||
|
for ind, model in enumerate(allModels):
|
||||||
|
|
||||||
|
class modelsite(admin.ModelAdmin):
|
||||||
|
list_display = []
|
||||||
|
for col in model._meta.fields:
|
||||||
|
list_display.append(col.name)
|
||||||
|
|
||||||
|
search_fields = list_display
|
||||||
|
|
||||||
|
|
||||||
|
admin.site.register(model, modelsite)
|
@ -0,0 +1,6 @@
|
|||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class MainConfig(AppConfig):
|
||||||
|
name = 'main'
|
||||||
|
verbose_name = verbose_name_plural = r'刷表模块'
|
@ -0,0 +1,21 @@
|
|||||||
|
# coding:utf-8
|
||||||
|
__author__ = "ila"
|
||||||
|
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
from .model import BaseModel
|
||||||
|
|
||||||
|
|
||||||
|
class config(BaseModel):
|
||||||
|
# id=models.BigIntegerField(verbose_name="自增id")
|
||||||
|
name = models.CharField(max_length=100, verbose_name=u'键名')
|
||||||
|
value = models.CharField(max_length=100, verbose_name=u'键值')
|
||||||
|
|
||||||
|
__tablename__ = 'config'
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
db_table = 'config'
|
||||||
|
verbose_name = verbose_name_plural = u'配置表'
|
||||||
|
|
||||||
|
# def __str__(self):
|
||||||
|
# return self.name
|
@ -0,0 +1,131 @@
|
|||||||
|
# coding:utf-8
|
||||||
|
__author__ = "ila"
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from django.http import JsonResponse
|
||||||
|
|
||||||
|
from .config_model import config
|
||||||
|
from util.codes import *
|
||||||
|
from util import message as mes
|
||||||
|
|
||||||
|
|
||||||
|
def config_page(request):
|
||||||
|
'''
|
||||||
|
获取参数信息
|
||||||
|
:return:
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code,
|
||||||
|
"data": {"currPage": 1, "totalPage": 1, "total": 1, "pageSize": 10, "list": []}}
|
||||||
|
req_dict = request.session.get('req_dict')
|
||||||
|
msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
|
||||||
|
msg['data']['pageSize'] = config.page(config, config, req_dict)
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def config_list(request):
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code,
|
||||||
|
"data": {"currPage": 1, "totalPage": 1, "total": 1, "pageSize": 10, "list": []}}
|
||||||
|
req_dict = request.session.get("req_dict")
|
||||||
|
|
||||||
|
msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
|
||||||
|
msg['data']['pageSize'] = config.page(config, config, req_dict)
|
||||||
|
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def config_info(request, id_):
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
|
||||||
|
|
||||||
|
data = config.getbyid(config, config, int(id_))
|
||||||
|
if len(data) > 0:
|
||||||
|
msg['data'] = data[0]
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def config_detail(request, id_):
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
|
||||||
|
|
||||||
|
data = config.getbyid(config, config, int(id_))
|
||||||
|
if len(data) > 0:
|
||||||
|
msg['data'] = data[0]
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def config_save(request):
|
||||||
|
'''
|
||||||
|
创建参数信息
|
||||||
|
:return:
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
|
||||||
|
|
||||||
|
req_dict = request.session.get('req_dict')
|
||||||
|
param1 = config.getbyparams(config, config, req_dict)
|
||||||
|
if param1:
|
||||||
|
msg['code'] = id_exist_code
|
||||||
|
msg['msg'] = mes.id_exist_code
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
error = config.createbyreq(config, config, req_dict)
|
||||||
|
logging.warning("save_config.res=========>{}".format(error))
|
||||||
|
if error != None:
|
||||||
|
msg['code'] = crud_error_code
|
||||||
|
msg['msg'] = error
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def config_add(request):
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
|
||||||
|
req_dict = request.session.get("req_dict")
|
||||||
|
|
||||||
|
error = config.createbyreq(config, config, req_dict)
|
||||||
|
if error != None:
|
||||||
|
msg['code'] = crud_error_code
|
||||||
|
msg['msg'] = error
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def config_update(request):
|
||||||
|
'''
|
||||||
|
更新参数信息
|
||||||
|
:return:
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
|
||||||
|
|
||||||
|
req_dict = request.session.get('req_dict')
|
||||||
|
|
||||||
|
config.updatebyparams(config, config, req_dict)
|
||||||
|
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def config_delete(request):
|
||||||
|
'''
|
||||||
|
删除参数信息
|
||||||
|
:return:
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
|
||||||
|
|
||||||
|
req_dict = request.session.get('req_dict')
|
||||||
|
config.deletes(config,
|
||||||
|
config,
|
||||||
|
req_dict.get("ids")
|
||||||
|
)
|
||||||
|
|
||||||
|
return JsonResponse(msg)
|
@ -0,0 +1,3 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
@ -0,0 +1,148 @@
|
|||||||
|
# coding:utf-8
|
||||||
|
__author__ = "ila"
|
||||||
|
|
||||||
|
import os
|
||||||
|
from django.urls import path
|
||||||
|
from main import users_v, config_v, schema_v
|
||||||
|
|
||||||
|
# from dj2.settings import dbName as schemaName
|
||||||
|
|
||||||
|
# url规则列表
|
||||||
|
urlpatterns = [
|
||||||
|
path(r'users/register', users_v.users_register),
|
||||||
|
path(r'users/login', users_v.users_login),
|
||||||
|
path(r'users/logout', users_v.users_logout),
|
||||||
|
path(r'users/session', users_v.users_session),
|
||||||
|
path(r'users/page', users_v.users_page),
|
||||||
|
path(r'users/save', users_v.users_save),
|
||||||
|
path(r'users/info/<id_>', users_v.users_info),
|
||||||
|
path(r'users/update', users_v.users_update),
|
||||||
|
path(r'users/delete', users_v.users_delete),
|
||||||
|
|
||||||
|
path(r'config/page', config_v.config_page),
|
||||||
|
path(r'config/list', config_v.config_list),
|
||||||
|
path(r'config/save', config_v.config_save),
|
||||||
|
path(r'config/add', config_v.config_add),
|
||||||
|
path(r'config/info/<id_>', config_v.config_info),
|
||||||
|
path(r'config/detail/<id_>', config_v.config_detail),
|
||||||
|
path(r'config/update', config_v.config_update),
|
||||||
|
path(r'config/delete', config_v.config_delete),
|
||||||
|
|
||||||
|
]
|
||||||
|
# main app的路径
|
||||||
|
mainDir = os.path.join(os.getcwd(), "main")
|
||||||
|
|
||||||
|
# 过滤文件的列表
|
||||||
|
excludeList = [
|
||||||
|
"schema_v.py",
|
||||||
|
"users_v.py",
|
||||||
|
"config_v.py",
|
||||||
|
]
|
||||||
|
|
||||||
|
# 循环当前目录下的py文件
|
||||||
|
|
||||||
|
view_tuple = set()
|
||||||
|
for i in os.listdir(mainDir):
|
||||||
|
if i not in excludeList and i[-5:] == "_v.py":
|
||||||
|
viewName = i[:-3] # 去掉.py后缀字符串
|
||||||
|
view_tuple.add("from main import {}".format(viewName))
|
||||||
|
|
||||||
|
# 组合成import字符串
|
||||||
|
import_str = '\n'.join(view_tuple)
|
||||||
|
# print(import_str)
|
||||||
|
exec(import_str)
|
||||||
|
|
||||||
|
for i in os.listdir(mainDir):
|
||||||
|
if i not in excludeList and i[-5:] == "_v.py":
|
||||||
|
tableName = i[:-5]
|
||||||
|
tableName = tableName.replace(" ", "").strip()
|
||||||
|
print("tableName============>", tableName, len(tableName))
|
||||||
|
|
||||||
|
urlpatterns.extend(
|
||||||
|
[
|
||||||
|
path(r'{}/register'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_register".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/login'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_login".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/logout'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_logout".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/resetPass'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_resetPass".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/session'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_session".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/default'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_default".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/page'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_page".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/autoSort'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_autoSort".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
|
||||||
|
path(r'{}/save'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_save".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/add'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_add".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/thumbsup/<id_>'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_thumbsup".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/info/<id_>'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_info".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/detail/<id_>'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_detail".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/update'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_update".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/delete'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_delete".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/vote/<id_>'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_vote".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# examrecord特定接口
|
||||||
|
if tableName.lower() == "examrecord":
|
||||||
|
urlpatterns.extend(
|
||||||
|
[
|
||||||
|
path(r'{}/groupby'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_groupby".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/deleteRecords'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_deleterecords".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# forum特定接口
|
||||||
|
if tableName.lower() == "forum":
|
||||||
|
urlpatterns.extend(
|
||||||
|
[
|
||||||
|
path(r'{}/flist'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_flist".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
path(r'{}/list/<id_>'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_list_id".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
urlpatterns.extend(
|
||||||
|
[
|
||||||
|
path(r'{}/list'.format(tableName.lower()),
|
||||||
|
eval("{}_v.{}_list".format(tableName.capitalize(), tableName.lower()))),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
urlpatterns.extend(
|
||||||
|
[
|
||||||
|
path(r'cal/<str:tableName>/<str:columnName>', schema_v.schemaName_cal),
|
||||||
|
path(r'file/download', schema_v.schemaName_file_download),
|
||||||
|
path(r'file/upload', schema_v.schemaName_file_upload),
|
||||||
|
path(r'follow/<tableName>/<columnName>/<level>/<parent>', schema_v.schemaName_follow_level),
|
||||||
|
path(r'follow/<tableName>/<columnName>', schema_v.schemaName_follow),
|
||||||
|
path(r'location', schema_v.schemaName_location),
|
||||||
|
path(r'matchFace', schema_v.schemaName_matchface),
|
||||||
|
path(r'option/<tableName>/<columnName>', schema_v.schemaName_option),
|
||||||
|
path(r'remind/<tableName>/<columnName>/<type>', schema_v.schemaName_remind_tablename_columnname_type),
|
||||||
|
# 前台提醒接口(通用接口,不需要登陆)
|
||||||
|
path(r'<tableName>/remind/<columnName>/<type>', schema_v.schemaName_tablename_remind_columnname_type),
|
||||||
|
# 后台提醒接口 (每个表的单独接口,需登录)
|
||||||
|
path(r'sh/<tableName>', schema_v.schemaName_sh),
|
||||||
|
path(r'upload/<fileName>', schema_v.schemaName_upload),
|
||||||
|
path(r'group/<tableName>/<columnName>', schema_v.schemaName_group_quyu),
|
||||||
|
path(r'value/<tableName>/<xColumnName>/<yColumnName>', schema_v.schemaName_value_quyu),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# print(urlpatterns)
|
@ -0,0 +1,22 @@
|
|||||||
|
# coding:utf-8
|
||||||
|
__author__ = "ila"
|
||||||
|
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
from .model import BaseModel
|
||||||
|
|
||||||
|
|
||||||
|
class users(BaseModel):
|
||||||
|
# id=models.BigIntegerField(verbose_name="自增id")
|
||||||
|
username = models.CharField(max_length=100, verbose_name=u'账号')
|
||||||
|
password = models.CharField(max_length=100, verbose_name=u'密码')
|
||||||
|
role = models.CharField(max_length=100, verbose_name=u'角色')
|
||||||
|
addtime = models.DateTimeField(auto_now_add=False, verbose_name=u'创建时间')
|
||||||
|
__tablename__ = 'users'
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
db_table = 'users'
|
||||||
|
verbose_name = verbose_name_plural = u'管理员表'
|
||||||
|
|
||||||
|
# def __str__(self):
|
||||||
|
# return self.username
|
@ -0,0 +1,161 @@
|
|||||||
|
# coding:utf-8
|
||||||
|
__author__ = "ila"
|
||||||
|
|
||||||
|
from django.http import JsonResponse
|
||||||
|
|
||||||
|
from .users_model import users
|
||||||
|
from util.codes import *
|
||||||
|
from util.auth import Auth
|
||||||
|
import util.message as mes
|
||||||
|
|
||||||
|
|
||||||
|
def users_login(request):
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {'code': normal_code, "msg": mes.normal_code}
|
||||||
|
req_dict = request.session.get("req_dict")
|
||||||
|
if req_dict.get('role')!=None:
|
||||||
|
del req_dict['role']
|
||||||
|
datas = users.getbyparams(users, users, req_dict)
|
||||||
|
if not datas:
|
||||||
|
msg['code'] = password_error_code
|
||||||
|
msg['msg'] = mes.password_error_code
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
req_dict['id'] = datas[0].get('id')
|
||||||
|
return Auth.authenticate(Auth, users, req_dict)
|
||||||
|
|
||||||
|
|
||||||
|
def users_register(request):
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {'code': normal_code, "msg": mes.normal_code}
|
||||||
|
req_dict = request.session.get("req_dict")
|
||||||
|
|
||||||
|
error = users.createbyreq(users, users, req_dict)
|
||||||
|
if error != None:
|
||||||
|
msg['code'] = crud_error_code
|
||||||
|
msg['msg'] = error
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def users_session(request):
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code,"msg":mes.normal_code, "data": {}}
|
||||||
|
|
||||||
|
req_dict = {"id": request.session.get('params').get("id")}
|
||||||
|
msg['data'] = users.getbyparams(users, users, req_dict)[0]
|
||||||
|
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def users_logout(request):
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {
|
||||||
|
"msg": "退出成功",
|
||||||
|
"code": 0
|
||||||
|
}
|
||||||
|
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def users_page(request):
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code,
|
||||||
|
"data": {"currPage": 1, "totalPage": 1, "total": 1, "pageSize": 10, "list": []}}
|
||||||
|
req_dict = request.session.get("req_dict")
|
||||||
|
tablename = request.session.get("tablename")
|
||||||
|
try:
|
||||||
|
__hasMessage__ = users.__hasMessage__
|
||||||
|
except:
|
||||||
|
__hasMessage__ = None
|
||||||
|
if __hasMessage__ and __hasMessage__ != "否":
|
||||||
|
|
||||||
|
if tablename != "users":
|
||||||
|
req_dict["userid"] = request.session.get("params").get("id")
|
||||||
|
if tablename == "users":
|
||||||
|
msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
|
||||||
|
msg['data']['pageSize'] = users.page(users, users, req_dict)
|
||||||
|
else:
|
||||||
|
msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
|
||||||
|
msg['data']['pageSize'] = [],1,0,0,10
|
||||||
|
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def users_info(request, id_):
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
|
||||||
|
|
||||||
|
data = users.getbyid(users, users, int(id_))
|
||||||
|
if len(data) > 0:
|
||||||
|
msg['data'] = data[0]
|
||||||
|
# 浏览点击次数
|
||||||
|
try:
|
||||||
|
__browseClick__ = users.__browseClick__
|
||||||
|
except:
|
||||||
|
__browseClick__ = None
|
||||||
|
|
||||||
|
if __browseClick__ and "clicknum" in users.getallcolumn(users, users):
|
||||||
|
click_dict = {"id": int(id_), "clicknum": str(int(data[0].get("clicknum", 0)) + 1)}
|
||||||
|
ret = users.updatebyparams(users, users, click_dict)
|
||||||
|
if ret != None:
|
||||||
|
msg['code'] = crud_error_code
|
||||||
|
msg['msg'] = ret
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def users_save(request):
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
|
||||||
|
req_dict = request.session.get("req_dict")
|
||||||
|
error = users.createbyreq(users, users, req_dict)
|
||||||
|
if error != None:
|
||||||
|
msg['code'] = crud_error_code
|
||||||
|
msg['msg'] = error
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def users_update(request):
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
|
||||||
|
req_dict = request.session.get("req_dict")
|
||||||
|
if req_dict.get("mima") and req_dict.get("password"):
|
||||||
|
if "mima" not in users.getallcolumn(users,users):
|
||||||
|
del req_dict["mima"]
|
||||||
|
if "password" not in users.getallcolumn(users,users):
|
||||||
|
del req_dict["password"]
|
||||||
|
try:
|
||||||
|
del req_dict["clicknum"]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
error = users.updatebyparams(users, users, req_dict)
|
||||||
|
if error != None:
|
||||||
|
msg['code'] = crud_error_code
|
||||||
|
msg['msg'] = error
|
||||||
|
return JsonResponse(msg)
|
||||||
|
|
||||||
|
|
||||||
|
def users_delete(request):
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
if request.method in ["POST", "GET"]:
|
||||||
|
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
|
||||||
|
req_dict = request.session.get("req_dict")
|
||||||
|
|
||||||
|
error = users.deletes(users,
|
||||||
|
users,
|
||||||
|
req_dict.get("ids")
|
||||||
|
)
|
||||||
|
if error != None:
|
||||||
|
msg['code'] = crud_error_code
|
||||||
|
msg['msg'] = error
|
||||||
|
return JsonResponse(msg)
|
@ -0,0 +1,3 @@
|
|||||||
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
# Create your views here.
|
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dj2.settings")
|
||||||
|
try:
|
||||||
|
from django.core.management import execute_from_command_line
|
||||||
|
except ImportError as exc:
|
||||||
|
raise ImportError(
|
||||||
|
"Couldn't import Django. Are you sure it's installed and "
|
||||||
|
"available on your PYTHONPATH environment variable? Did you "
|
||||||
|
"forget to activate a virtual environment?"
|
||||||
|
) from exc
|
||||||
|
execute_from_command_line(sys.argv)
|
@ -0,0 +1,5 @@
|
|||||||
|
django==2.0
|
||||||
|
django-threadlocals
|
||||||
|
pymysql
|
||||||
|
click
|
||||||
|
requests
|
@ -0,0 +1 @@
|
|||||||
|
cnpm install
|
@ -0,0 +1 @@
|
|||||||
|
cnpm run serve
|
@ -0,0 +1 @@
|
|||||||
|
cnpm run build
|
@ -0,0 +1,5 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
'@vue/cli-plugin-babel/preset'
|
||||||
|
]
|
||||||
|
}
|
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 4.7 KiB |
@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="./favicon.ico"><title>后台管理系统</title><link href="./css/app.ad7aa8d1.css" rel="preload" as="style"><link href="./css/chunk-vendors.a72b0961.css" rel="preload" as="style"><link href="./js/app.a3379f68.js" rel="preload" as="script"><link href="./js/chunk-vendors.27201129.js" rel="preload" as="script"><link href="./css/chunk-vendors.a72b0961.css" rel="stylesheet"><link href="./css/app.ad7aa8d1.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but mas-creator-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="./js/chunk-vendors.27201129.js"></script><script src="./js/app.a3379f68.js"></script></body></html>
|
@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"name": "mas-creator-admin",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"serve": "vue-cli-service serve",
|
||||||
|
"build": "vue-cli-service build",
|
||||||
|
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
|
||||||
|
"lint": "vue-cli-service lint"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"axios": "^0.19.2",
|
||||||
|
"core-js": "^3.4.4",
|
||||||
|
"echarts": "^4.6.0",
|
||||||
|
"element-ui": "^2.13.0",
|
||||||
|
"js-md5": "^0.7.3",
|
||||||
|
"print-js": "^1.5.0",
|
||||||
|
"vue": "^2.6.10",
|
||||||
|
"vue-quill-editor": "^3.0.6",
|
||||||
|
"vue-amap": "^0.5.10",
|
||||||
|
"vue-json-excel": "^0.3.0",
|
||||||
|
"vue-router": "^3.1.5"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vue/cli-plugin-babel": "^4.1.0",
|
||||||
|
"@vue/cli-plugin-eslint": "^4.1.0",
|
||||||
|
"@vue/cli-service": "^4.1.0",
|
||||||
|
"babel-eslint": "^10.0.3",
|
||||||
|
"babel-plugin-component": "^1.1.1",
|
||||||
|
"eslint": "^5.16.0",
|
||||||
|
"eslint-plugin-vue": "^5.0.0",
|
||||||
|
"node-sass": "^4.13.1",
|
||||||
|
"sass-loader": "^8.0.2",
|
||||||
|
"svg-sprite-loader": "4.1.3",
|
||||||
|
"svgo": "1.2.2",
|
||||||
|
"vue-template-compiler": "^2.6.10"
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"root": true,
|
||||||
|
"env": {
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"plugin:vue/essential",
|
||||||
|
"eslint:recommended"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"no-console": "off",
|
||||||
|
"no-unused-vars": 0,
|
||||||
|
"no-useless-escape": "off"
|
||||||
|
},
|
||||||
|
"parserOptions": {
|
||||||
|
"parser": "babel-eslint"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"> 1%",
|
||||||
|
"last 2 versions",
|
||||||
|
"not ie <= 8",
|
||||||
|
"Android >= 4.0"
|
||||||
|
]
|
||||||
|
}
|
After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
|
<title>后台管理系统</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<noscript>
|
||||||
|
<strong>We're sorry but mas-creator-admin doesn't work properly without JavaScript enabled. Please enable it to
|
||||||
|
continue.</strong>
|
||||||
|
</noscript>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -0,0 +1,30 @@
|
|||||||
|
<template>
|
||||||
|
<div id="app" class="">
|
||||||
|
<router-view></router-view>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "app",
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
*{
|
||||||
|
padding: 0;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
html,body{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
#app{
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,9 @@
|
|||||||
|
/* 改变主题色变量 */
|
||||||
|
$--color-primary: #00c292 !default;
|
||||||
|
$--color-success: #67c23a !default;
|
||||||
|
$--color-warning: #e6a23c !default;
|
||||||
|
$--color-danger: #f56c6c !default;
|
||||||
|
$--color-info: #909399 !default;
|
||||||
|
/* 改变 icon 字体路径变量,必需 */
|
||||||
|
$--font-path: '~element-ui/lib/theme-chalk/fonts';
|
||||||
|
@import "~element-ui/packages/theme-chalk/src/index";
|
@ -0,0 +1,47 @@
|
|||||||
|
.form-content {
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 10px 10px 0 10px;
|
||||||
|
}
|
||||||
|
.table-content {
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
.pagination-content {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.detail-form-content{
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 10px;
|
||||||
|
.el-input{
|
||||||
|
min-width: 200px;
|
||||||
|
max-width: 600px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bg {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.login-form {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 350px;
|
||||||
|
height: 100%;
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 0 60px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.h1 {
|
||||||
|
margin-top: 80px;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.btn-login {
|
||||||
|
margin-top: 50px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 4.1 MiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 843 B |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 2.9 KiB |