merge deploy
This commit is contained in:
commit
3ea33ec78e
|
@ -1,3 +1,4 @@
|
|||
<<<<<<< HEAD
|
||||
"""
|
||||
Django settings for NewMediaMonitoring project.
|
||||
|
||||
|
@ -161,3 +162,160 @@ try:
|
|||
from .local_settings import *
|
||||
except ImportError as e:
|
||||
pass
|
||||
=======
|
||||
"""
|
||||
Django settings for NewMediaMonitoring project.
|
||||
|
||||
Generated by 'django-admin startproject' using Django 2.1.8.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/2.1/topics/settings/
|
||||
|
||||
For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/2.1/ref/settings/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
import sys
|
||||
|
||||
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.1/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'tj5m7-ns_6x_fvn2^q+7+2fopq!#7taqv!9ai(c_45i5!%m=*z'
|
||||
|
||||
# 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',
|
||||
'django_token',
|
||||
'corsheaders',
|
||||
'bootstrap3',
|
||||
'captcha',
|
||||
'dashboard',
|
||||
'management',
|
||||
'monitor',
|
||||
'polls'
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'django_token.middleware.TokenMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'NewMediaMonitoring.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [os.path.join(BASE_DIR, 'templates')],
|
||||
'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 = 'NewMediaMonitoring.wsgi.application'
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'newmediaDB1',
|
||||
'USER': 'newmedia',
|
||||
'PASSWORD': 'newmedia2020!@#',
|
||||
'HOST': '210.77.68.250',
|
||||
'PORT': '5432',
|
||||
}
|
||||
}
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/2.1/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',
|
||||
},
|
||||
]
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
'django.contrib.auth.backends.ModelBackend',
|
||||
'django_token.backends.TokenBackend'
|
||||
)
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/2.1/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'zh-Hans'
|
||||
|
||||
TIME_ZONE = 'Asia/Shanghai'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_L10N = True
|
||||
|
||||
USE_TZ = False
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/2.1/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, "static"),
|
||||
]
|
||||
STATIC_ROOT = '/var/www/p3/newmediamonitoring/static/'
|
||||
MEDIA_URL = '/media/'
|
||||
MEDIA_ROOT = '/var/www/p3/newmediamonitoring/media/'
|
||||
|
||||
"""用户模块扩展部分"""
|
||||
AUTH_PROFILE_MODULE = 'djangoadmin.myadmin.UserProfile'
|
||||
"""用户模块扩展完成"""
|
||||
|
||||
CORS_ORIGIN_ALLOW_ALL = True
|
||||
|
||||
CORS_URLS_REGEX = r'^/polls/.*$'
|
||||
|
||||
try:
|
||||
from .local_settings import *
|
||||
except ImportError as e:
|
||||
pass
|
||||
>>>>>>> de079fade2ba5827d88d778ef9ddc443baa48da8
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
"""NewMediaMonitoring URL Configuration
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/2.1/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'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('polls/', include('polls.urls')),
|
||||
path('admin/', admin.site.urls),
|
||||
path('', include('dashboard.urls')),
|
||||
path('captcha/', include('captcha.urls')),
|
||||
path('management/', include('management.urls')),
|
||||
path('monitor/',include('monitor.urls'))
|
||||
]
|
||||
"""NewMediaMonitoring URL Configuration
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/2.1/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'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('polls/', include('polls.urls')),
|
||||
path('admin/', admin.site.urls),
|
||||
path('', include('dashboard.urls')),
|
||||
path('captcha/', include('captcha.urls')),
|
||||
path('management/', include('management.urls')),
|
||||
path('monitor/',include('monitor.urls'))
|
||||
]
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
from dashboard.models import Userprofile, Organization, Group, Level, Organizationtype, Group_type, Weixin_data
|
||||
|
||||
|
||||
class UserProfileAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
|
||||
|
||||
admin.site.register(Userprofile,UserProfileAdmin)
|
||||
|
||||
class OrganizationAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
|
||||
|
||||
admin.site.register(Organization,OrganizationAdmin)
|
||||
class GroupAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
admin.site.register(Group,GroupAdmin)
|
||||
|
||||
class LevelAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
admin.site.register(Level,LevelAdmin)
|
||||
class OrganizationtypeAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
admin.site.register(Organizationtype,OrganizationtypeAdmin)
|
||||
class Group_typeAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
admin.site.register(Group_type,Group_typeAdmin)
|
||||
class Weixin_data_typeAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
admin.site.register(Weixin_data,Weixin_data_typeAdmin)
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
from dashboard.models import Userprofile, Organization, Group, Level, Organizationtype, Group_type, Weixin_data
|
||||
|
||||
|
||||
class UserProfileAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
|
||||
|
||||
admin.site.register(Userprofile,UserProfileAdmin)
|
||||
|
||||
class OrganizationAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
|
||||
|
||||
admin.site.register(Organization,OrganizationAdmin)
|
||||
class GroupAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
admin.site.register(Group,GroupAdmin)
|
||||
|
||||
class LevelAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
admin.site.register(Level,LevelAdmin)
|
||||
class OrganizationtypeAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
admin.site.register(Organizationtype,OrganizationtypeAdmin)
|
||||
class Group_typeAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
admin.site.register(Group_type,Group_typeAdmin)
|
||||
class Weixin_data_typeAdmin(admin.ModelAdmin):
|
||||
list_display = ('id',)
|
||||
admin.site.register(Weixin_data,Weixin_data_typeAdmin)
|
||||
|
|
|
@ -1,359 +1,359 @@
|
|||
import uuid
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import models
|
||||
|
||||
# 权限等级
|
||||
class Level(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
name = models.CharField('等级名', max_length=256, null=True, blank=True)
|
||||
level = models.IntegerField('级别', blank=True, null=True,default=0)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
# Create your models here.
|
||||
class Group_type(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
type = models.CharField('群组类型',max_length=256,null=True,blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.type
|
||||
# 群组
|
||||
class Group(models.Model):
|
||||
GROUP_STATUS_CHOICES = (
|
||||
('0','关闭'),
|
||||
('1','开启')
|
||||
)
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
name = models.CharField('群组名称', max_length=256, null=True, blank=True)
|
||||
presentation = models.TextField('群组描述', null=True, blank=True)
|
||||
image = models.FileField(upload_to='groupimage', null=True, blank=True)
|
||||
type = models.ForeignKey(Group_type,on_delete=models.CASCADE,null=True,blank=True)
|
||||
status = models.CharField('状态',max_length=256,null=True,blank=True,choices=GROUP_STATUS_CHOICES)
|
||||
province = models.CharField('省', max_length=256, null=True, blank=True)
|
||||
cities = models.CharField('市', max_length=256, null=True, blank=True)
|
||||
district = models.CharField('县', max_length=256, null=True, blank=True)
|
||||
town = models.CharField('乡', max_length=256, null=True, blank=True)
|
||||
village = models.CharField('村', max_length=256, null=True, blank=True)
|
||||
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
#群组管理员
|
||||
class Group_admin(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True)
|
||||
group = models.ForeignKey(Group, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.group.name
|
||||
#群组成员
|
||||
class Group_user(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True)
|
||||
group = models.ForeignKey(Group, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.user.username
|
||||
|
||||
#单位类型
|
||||
class Organizationtype(models.Model):
|
||||
id = models.UUIDField('id',primary_key=True,default=uuid.uuid4)
|
||||
organizationtype = models.CharField('单位类型',blank=True,null=True,max_length=256)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.organizationtype
|
||||
|
||||
|
||||
# 单位
|
||||
class Organization(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
name = models.CharField('单位名', max_length=256, null=True, blank=True)
|
||||
image = models.FileField(upload_to='cover', null=True, blank=True)
|
||||
organizationtype = models.ForeignKey(Organizationtype,on_delete=models.CASCADE, null=True, blank=True)
|
||||
province = models.CharField('省',max_length=256,null=True,blank=True)
|
||||
cities = models.CharField('市',max_length=256,null=True,blank=True)
|
||||
district = models.CharField('县',max_length=256,null=True,blank=True)
|
||||
town = models.CharField('乡',max_length=256,null=True,blank=True)
|
||||
village = models.CharField('村',max_length=256,null=True,blank=True)
|
||||
# group = models.ForeignKey(Group, on_delete=models.CASCADE, null=True, blank=True)
|
||||
# level = models.ForeignKey(Level,on_delete=models.CASCADE,null=True,blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
# 扩展用户表
|
||||
class Userprofile(models.Model):
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
name = models.CharField('姓名', null=True, blank=True, max_length=256)
|
||||
sex = models.CharField('性别', null=True, blank=True, max_length=256)
|
||||
image = models.FileField(upload_to='profile', null=True, blank=True)
|
||||
organization = models.ForeignKey(Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
#用户状态:注册进来默认为0,为未审核状态,审核后status=1
|
||||
status = models.IntegerField('用户状态',null=True,blank=True,default=0)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return self.user.username
|
||||
|
||||
|
||||
def create_user_profile(sender, instance, created, **kwargs):
|
||||
"""Create the UserProfile when a new User is saved"""
|
||||
if created:
|
||||
profile = Userprofile()
|
||||
profile.user = instance
|
||||
profile.save()
|
||||
|
||||
|
||||
# 微信公众号
|
||||
class Weixin(models.Model):
|
||||
WEIXIN_STATUS_CHOICES = (
|
||||
('1', '开启'),
|
||||
('0', '关闭')
|
||||
)
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
code = models.CharField('微信公众号', max_length=256, null=True, blank=True)
|
||||
weixinid = models.CharField('微信ID',max_length=256,null=True,blank=True)
|
||||
alias = models.CharField('别名',max_length=256,null=True,blank=True)
|
||||
image = models.FileField(upload_to='cover', null=True, blank=True)
|
||||
organization = models.ForeignKey(Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
status = models.CharField('状态',max_length=256,null=True,blank=True,choices=WEIXIN_STATUS_CHOICES)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.code
|
||||
|
||||
|
||||
# 微信文章采集
|
||||
class Weixin_data(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
title = models.CharField('文章标题', max_length=256, null=True, blank=True)
|
||||
site = models.CharField('位置', max_length=256, null=True, blank=True)
|
||||
date = models.CharField('发文时间', max_length=256, null=True, blank=True)
|
||||
original = models.BooleanField('是否原创', null=True, blank=True)
|
||||
url = models.CharField('文章链接', max_length=256, null=True, blank=True)
|
||||
author = models.CharField('作者', max_length=256, null=True, blank=True)
|
||||
comment = models.CharField('评论数', max_length=256, null=True, blank=True)
|
||||
reply = models.CharField('作者回复数', max_length=256, null=True, blank=True)
|
||||
content = models.TextField('正文', null=True, blank=True)
|
||||
weixin = models.ForeignKey(Weixin, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
|
||||
# 微信评论
|
||||
class Weixin_comment(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
comment = models.TextField('评论', null=True, blank=True)
|
||||
user = models.CharField('用户', max_length=256, null=True, blank=True)
|
||||
reply = models.TextField('回复', null=True, blank=True)
|
||||
weixin = models.ForeignKey(Weixin, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.user
|
||||
|
||||
|
||||
# 微信错别字
|
||||
class Weixin_Wrong(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
wrong = models.CharField('错别字', max_length=256, null=True, blank=True)
|
||||
idea = models.CharField('建议', max_length=256, null=True, blank=True)
|
||||
site = models.CharField('位置', max_length=256, null=True, blank=True)
|
||||
weixin = models.ForeignKey(Weixin, on_delete=models.CASCADE, null=True, blank=True)
|
||||
change = models.BooleanField('是否已修改', null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.wrong
|
||||
|
||||
|
||||
# 微博
|
||||
class Weibo(models.Model):
|
||||
WEIBO_STATUS_CHOICES = (
|
||||
('1', '开启'),
|
||||
('0', '关闭')
|
||||
)
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
code = models.CharField('微博号', max_length=256, null=True, blank=True)
|
||||
weiboid = models.CharField('微博ID', max_length=256, null=True, blank=True)
|
||||
alias = models.CharField('别名', max_length=256, null=True, blank=True)
|
||||
image = models.FileField(upload_to='cover', null=True, blank=True)
|
||||
organization = models.ForeignKey(Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
status = models.CharField('状态', max_length=256, null=True, blank=True, choices=WEIBO_STATUS_CHOICES)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.code
|
||||
|
||||
|
||||
# 微博文章采集
|
||||
class Weibo_data(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
weiboid = models.CharField('微博ID', max_length=256, null=True, blank=True)
|
||||
content = models.TextField('正文', null=True, blank=True)
|
||||
url = models.CharField('文章url', max_length=256, null=True, blank=True)
|
||||
originalimageurl = models.CharField('原始图片url', max_length=256, null=True, blank=True)
|
||||
transpondimageurl = models.CharField('转发图片url', max_length=256, null=True, blank=True)
|
||||
original = models.BooleanField('是否原创', null=True, blank=True)
|
||||
site = models.CharField('发布位置', max_length=256, null=True, blank=True)
|
||||
date = models.CharField('发布时间', max_length=256, null=True, blank=True)
|
||||
tool = models.CharField('发布工具', max_length=256, null=True, blank=True)
|
||||
like = models.CharField('点赞数', max_length=256, null=True, blank=True)
|
||||
transpond = models.CharField('转发数', max_length=256, null=True, blank=True)
|
||||
comment = models.CharField('评论数', max_length=256, null=True, blank=True)
|
||||
title = models.CharField('文章标题', max_length=256, null=True, blank=True)
|
||||
weibo = models.ForeignKey(Weibo, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
|
||||
# 微博错别字
|
||||
class Weibo_Wrong(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
wrong = models.CharField('错别字', max_length=256, null=True, blank=True)
|
||||
idea = models.CharField('建议', max_length=256, null=True, blank=True)
|
||||
site = models.CharField('位置', max_length=256, null=True, blank=True)
|
||||
weibo = models.ForeignKey(Weibo, on_delete=models.CASCADE, null=True, blank=True)
|
||||
change = models.BooleanField('是否已修改', null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
|
||||
# 今日头条
|
||||
class Toutiao(models.Model):
|
||||
TOUTIAO_STATUS_CHOICES = (
|
||||
('1', '开启'),
|
||||
('0', '关闭')
|
||||
)
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
code = models.CharField('头条号', max_length=256, null=True, blank=True)
|
||||
toutiaoid = models.CharField('头条ID', max_length=256, null=True, blank=True)
|
||||
alias = models.CharField('别名', max_length=256, null=True, blank=True)
|
||||
image = models.FileField(upload_to='cover', null=True, blank=True)
|
||||
organization = models.ForeignKey(Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
status = models.CharField('状态', max_length=256, null=True, blank=True, choices=TOUTIAO_STATUS_CHOICES)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.code
|
||||
|
||||
|
||||
# 今日头条数据
|
||||
class Toutiao_data(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
title = models.CharField('标题', max_length=256, null=True, blank=True)
|
||||
url = models.CharField('链接', max_length=256, null=True, blank=True)
|
||||
img = models.CharField('缩略图', max_length=256, null=True, blank=True)
|
||||
count = models.CharField('阅读数', max_length=256, null=True, blank=True)
|
||||
commentcount = models.CharField('评论数', max_length=256, null=True, blank=True)
|
||||
reply = models.CharField('作者回复数', max_length=256, null=True, blank=True)
|
||||
date = models.CharField('时间', max_length=256, null=True, blank=True)
|
||||
content = models.TextField('正文', null=True, blank=True)
|
||||
comment = models.TextField('评论', null=True, blank=True)
|
||||
toutiao = models.ForeignKey(Toutiao, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
|
||||
# 今日头条评论
|
||||
class Toutiao_comment(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
comment = models.TextField('评论', null=True, blank=True)
|
||||
user = models.CharField('用户', max_length=256, null=True, blank=True)
|
||||
reply = models.TextField('回复', null=True, blank=True)
|
||||
toutiao = models.ForeignKey(Toutiao, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.user
|
||||
|
||||
|
||||
# 今日头条错别字
|
||||
class Toutiao_Wrong(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
wrong = models.CharField('错别字', max_length=256, null=True, blank=True)
|
||||
idea = models.CharField('建议', max_length=256, null=True, blank=True)
|
||||
site = models.CharField('位置', max_length=256, null=True, blank=True)
|
||||
toutiao = models.ForeignKey(Toutiao, on_delete=models.CASCADE, null=True, blank=True)
|
||||
change = models.BooleanField('是否已修改', null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.wrong
|
||||
|
||||
|
||||
# 其他新媒体
|
||||
class Qita(models.Model):
|
||||
QITA_STATUS_CHOICES = (
|
||||
('1', '开启'),
|
||||
('0', '关闭')
|
||||
)
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
type = models.CharField('新媒体类型', max_length=256, null=True, blank=True)
|
||||
name = models.CharField('新媒体名称', max_length=256, null=True, blank=True)
|
||||
qitaid = models.CharField('新媒体ID', max_length=256, null=True, blank=True)
|
||||
alias = models.CharField('别名', max_length=256, null=True, blank=True)
|
||||
image = models.FileField(upload_to='cover', null=True, blank=True)
|
||||
organization = models.ForeignKey(Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
status = models.CharField('状态', max_length=256, null=True, blank=True, choices=QITA_STATUS_CHOICES)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
#其他新媒体监测
|
||||
class Qita_jc(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
mewnedia = models.ForeignKey(Qita,on_delete=models.CASCADE)
|
||||
count = models.CharField('总发文量', max_length=256, null=True, blank=True)
|
||||
count_jc = models.CharField('监测时间内发文量', max_length=256, null=True, blank=True)
|
||||
comment = models.CharField('评论数', max_length=256, null=True, blank=True)
|
||||
reply = models.CharField('作者回复数', max_length=256, null=True, blank=True)
|
||||
date = models.CharField('最近发文日期', max_length=256, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.mewnedia.name
|
||||
#5级地名库
|
||||
class Area_code_2020(models.Model):
|
||||
code = models.CharField('区划代码',max_length=256,null=True,blank=True)
|
||||
name = models.CharField('名称',max_length=256,null=True,blank=True)
|
||||
level = models.CharField('级别1-5,省市县镇村',max_length=256,null=True,blank=True)
|
||||
pcode = models.CharField('父级区划代码',max_length=256,null=True,blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
import uuid
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import models
|
||||
|
||||
# 权限等级
|
||||
class Level(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
name = models.CharField('等级名', max_length=256, null=True, blank=True)
|
||||
level = models.IntegerField('级别', blank=True, null=True,default=0)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
# Create your models here.
|
||||
class Group_type(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
type = models.CharField('群组类型',max_length=256,null=True,blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.type
|
||||
# 群组
|
||||
class Group(models.Model):
|
||||
GROUP_STATUS_CHOICES = (
|
||||
('0','关闭'),
|
||||
('1','开启')
|
||||
)
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
name = models.CharField('群组名称', max_length=256, null=True, blank=True)
|
||||
presentation = models.TextField('群组描述', null=True, blank=True)
|
||||
image = models.FileField(upload_to='groupimage', null=True, blank=True)
|
||||
type = models.ForeignKey(Group_type,on_delete=models.CASCADE,null=True,blank=True)
|
||||
status = models.CharField('状态',max_length=256,null=True,blank=True,choices=GROUP_STATUS_CHOICES)
|
||||
province = models.CharField('省', max_length=256, null=True, blank=True)
|
||||
cities = models.CharField('市', max_length=256, null=True, blank=True)
|
||||
district = models.CharField('县', max_length=256, null=True, blank=True)
|
||||
town = models.CharField('乡', max_length=256, null=True, blank=True)
|
||||
village = models.CharField('村', max_length=256, null=True, blank=True)
|
||||
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
#群组管理员
|
||||
class Group_admin(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True)
|
||||
group = models.ForeignKey(Group, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.group.name
|
||||
#群组成员
|
||||
class Group_user(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True)
|
||||
group = models.ForeignKey(Group, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.user.username
|
||||
|
||||
#单位类型
|
||||
class Organizationtype(models.Model):
|
||||
id = models.UUIDField('id',primary_key=True,default=uuid.uuid4)
|
||||
organizationtype = models.CharField('单位类型',blank=True,null=True,max_length=256)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.organizationtype
|
||||
|
||||
|
||||
# 单位
|
||||
class Organization(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
name = models.CharField('单位名', max_length=256, null=True, blank=True)
|
||||
image = models.FileField(upload_to='cover', null=True, blank=True)
|
||||
organizationtype = models.ForeignKey(Organizationtype,on_delete=models.CASCADE, null=True, blank=True)
|
||||
province = models.CharField('省',max_length=256,null=True,blank=True)
|
||||
cities = models.CharField('市',max_length=256,null=True,blank=True)
|
||||
district = models.CharField('县',max_length=256,null=True,blank=True)
|
||||
town = models.CharField('乡',max_length=256,null=True,blank=True)
|
||||
village = models.CharField('村',max_length=256,null=True,blank=True)
|
||||
# group = models.ForeignKey(Group, on_delete=models.CASCADE, null=True, blank=True)
|
||||
# level = models.ForeignKey(Level,on_delete=models.CASCADE,null=True,blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
# 扩展用户表
|
||||
class Userprofile(models.Model):
|
||||
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
name = models.CharField('姓名', null=True, blank=True, max_length=256)
|
||||
sex = models.CharField('性别', null=True, blank=True, max_length=256)
|
||||
image = models.FileField(upload_to='profile', null=True, blank=True)
|
||||
organization = models.ForeignKey(Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
#用户状态:注册进来默认为0,为未审核状态,审核后status=1
|
||||
status = models.IntegerField('用户状态',null=True,blank=True,default=0)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return self.user.username
|
||||
|
||||
|
||||
def create_user_profile(sender, instance, created, **kwargs):
|
||||
"""Create the UserProfile when a new User is saved"""
|
||||
if created:
|
||||
profile = Userprofile()
|
||||
profile.user = instance
|
||||
profile.save()
|
||||
|
||||
|
||||
# 微信公众号
|
||||
class Weixin(models.Model):
|
||||
WEIXIN_STATUS_CHOICES = (
|
||||
('1', '开启'),
|
||||
('0', '关闭')
|
||||
)
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
code = models.CharField('微信公众号', max_length=256, null=True, blank=True)
|
||||
weixinid = models.CharField('微信ID',max_length=256,null=True,blank=True)
|
||||
alias = models.CharField('别名',max_length=256,null=True,blank=True)
|
||||
image = models.FileField(upload_to='cover', null=True, blank=True)
|
||||
organization = models.ForeignKey(Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
status = models.CharField('状态',max_length=256,null=True,blank=True,choices=WEIXIN_STATUS_CHOICES)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.code
|
||||
|
||||
|
||||
# 微信文章采集
|
||||
class Weixin_data(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
title = models.CharField('文章标题', max_length=256, null=True, blank=True)
|
||||
site = models.CharField('位置', max_length=256, null=True, blank=True)
|
||||
date = models.CharField('发文时间', max_length=256, null=True, blank=True)
|
||||
original = models.BooleanField('是否原创', null=True, blank=True)
|
||||
url = models.CharField('文章链接', max_length=256, null=True, blank=True)
|
||||
author = models.CharField('作者', max_length=256, null=True, blank=True)
|
||||
comment = models.CharField('评论数', max_length=256, null=True, blank=True)
|
||||
reply = models.CharField('作者回复数', max_length=256, null=True, blank=True)
|
||||
content = models.TextField('正文', null=True, blank=True)
|
||||
weixin = models.ForeignKey(Weixin, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
|
||||
# 微信评论
|
||||
class Weixin_comment(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
comment = models.TextField('评论', null=True, blank=True)
|
||||
user = models.CharField('用户', max_length=256, null=True, blank=True)
|
||||
reply = models.TextField('回复', null=True, blank=True)
|
||||
weixin = models.ForeignKey(Weixin, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.user
|
||||
|
||||
|
||||
# 微信错别字
|
||||
class Weixin_Wrong(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
wrong = models.CharField('错别字', max_length=256, null=True, blank=True)
|
||||
idea = models.CharField('建议', max_length=256, null=True, blank=True)
|
||||
site = models.CharField('位置', max_length=256, null=True, blank=True)
|
||||
weixin = models.ForeignKey(Weixin, on_delete=models.CASCADE, null=True, blank=True)
|
||||
change = models.BooleanField('是否已修改', null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.wrong
|
||||
|
||||
|
||||
# 微博
|
||||
class Weibo(models.Model):
|
||||
WEIBO_STATUS_CHOICES = (
|
||||
('1', '开启'),
|
||||
('0', '关闭')
|
||||
)
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
code = models.CharField('微博号', max_length=256, null=True, blank=True)
|
||||
weiboid = models.CharField('微博ID', max_length=256, null=True, blank=True)
|
||||
alias = models.CharField('别名', max_length=256, null=True, blank=True)
|
||||
image = models.FileField(upload_to='cover', null=True, blank=True)
|
||||
organization = models.ForeignKey(Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
status = models.CharField('状态', max_length=256, null=True, blank=True, choices=WEIBO_STATUS_CHOICES)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.code
|
||||
|
||||
|
||||
# 微博文章采集
|
||||
class Weibo_data(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
weiboid = models.CharField('微博ID', max_length=256, null=True, blank=True)
|
||||
content = models.TextField('正文', null=True, blank=True)
|
||||
url = models.CharField('文章url', max_length=256, null=True, blank=True)
|
||||
originalimageurl = models.CharField('原始图片url', max_length=256, null=True, blank=True)
|
||||
transpondimageurl = models.CharField('转发图片url', max_length=256, null=True, blank=True)
|
||||
original = models.BooleanField('是否原创', null=True, blank=True)
|
||||
site = models.CharField('发布位置', max_length=256, null=True, blank=True)
|
||||
date = models.CharField('发布时间', max_length=256, null=True, blank=True)
|
||||
tool = models.CharField('发布工具', max_length=256, null=True, blank=True)
|
||||
like = models.CharField('点赞数', max_length=256, null=True, blank=True)
|
||||
transpond = models.CharField('转发数', max_length=256, null=True, blank=True)
|
||||
comment = models.CharField('评论数', max_length=256, null=True, blank=True)
|
||||
title = models.CharField('文章标题', max_length=256, null=True, blank=True)
|
||||
weibo = models.ForeignKey(Weibo, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
|
||||
# 微博错别字
|
||||
class Weibo_Wrong(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
wrong = models.CharField('错别字', max_length=256, null=True, blank=True)
|
||||
idea = models.CharField('建议', max_length=256, null=True, blank=True)
|
||||
site = models.CharField('位置', max_length=256, null=True, blank=True)
|
||||
weibo = models.ForeignKey(Weibo, on_delete=models.CASCADE, null=True, blank=True)
|
||||
change = models.BooleanField('是否已修改', null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
|
||||
# 今日头条
|
||||
class Toutiao(models.Model):
|
||||
TOUTIAO_STATUS_CHOICES = (
|
||||
('1', '开启'),
|
||||
('0', '关闭')
|
||||
)
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
code = models.CharField('头条号', max_length=256, null=True, blank=True)
|
||||
toutiaoid = models.CharField('头条ID', max_length=256, null=True, blank=True)
|
||||
alias = models.CharField('别名', max_length=256, null=True, blank=True)
|
||||
image = models.FileField(upload_to='cover', null=True, blank=True)
|
||||
organization = models.ForeignKey(Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
status = models.CharField('状态', max_length=256, null=True, blank=True, choices=TOUTIAO_STATUS_CHOICES)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.code
|
||||
|
||||
|
||||
# 今日头条数据
|
||||
class Toutiao_data(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
title = models.CharField('标题', max_length=256, null=True, blank=True)
|
||||
url = models.CharField('链接', max_length=256, null=True, blank=True)
|
||||
img = models.CharField('缩略图', max_length=256, null=True, blank=True)
|
||||
count = models.CharField('阅读数', max_length=256, null=True, blank=True)
|
||||
commentcount = models.CharField('评论数', max_length=256, null=True, blank=True)
|
||||
reply = models.CharField('作者回复数', max_length=256, null=True, blank=True)
|
||||
date = models.CharField('时间', max_length=256, null=True, blank=True)
|
||||
content = models.TextField('正文', null=True, blank=True)
|
||||
comment = models.TextField('评论', null=True, blank=True)
|
||||
toutiao = models.ForeignKey(Toutiao, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
|
||||
# 今日头条评论
|
||||
class Toutiao_comment(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
comment = models.TextField('评论', null=True, blank=True)
|
||||
user = models.CharField('用户', max_length=256, null=True, blank=True)
|
||||
reply = models.TextField('回复', null=True, blank=True)
|
||||
toutiao = models.ForeignKey(Toutiao, on_delete=models.CASCADE, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.user
|
||||
|
||||
|
||||
# 今日头条错别字
|
||||
class Toutiao_Wrong(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
wrong = models.CharField('错别字', max_length=256, null=True, blank=True)
|
||||
idea = models.CharField('建议', max_length=256, null=True, blank=True)
|
||||
site = models.CharField('位置', max_length=256, null=True, blank=True)
|
||||
toutiao = models.ForeignKey(Toutiao, on_delete=models.CASCADE, null=True, blank=True)
|
||||
change = models.BooleanField('是否已修改', null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.wrong
|
||||
|
||||
|
||||
# 其他新媒体
|
||||
class Qita(models.Model):
|
||||
QITA_STATUS_CHOICES = (
|
||||
('1', '开启'),
|
||||
('0', '关闭')
|
||||
)
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
type = models.CharField('新媒体类型', max_length=256, null=True, blank=True)
|
||||
name = models.CharField('新媒体名称', max_length=256, null=True, blank=True)
|
||||
qitaid = models.CharField('新媒体ID', max_length=256, null=True, blank=True)
|
||||
alias = models.CharField('别名', max_length=256, null=True, blank=True)
|
||||
image = models.FileField(upload_to='cover', null=True, blank=True)
|
||||
organization = models.ForeignKey(Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
status = models.CharField('状态', max_length=256, null=True, blank=True, choices=QITA_STATUS_CHOICES)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
#其他新媒体监测
|
||||
class Qita_jc(models.Model):
|
||||
id = models.UUIDField('id', primary_key=True, default=uuid.uuid4)
|
||||
mewnedia = models.ForeignKey(Qita,on_delete=models.CASCADE)
|
||||
count = models.CharField('总发文量', max_length=256, null=True, blank=True)
|
||||
count_jc = models.CharField('监测时间内发文量', max_length=256, null=True, blank=True)
|
||||
comment = models.CharField('评论数', max_length=256, null=True, blank=True)
|
||||
reply = models.CharField('作者回复数', max_length=256, null=True, blank=True)
|
||||
date = models.CharField('最近发文日期', max_length=256, null=True, blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.mewnedia.name
|
||||
#5级地名库
|
||||
class Area_code_2020(models.Model):
|
||||
code = models.CharField('区划代码',max_length=256,null=True,blank=True)
|
||||
name = models.CharField('名称',max_length=256,null=True,blank=True)
|
||||
level = models.CharField('级别1-5,省市县镇村',max_length=256,null=True,blank=True)
|
||||
pcode = models.CharField('父级区划代码',max_length=256,null=True,blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
|
@ -1,383 +1,383 @@
|
|||
{% load static %}
|
||||
<div class='page-topbar '>
|
||||
<div class='logo-area'>
|
||||
|
||||
</div>
|
||||
<div class='quick-area'>
|
||||
<div class='pull-left'>
|
||||
<ul class="info-menu left-links list-inline list-unstyled">
|
||||
<li class="sidebar-toggle-wrap">
|
||||
<a href="#" data-toggle="sidebar" class="sidebar_toggle">
|
||||
<i class="fa fa-bars"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="#" data-toggle="dropdown" class="toggle">
|
||||
<i class="fa fa-envelope"></i>
|
||||
<span class="badge badge-primary">7</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu messages animated fadeIn">
|
||||
|
||||
<li class="list">
|
||||
|
||||
<ul class="dropdown-menu-list list-unstyled ps-scrollbar">
|
||||
<li class="unread status-available">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-1.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Clarine Vassar</strong>
|
||||
<span class="time small">- 15 mins ago</span>
|
||||
<span class="profile-status available pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-away">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-2.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Brooks Latshaw</strong>
|
||||
<span class="time small">- 45 mins ago</span>
|
||||
<span class="profile-status away pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-busy">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-3.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Clementina Brodeur</strong>
|
||||
<span class="time small">- 1 hour ago</span>
|
||||
<span class="profile-status busy pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-offline">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-4.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Carri Busey</strong>
|
||||
<span class="time small">- 5 hours ago</span>
|
||||
<span class="profile-status offline pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-offline">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-5.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Melissa Dock</strong>
|
||||
<span class="time small">- Yesterday</span>
|
||||
<span class="profile-status offline pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-available">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-1.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Verdell Rea</strong>
|
||||
<span class="time small">- 14th Mar</span>
|
||||
<span class="profile-status available pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-busy">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-2.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Linette Lheureux</strong>
|
||||
<span class="time small">- 16th Mar</span>
|
||||
<span class="profile-status busy pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-away">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-3.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Araceli Boatright</strong>
|
||||
<span class="time small">- 16th Mar</span>
|
||||
<span class="profile-status away pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="external">
|
||||
<a href="javascript:;">
|
||||
<span>Read All Messages</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="#" data-toggle="dropdown" class="toggle">
|
||||
<i class="fa fa-bell"></i>
|
||||
<span class="badge badge-orange">3</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu notifications animated fadeIn">
|
||||
<li class="total">
|
||||
<span class="small">
|
||||
You have <strong>3</strong> new notifications.
|
||||
<a href="javascript:;" class="pull-right">Mark all as Read</a>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list">
|
||||
|
||||
<ul class="dropdown-menu-list list-unstyled ps-scrollbar">
|
||||
<li class="unread available"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-check"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Server needs to reboot</strong>
|
||||
<span class="time small">15 mins ago</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="unread away"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>45 new messages</strong>
|
||||
<span class="time small">45 mins ago</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" busy"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-times"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Server IP Blocked</strong>
|
||||
<span class="time small">1 hour ago</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" offline"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-user"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>10 Orders Shipped</strong>
|
||||
<span class="time small">5 hours ago</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" offline"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-user"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>New Comment on blog</strong>
|
||||
<span class="time small">Yesterday</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" available"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-check"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Great Speed Notify</strong>
|
||||
<span class="time small">14th Mar</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" busy"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-times"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Team Meeting at 6PM</strong>
|
||||
<span class="time small">16th Mar</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="external">
|
||||
<a href="javascript:;">
|
||||
<span>Read All Notifications</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="hidden-sm hidden-xs searchform">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon input-focus">
|
||||
<i class="fa fa-search"></i>
|
||||
</span>
|
||||
<form action="search-page.html" method="post">
|
||||
<input type="text" class="form-control animated fadeIn" placeholder="Search & Enter">
|
||||
<input type='submit' value="">
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='pull-right'>
|
||||
{% if user.is_authenticated %}
|
||||
<ul class="info-menu right-links list-inline list-unstyled">
|
||||
<li class="profile">
|
||||
|
||||
<a href="#" data-toggle="dropdown" class="toggle">
|
||||
{% for u in user.userprofile_set.all %}
|
||||
|
||||
<img src="{{ u.image.url }}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
{% endfor %}
|
||||
<span><i class="fa fa-angle-down"></i></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu profile animated fadeIn">
|
||||
<li>
|
||||
<a href="#settings">
|
||||
<i class="fa fa-wrench"></i>
|
||||
Settings
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#profile">
|
||||
<i class="fa fa-user"></i>
|
||||
Profile
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#help">
|
||||
<i class="fa fa-info"></i>
|
||||
Help
|
||||
</a>
|
||||
</li>
|
||||
<li class="last">
|
||||
<a href="{% url 'dashboard-logout' %}">
|
||||
<i class="fa fa-lock"></i>
|
||||
Logout
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
<li class="chat-toggle-wrapper">
|
||||
{# <a href="#" data-toggle="chatbar" class="toggle_chat">#}
|
||||
{% for i in user.userprofile_set.all %}
|
||||
<span>{{ i.name }}</span>
|
||||
{% endfor %}
|
||||
{# <i class="fa fa-comments"></i>#}
|
||||
{# <span class="badge badge-warning">9</span>#}
|
||||
{# </a>#}
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class='quick-area'>
|
||||
<div class='pull-left'>
|
||||
<ul class="info-menu left-links list-unstyled">
|
||||
<li class="sidebar-toggle-wrap">
|
||||
<a href="{% url 'dashboard-login' %}" style="margin-right: 50px">
|
||||
<i class="glyphicon glyphicon-education">登录</i>
|
||||
</a>
|
||||
<a href="{% url 'dashboard-register' %}" style="margin-right: 10px">
|
||||
<i class="glyphicon glyphicon-education">注册</i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% load static %}
|
||||
<div class='page-topbar '>
|
||||
<div class='logo-area'>
|
||||
|
||||
</div>
|
||||
<div class='quick-area'>
|
||||
<div class='pull-left'>
|
||||
<ul class="info-menu left-links list-inline list-unstyled">
|
||||
<li class="sidebar-toggle-wrap">
|
||||
<a href="#" data-toggle="sidebar" class="sidebar_toggle">
|
||||
<i class="fa fa-bars"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="#" data-toggle="dropdown" class="toggle">
|
||||
<i class="fa fa-envelope"></i>
|
||||
<span class="badge badge-primary">7</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu messages animated fadeIn">
|
||||
|
||||
<li class="list">
|
||||
|
||||
<ul class="dropdown-menu-list list-unstyled ps-scrollbar">
|
||||
<li class="unread status-available">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-1.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Clarine Vassar</strong>
|
||||
<span class="time small">- 15 mins ago</span>
|
||||
<span class="profile-status available pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-away">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-2.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Brooks Latshaw</strong>
|
||||
<span class="time small">- 45 mins ago</span>
|
||||
<span class="profile-status away pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-busy">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-3.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Clementina Brodeur</strong>
|
||||
<span class="time small">- 1 hour ago</span>
|
||||
<span class="profile-status busy pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-offline">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-4.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Carri Busey</strong>
|
||||
<span class="time small">- 5 hours ago</span>
|
||||
<span class="profile-status offline pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-offline">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-5.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Melissa Dock</strong>
|
||||
<span class="time small">- Yesterday</span>
|
||||
<span class="profile-status offline pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-available">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-1.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Verdell Rea</strong>
|
||||
<span class="time small">- 14th Mar</span>
|
||||
<span class="profile-status available pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-busy">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-2.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Linette Lheureux</strong>
|
||||
<span class="time small">- 16th Mar</span>
|
||||
<span class="profile-status busy pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" status-away">
|
||||
<a href="javascript:;">
|
||||
<div class="user-img">
|
||||
<img src="{% static 'dashboard/image/avatar-3.png' %}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Araceli Boatright</strong>
|
||||
<span class="time small">- 16th Mar</span>
|
||||
<span class="profile-status away pull-right"></span>
|
||||
</span>
|
||||
<span class="desc small">
|
||||
Sometimes it takes a lifetime to win a battle.
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="external">
|
||||
<a href="javascript:;">
|
||||
<span>Read All Messages</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="#" data-toggle="dropdown" class="toggle">
|
||||
<i class="fa fa-bell"></i>
|
||||
<span class="badge badge-orange">3</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu notifications animated fadeIn">
|
||||
<li class="total">
|
||||
<span class="small">
|
||||
You have <strong>3</strong> new notifications.
|
||||
<a href="javascript:;" class="pull-right">Mark all as Read</a>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list">
|
||||
|
||||
<ul class="dropdown-menu-list list-unstyled ps-scrollbar">
|
||||
<li class="unread available"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-check"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Server needs to reboot</strong>
|
||||
<span class="time small">15 mins ago</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="unread away"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>45 new messages</strong>
|
||||
<span class="time small">45 mins ago</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" busy"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-times"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Server IP Blocked</strong>
|
||||
<span class="time small">1 hour ago</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" offline"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-user"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>10 Orders Shipped</strong>
|
||||
<span class="time small">5 hours ago</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" offline"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-user"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>New Comment on blog</strong>
|
||||
<span class="time small">Yesterday</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" available"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-check"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Great Speed Notify</strong>
|
||||
<span class="time small">14th Mar</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" busy"> <!-- available: success, warning, info, error -->
|
||||
<a href="javascript:;">
|
||||
<div class="notice-icon">
|
||||
<i class="fa fa-times"></i>
|
||||
</div>
|
||||
<div>
|
||||
<span class="name">
|
||||
<strong>Team Meeting at 6PM</strong>
|
||||
<span class="time small">16th Mar</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="external">
|
||||
<a href="javascript:;">
|
||||
<span>Read All Notifications</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="hidden-sm hidden-xs searchform">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon input-focus">
|
||||
<i class="fa fa-search"></i>
|
||||
</span>
|
||||
<form action="search-page.html" method="post">
|
||||
<input type="text" class="form-control animated fadeIn" placeholder="Search & Enter">
|
||||
<input type='submit' value="">
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='pull-right'>
|
||||
{% if user.is_authenticated %}
|
||||
<ul class="info-menu right-links list-inline list-unstyled">
|
||||
<li class="profile">
|
||||
|
||||
<a href="#" data-toggle="dropdown" class="toggle">
|
||||
{% for u in user.userprofile_set.all %}
|
||||
|
||||
<img src="{{ u.image.url }}" alt="user-image"
|
||||
class="img-circle img-inline">
|
||||
{% endfor %}
|
||||
<span><i class="fa fa-angle-down"></i></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu profile animated fadeIn">
|
||||
<li>
|
||||
<a href="#settings">
|
||||
<i class="fa fa-wrench"></i>
|
||||
Settings
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#profile">
|
||||
<i class="fa fa-user"></i>
|
||||
Profile
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#help">
|
||||
<i class="fa fa-info"></i>
|
||||
Help
|
||||
</a>
|
||||
</li>
|
||||
<li class="last">
|
||||
<a href="{% url 'dashboard-logout' %}">
|
||||
<i class="fa fa-lock"></i>
|
||||
Logout
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
<li class="chat-toggle-wrapper">
|
||||
{# <a href="#" data-toggle="chatbar" class="toggle_chat">#}
|
||||
{% for i in user.userprofile_set.all %}
|
||||
<span>{{ i.name }}</span>
|
||||
{% endfor %}
|
||||
{# <i class="fa fa-comments"></i>#}
|
||||
{# <span class="badge badge-warning">9</span>#}
|
||||
{# </a>#}
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<div class='quick-area'>
|
||||
<div class='pull-left'>
|
||||
<ul class="info-menu left-links list-unstyled">
|
||||
<li class="sidebar-toggle-wrap">
|
||||
<a href="{% url 'dashboard-login' %}" style="margin-right: 50px">
|
||||
<i class="glyphicon glyphicon-education">登录</i>
|
||||
</a>
|
||||
<a href="{% url 'dashboard-register' %}" style="margin-right: 10px">
|
||||
<i class="glyphicon glyphicon-education">注册</i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,196 +1,196 @@
|
|||
<div class="page-sidebar-wrapper" id="main-menu-wrapper" style="min-height: 1000px">
|
||||
<!-- USER INFO - START -->
|
||||
<div class="profile-info row">
|
||||
|
||||
<div class="profile-image col-md-4 col-sm-4 col-xs-4">
|
||||
<a href="{% url 'dashboard-index' %}">
|
||||
{% for u in user.userprofile_set.all %}
|
||||
<img src="{{ u.image.url }}" class="img-responsive img-circle">
|
||||
{% endfor %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="profile-details col-md-8 col-sm-8 col-xs-8">
|
||||
|
||||
<h3>
|
||||
<a href="#">{{ user.username }}</a>
|
||||
|
||||
<!-- Available statuses: online, idle, busy, away and offline -->
|
||||
<span class="profile-status online"></span>
|
||||
</h3>
|
||||
|
||||
{% for u in user.userprofile_set.all %}
|
||||
<p class="profile-title">{{ u.organization }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- USER INFO - END -->
|
||||
|
||||
|
||||
<ul class='wraplist'>
|
||||
<li class="">
|
||||
<a href="{% url 'monitor-new-media-public-opinion-weixin' %}">
|
||||
<i class="fa fa-th"></i>
|
||||
<span class="title">新媒体舆情</span>
|
||||
</a>
|
||||
</li>
|
||||
{# <li class="open">#}
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-map-marker"></i>
|
||||
<span class="title">发布时效性监测</span>
|
||||
<span class="arrow "></span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="">新媒体详情监测</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="">页面详情</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="">
|
||||
<i class="fa fa-bar-chart"></i>
|
||||
<span class="title">错别字监测</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-folder-open"></i>
|
||||
<span class="title">敏感信息监测</span>
|
||||
<span class="arrow "></span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="">会议详情</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-suitcase"></i>
|
||||
<span class="title">监测报告</span>
|
||||
<span class="arrow "></span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="">详情</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-sliders"></i>
|
||||
<span class="title">群组管理</span>
|
||||
<span class="arrow "></span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="{% url 'group-management-create' %}">新建群组</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="{% url 'group-management-management' %}">编辑群组</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="">搜索添加单位</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-gift"></i>
|
||||
<span class="title">新媒体管理</span>
|
||||
<span class="arrow "></span><span class="label label-orange">NEW</span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="{% url 'newmedia-management-create-menu' %}">新建新媒体</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="{% url 'newmedia-management-edit-menu' %}">编辑新媒体</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-envelope"></i>
|
||||
<span class="title">主体单位管理</span>
|
||||
<span class="arrow "></span><span class="label label-orange">4</span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="{% url 'organization-management-create' %}">新建单位</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="">搜索添加用户</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="{% url 'organization-management-management' %}">编辑单位</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="{% url 'user-management-management' %}">
|
||||
<i class="fa fa-columns"></i>
|
||||
<span class="title">用户管理</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="{% url 'user-management-update' user.id %}">
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<span class="title">系统设置</span>
|
||||
</a>
|
||||
</li>
|
||||
{# <li class="">#}
|
||||
{# <a href="javascript:;">#}
|
||||
{# <i class="fa fa-columns"></i>#}
|
||||
{# <span class="title">工作首页</span>#}
|
||||
{# <span class="arrow "></span>#}
|
||||
{# </a>#}
|
||||
{# <ul class="sub-menu">#}
|
||||
{# <li>#}
|
||||
{# <a class="" href="">工作列表</a>#}
|
||||
{# </li>#}
|
||||
{# <li>#}
|
||||
{# <a class="" href="">考勤管理</a>#}
|
||||
{# </li>#}
|
||||
{# <li>#}
|
||||
{# <a class="" href="">新闻管理</a>#}
|
||||
{# </li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
|
||||
|
||||
{# <li class=""><a href="javascript:;"> <i class="fa fa-folder-open"></i> <span class="title">Menu Levels</span>#}
|
||||
{# <span class="arrow "></span> </a>#}
|
||||
{# <ul class="sub-menu">#}
|
||||
{# <li><a href="javascript:;"> <span class="title">Level 1.1</span> </a></li>#}
|
||||
{# <li><a href="javascript:;"> <span class="title">Level 1.2</span> <span#}
|
||||
{# class="arrow "></span> </a>#}
|
||||
{# <ul class="sub-menu">#}
|
||||
{# <li><a href="javascript:;"> <span class="title">Level 2.1</span> </a></li>#}
|
||||
{# <li><a href="ujavascript:;"> <span class="title">Level 2.2</span> <span#}
|
||||
{# class="arrow "></span></a>#}
|
||||
{# <ul class="sub-menu">#}
|
||||
{# <li><a href="javascript:;"> <span class="title">Level 3.1</span> <span#}
|
||||
{# class="arrow "></span></a>#}
|
||||
{# <ul class="sub-menu">#}
|
||||
{# <li><a href="ujavascript:;"> <span class="title">Level 4.1</span>#}
|
||||
{# </a></li>#}
|
||||
{# <li><a href="ujavascript:;"> <span class="title">Level 4.2</span>#}
|
||||
{# </a></li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
{# <li><a href="ujavascript:;"> <span class="title">Level 3.2</span> </a></li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="page-sidebar-wrapper" id="main-menu-wrapper" style="min-height: 1000px">
|
||||
<!-- USER INFO - START -->
|
||||
<div class="profile-info row">
|
||||
|
||||
<div class="profile-image col-md-4 col-sm-4 col-xs-4">
|
||||
<a href="{% url 'dashboard-index' %}">
|
||||
{% for u in user.userprofile_set.all %}
|
||||
<img src="{{ u.image.url }}" class="img-responsive img-circle">
|
||||
{% endfor %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="profile-details col-md-8 col-sm-8 col-xs-8">
|
||||
|
||||
<h3>
|
||||
<a href="#">{{ user.username }}</a>
|
||||
|
||||
<!-- Available statuses: online, idle, busy, away and offline -->
|
||||
<span class="profile-status online"></span>
|
||||
</h3>
|
||||
|
||||
{% for u in user.userprofile_set.all %}
|
||||
<p class="profile-title">{{ u.organization }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- USER INFO - END -->
|
||||
|
||||
|
||||
<ul class='wraplist'>
|
||||
<li class="">
|
||||
<a href="{% url 'monitor-new-media-public-opinion-weixin' %}">
|
||||
<i class="fa fa-th"></i>
|
||||
<span class="title">新媒体舆情</span>
|
||||
</a>
|
||||
</li>
|
||||
{# <li class="open">#}
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-map-marker"></i>
|
||||
<span class="title">发布时效性监测</span>
|
||||
<span class="arrow "></span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="">新媒体详情监测</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="">页面详情</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="">
|
||||
<i class="fa fa-bar-chart"></i>
|
||||
<span class="title">错别字监测</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-folder-open"></i>
|
||||
<span class="title">敏感信息监测</span>
|
||||
<span class="arrow "></span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="">会议详情</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-suitcase"></i>
|
||||
<span class="title">监测报告</span>
|
||||
<span class="arrow "></span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="">详情</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-sliders"></i>
|
||||
<span class="title">群组管理</span>
|
||||
<span class="arrow "></span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="{% url 'group-management-create' %}">新建群组</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="{% url 'group-management-management' %}">编辑群组</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="">搜索添加单位</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-gift"></i>
|
||||
<span class="title">新媒体管理</span>
|
||||
<span class="arrow "></span><span class="label label-orange">NEW</span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="{% url 'newmedia-management-create-menu' %}">新建新媒体</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="{% url 'newmedia-management-edit-menu' %}">编辑新媒体</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="javascript:;">
|
||||
<i class="fa fa-envelope"></i>
|
||||
<span class="title">主体单位管理</span>
|
||||
<span class="arrow "></span><span class="label label-orange">4</span>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a class="" href="{% url 'organization-management-create' %}">新建单位</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="">搜索添加用户</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="" href="{% url 'organization-management-management' %}">编辑单位</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="{% url 'user-management-management' %}">
|
||||
<i class="fa fa-columns"></i>
|
||||
<span class="title">用户管理</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="{% url 'user-management-update' user.id %}">
|
||||
<i class="fa fa-dashboard"></i>
|
||||
<span class="title">系统设置</span>
|
||||
</a>
|
||||
</li>
|
||||
{# <li class="">#}
|
||||
{# <a href="javascript:;">#}
|
||||
{# <i class="fa fa-columns"></i>#}
|
||||
{# <span class="title">工作首页</span>#}
|
||||
{# <span class="arrow "></span>#}
|
||||
{# </a>#}
|
||||
{# <ul class="sub-menu">#}
|
||||
{# <li>#}
|
||||
{# <a class="" href="">工作列表</a>#}
|
||||
{# </li>#}
|
||||
{# <li>#}
|
||||
{# <a class="" href="">考勤管理</a>#}
|
||||
{# </li>#}
|
||||
{# <li>#}
|
||||
{# <a class="" href="">新闻管理</a>#}
|
||||
{# </li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
|
||||
|
||||
{# <li class=""><a href="javascript:;"> <i class="fa fa-folder-open"></i> <span class="title">Menu Levels</span>#}
|
||||
{# <span class="arrow "></span> </a>#}
|
||||
{# <ul class="sub-menu">#}
|
||||
{# <li><a href="javascript:;"> <span class="title">Level 1.1</span> </a></li>#}
|
||||
{# <li><a href="javascript:;"> <span class="title">Level 1.2</span> <span#}
|
||||
{# class="arrow "></span> </a>#}
|
||||
{# <ul class="sub-menu">#}
|
||||
{# <li><a href="javascript:;"> <span class="title">Level 2.1</span> </a></li>#}
|
||||
{# <li><a href="ujavascript:;"> <span class="title">Level 2.2</span> <span#}
|
||||
{# class="arrow "></span></a>#}
|
||||
{# <ul class="sub-menu">#}
|
||||
{# <li><a href="javascript:;"> <span class="title">Level 3.1</span> <span#}
|
||||
{# class="arrow "></span></a>#}
|
||||
{# <ul class="sub-menu">#}
|
||||
{# <li><a href="ujavascript:;"> <span class="title">Level 4.1</span>#}
|
||||
{# </a></li>#}
|
||||
{# <li><a href="ujavascript:;"> <span class="title">Level 4.2</span>#}
|
||||
{# </a></li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
{# <li><a href="ujavascript:;"> <span class="title">Level 3.2</span> </a></li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
{# </ul>#}
|
||||
{# </li>#}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,149 +1,149 @@
|
|||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block css %}
|
||||
<style>
|
||||
body.login_page {
|
||||
background-color: rgba(116, 77, 144, 1.0)
|
||||
/*#744d90*/;
|
||||
background-image: url('{% static 'image/login-bg.png' %}');
|
||||
background-attachment: fixed;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
min-height: 99%;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loginpage h1 a {
|
||||
height: 92px;
|
||||
margin: 0px auto 0px auto;
|
||||
padding: 0;
|
||||
text-decoration: none;
|
||||
-moz-background-size: 345px 92px;
|
||||
-o-background-size: 345px 92px;
|
||||
background-size: 345px 92px;
|
||||
background-color: transparent;
|
||||
min-height: 92px;
|
||||
width: auto;
|
||||
background-image: url("{% static 'image/login-logo.png' %}");
|
||||
background-position: center top;
|
||||
background-repeat: no-repeat;
|
||||
text-indent: -9999px;
|
||||
outline: 0;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block header %} {% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<body class=" login_page">
|
||||
|
||||
|
||||
<div class="login-wrapper">
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="login"
|
||||
class="login loginpage col-lg-offset-4 col-lg-4 col-md-offset-3 col-md-6 col-sm-offset-3 col-sm-6 col-xs-offset-2 col-xs-8">
|
||||
<h1><a href="#" title="Login Page" tabindex="-1">Ultra Admin</a></h1>
|
||||
|
||||
<form name="loginform" id="loginform" action="{% url 'dashboard-login' %}" method="post">{% csrf_token %}
|
||||
<p>
|
||||
<label for="user_login">账号(您注册的手机号)<br/>
|
||||
<input type="text" name="username" id="user_login" class="input" size="20" placeholder="请输入账号"/></label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="user_pass">密码<br/>
|
||||
<input type="password" name="password" id="user_pass" class="input" size="20"
|
||||
placeholder="请输入密码"/></label>
|
||||
</p>
|
||||
<p class="div_index_yan">
|
||||
<span>
|
||||
<a href="#" class="next-captcha">
|
||||
<img src="{{ image_url }}" class="captcha" alt="captcha">
|
||||
</a>
|
||||
</span>
|
||||
<input id="id_reg_captcha_0" name="captcha_0" type="hidden" value="{{ hash_key }}">
|
||||
<input type="text" id="id_reg_captcha_1" name="captcha_1" placeholder="验证码">
|
||||
|
||||
</p>
|
||||
<p class="forgetmenot">
|
||||
<label class="icheck-label form-label" for="rememberme"><input name="rememberme" type="checkbox"
|
||||
id="rememberme" value="forever"
|
||||
class="skin-square-orange" checked>
|
||||
记住密码</label>
|
||||
</p>
|
||||
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" name="wp-submit" id="wp-submit" class="btn btn-orange btn-block"
|
||||
value="登录"/>
|
||||
</p>
|
||||
|
||||
</form>
|
||||
<p id="nav">
|
||||
<a class="pull-left" href="#" title="Password Lost and Found">忘记密码</a>
|
||||
<a class="pull-right" href="{% url 'dashboard-register' %}" title="Sign Up">注册</a>
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- LOAD FILES AT PAGE END FOR FASTER LOADING -->
|
||||
<!-- General section box modal start -->
|
||||
<div class="modal" id="section-settings" tabindex="-1" role="dialog" aria-labelledby="ultraModal-Label"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog animated bounceInDown">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Section Settings</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
Body goes here...
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button data-dismiss="modal" class="btn btn-default" type="button">Close</button>
|
||||
<button class="btn btn-success" type="button">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal end -->
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$(".next-captcha").click(function (e) {
|
||||
e.preventDefault();
|
||||
$.getJSON("{% url 'refresh-captcha' %}", function (json) {
|
||||
// This should update your captcha image src and captcha hidden input
|
||||
// debugger;
|
||||
var status = json['status'];
|
||||
console.log(status);
|
||||
console.log("6666666666666666666666666666666");
|
||||
var new_cptch_key = json['new_cptch_key'];
|
||||
var new_cptch_image = json['new_cptch_image'];
|
||||
id_captcha_0 = $("#id_reg_captcha_0");
|
||||
img = $(".captcha");
|
||||
id_captcha_0.attr("value", new_cptch_key);
|
||||
img.attr("src", new_cptch_image);
|
||||
});
|
||||
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block css %}
|
||||
<style>
|
||||
body.login_page {
|
||||
background-color: rgba(116, 77, 144, 1.0)
|
||||
/*#744d90*/;
|
||||
background-image: url('{% static 'image/login-bg.png' %}');
|
||||
background-attachment: fixed;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
min-height: 99%;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loginpage h1 a {
|
||||
height: 92px;
|
||||
margin: 0px auto 0px auto;
|
||||
padding: 0;
|
||||
text-decoration: none;
|
||||
-moz-background-size: 345px 92px;
|
||||
-o-background-size: 345px 92px;
|
||||
background-size: 345px 92px;
|
||||
background-color: transparent;
|
||||
min-height: 92px;
|
||||
width: auto;
|
||||
background-image: url("{% static 'image/login-logo.png' %}");
|
||||
background-position: center top;
|
||||
background-repeat: no-repeat;
|
||||
text-indent: -9999px;
|
||||
outline: 0;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block header %} {% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<body class=" login_page">
|
||||
|
||||
|
||||
<div class="login-wrapper">
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="login"
|
||||
class="login loginpage col-lg-offset-4 col-lg-4 col-md-offset-3 col-md-6 col-sm-offset-3 col-sm-6 col-xs-offset-2 col-xs-8">
|
||||
<h1><a href="#" title="Login Page" tabindex="-1">Ultra Admin</a></h1>
|
||||
|
||||
<form name="loginform" id="loginform" action="{% url 'dashboard-login' %}" method="post">{% csrf_token %}
|
||||
<p>
|
||||
<label for="user_login">账号(您注册的手机号)<br/>
|
||||
<input type="text" name="username" id="user_login" class="input" size="20" placeholder="请输入账号"/></label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="user_pass">密码<br/>
|
||||
<input type="password" name="password" id="user_pass" class="input" size="20"
|
||||
placeholder="请输入密码"/></label>
|
||||
</p>
|
||||
<p class="div_index_yan">
|
||||
<span>
|
||||
<a href="#" class="next-captcha">
|
||||
<img src="{{ image_url }}" class="captcha" alt="captcha">
|
||||
</a>
|
||||
</span>
|
||||
<input id="id_reg_captcha_0" name="captcha_0" type="hidden" value="{{ hash_key }}">
|
||||
<input type="text" id="id_reg_captcha_1" name="captcha_1" placeholder="验证码">
|
||||
|
||||
</p>
|
||||
<p class="forgetmenot">
|
||||
<label class="icheck-label form-label" for="rememberme"><input name="rememberme" type="checkbox"
|
||||
id="rememberme" value="forever"
|
||||
class="skin-square-orange" checked>
|
||||
记住密码</label>
|
||||
</p>
|
||||
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" name="wp-submit" id="wp-submit" class="btn btn-orange btn-block"
|
||||
value="登录"/>
|
||||
</p>
|
||||
|
||||
</form>
|
||||
<p id="nav">
|
||||
<a class="pull-left" href="#" title="Password Lost and Found">忘记密码</a>
|
||||
<a class="pull-right" href="{% url 'dashboard-register' %}" title="Sign Up">注册</a>
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- LOAD FILES AT PAGE END FOR FASTER LOADING -->
|
||||
<!-- General section box modal start -->
|
||||
<div class="modal" id="section-settings" tabindex="-1" role="dialog" aria-labelledby="ultraModal-Label"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog animated bounceInDown">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Section Settings</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
Body goes here...
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button data-dismiss="modal" class="btn btn-default" type="button">Close</button>
|
||||
<button class="btn btn-success" type="button">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal end -->
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$(".next-captcha").click(function (e) {
|
||||
e.preventDefault();
|
||||
$.getJSON("{% url 'refresh-captcha' %}", function (json) {
|
||||
// This should update your captcha image src and captcha hidden input
|
||||
// debugger;
|
||||
var status = json['status'];
|
||||
console.log(status);
|
||||
console.log("6666666666666666666666666666666");
|
||||
var new_cptch_key = json['new_cptch_key'];
|
||||
var new_cptch_image = json['new_cptch_image'];
|
||||
id_captcha_0 = $("#id_reg_captcha_0");
|
||||
img = $(".captcha");
|
||||
id_captcha_0.attr("value", new_cptch_key);
|
||||
img.attr("src", new_cptch_image);
|
||||
});
|
||||
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,188 +1,188 @@
|
|||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block css %}
|
||||
<style>
|
||||
body.login_page {
|
||||
background-color: rgba(116, 77, 144, 1.0)
|
||||
/*#744d90*/;
|
||||
background-image: url('{% static 'image/login-bg.png' %}');
|
||||
background-attachment: fixed;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
min-height: 99%;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loginpage h1 a {
|
||||
height: 92px;
|
||||
margin: 0px auto 0px auto;
|
||||
padding: 0;
|
||||
text-decoration: none;
|
||||
-moz-background-size: 345px 92px;
|
||||
-o-background-size: 345px 92px;
|
||||
background-size: 345px 92px;
|
||||
background-color: transparent;
|
||||
min-height: 92px;
|
||||
width: auto;
|
||||
background-image: url("{% static 'image/login-logo.png' %}");
|
||||
background-position: center top;
|
||||
background-repeat: no-repeat;
|
||||
text-indent: -9999px;
|
||||
outline: 0;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block header %}{% endblock %}
|
||||
{% block content %}
|
||||
<body class=" login_page">
|
||||
|
||||
|
||||
<div class="register-wrapper">
|
||||
{% if messages %}
|
||||
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="register"
|
||||
class="login loginpage col-lg-offset-4 col-lg-4 col-md-offset-3 col-md-6 col-sm-offset-3 col-sm-6 col-xs-offset-2 col-xs-8">
|
||||
<h1><a href="#" title="Login Page" tabindex="-1">Ultra Admin</a></h1>
|
||||
|
||||
<form name="loginform" id="loginform" action="{% url 'dashboard-register' %}" method="post"
|
||||
enctype="multipart/form-data">{% csrf_token %}
|
||||
<p>
|
||||
<label for="name">单位<br/>
|
||||
<select class="form-control" name="organization">
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="name">姓名<br/>
|
||||
<input type="text" name="name" id="user_login" class="input" value="" size="20"/></label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="sex">性别<br/>
|
||||
<label style="text-align: center">
|
||||
<input type="radio" name="sex" id="inlineRadio1" value="1" checked="checked">男
|
||||
<input type="radio" name="sex" id="inlineRadio2" value="2" style="margin-left: 50px"> 女
|
||||
</label>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="email">邮箱<br/>
|
||||
<input type="text" name="email" id="user_login" class="input" value="" size="20"/></label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="phone">电话<br/>
|
||||
<input type="text" name="username" id="user_login" class="input" value="" size="20"/></label>
|
||||
</p>
|
||||
{# <p>#}
|
||||
{# <label for="username">用户名<br/>#}
|
||||
{# <input type="text" name="username" id="user_login" class="input" value="" size="20"/></label>#}
|
||||
{# </p>#}
|
||||
<p>
|
||||
<label for="password">密码<br/>
|
||||
<input type="password" name="password" id="user_pass" class="input" value="" size="20"/></label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="confirm_password">确认密码<br/>
|
||||
<input type="password" name="confirm_password" id="user_pass1" class="input" value=""
|
||||
size="20"/></label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="image">头像<br/>
|
||||
<input type="file" id="exampleInputFile" name="image"></label>
|
||||
</p>
|
||||
<p class="div_index_yan">
|
||||
<span>
|
||||
<a href="#" class="next-captcha">
|
||||
<img src="{{ image_url }}" class="captcha" alt="captcha">
|
||||
</a>
|
||||
</span>
|
||||
<input id="id_reg_captcha_0" name="captcha_0" type="hidden" value="{{ hash_key }}">
|
||||
<input type="text" id="id_reg_captcha_1" name="captcha_1" placeholder="验证码">
|
||||
|
||||
</p>
|
||||
<p class="forgetmenot">
|
||||
<label class="icheck-label form-label" for="rememberme"><input name="rememberme" type="checkbox"
|
||||
id="rememberme" value="forever"
|
||||
class="skin-square-orange" checked> I
|
||||
agree to terms to conditions</label>
|
||||
</p>
|
||||
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" name="wp-submit" id="wp-submit" class="btn btn-orange btn-block"
|
||||
value="注册"/>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<p id="nav">
|
||||
<a class="pull-left" href="#" title="Password Lost and Found">忘记密码</a>
|
||||
<a class="pull-right" href="{% url 'dashboard-login' %}" title="Sign Up">登录</a>
|
||||
</p>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- General section box modal start -->
|
||||
<div class="modal" id="section-settings" tabindex="-1" role="dialog" aria-labelledby="ultraModal-Label"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog animated bounceInDown">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Section Settings</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
Body goes here...
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button data-dismiss="modal" class="btn btn-default" type="button">Close</button>
|
||||
<button class="btn btn-success" type="button">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal end -->
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$(".next-captcha").click(function (e) {
|
||||
e.preventDefault();
|
||||
$.getJSON("{% url 'refresh-captcha' %}", function (json) {
|
||||
// This should update your captcha image src and captcha hidden input
|
||||
// debugger;
|
||||
var status = json['status'];
|
||||
console.log(status);
|
||||
console.log("6666666666666666666666666666666");
|
||||
var new_cptch_key = json['new_cptch_key'];
|
||||
var new_cptch_image = json['new_cptch_image'];
|
||||
id_captcha_0 = $("#id_reg_captcha_0");
|
||||
img = $(".captcha");
|
||||
id_captcha_0.attr("value", new_cptch_key);
|
||||
img.attr("src", new_cptch_image);
|
||||
});
|
||||
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block css %}
|
||||
<style>
|
||||
body.login_page {
|
||||
background-color: rgba(116, 77, 144, 1.0)
|
||||
/*#744d90*/;
|
||||
background-image: url('{% static 'image/login-bg.png' %}');
|
||||
background-attachment: fixed;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
min-height: 99%;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loginpage h1 a {
|
||||
height: 92px;
|
||||
margin: 0px auto 0px auto;
|
||||
padding: 0;
|
||||
text-decoration: none;
|
||||
-moz-background-size: 345px 92px;
|
||||
-o-background-size: 345px 92px;
|
||||
background-size: 345px 92px;
|
||||
background-color: transparent;
|
||||
min-height: 92px;
|
||||
width: auto;
|
||||
background-image: url("{% static 'image/login-logo.png' %}");
|
||||
background-position: center top;
|
||||
background-repeat: no-repeat;
|
||||
text-indent: -9999px;
|
||||
outline: 0;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block header %}{% endblock %}
|
||||
{% block content %}
|
||||
<body class=" login_page">
|
||||
|
||||
|
||||
<div class="register-wrapper">
|
||||
{% if messages %}
|
||||
|
||||
<div class="alert alert-danger alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="register"
|
||||
class="login loginpage col-lg-offset-4 col-lg-4 col-md-offset-3 col-md-6 col-sm-offset-3 col-sm-6 col-xs-offset-2 col-xs-8">
|
||||
<h1><a href="#" title="Login Page" tabindex="-1">Ultra Admin</a></h1>
|
||||
|
||||
<form name="loginform" id="loginform" action="{% url 'dashboard-register' %}" method="post"
|
||||
enctype="multipart/form-data">{% csrf_token %}
|
||||
<p>
|
||||
<label for="name">单位<br/>
|
||||
<select class="form-control" name="organization">
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="name">姓名<br/>
|
||||
<input type="text" name="name" id="user_login" class="input" value="" size="20"/></label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="sex">性别<br/>
|
||||
<label style="text-align: center">
|
||||
<input type="radio" name="sex" id="inlineRadio1" value="1" checked="checked">男
|
||||
<input type="radio" name="sex" id="inlineRadio2" value="2" style="margin-left: 50px"> 女
|
||||
</label>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="email">邮箱<br/>
|
||||
<input type="text" name="email" id="user_login" class="input" value="" size="20"/></label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="phone">电话<br/>
|
||||
<input type="text" name="username" id="user_login" class="input" value="" size="20"/></label>
|
||||
</p>
|
||||
{# <p>#}
|
||||
{# <label for="username">用户名<br/>#}
|
||||
{# <input type="text" name="username" id="user_login" class="input" value="" size="20"/></label>#}
|
||||
{# </p>#}
|
||||
<p>
|
||||
<label for="password">密码<br/>
|
||||
<input type="password" name="password" id="user_pass" class="input" value="" size="20"/></label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="confirm_password">确认密码<br/>
|
||||
<input type="password" name="confirm_password" id="user_pass1" class="input" value=""
|
||||
size="20"/></label>
|
||||
</p>
|
||||
<p>
|
||||
<label for="image">头像<br/>
|
||||
<input type="file" id="exampleInputFile" name="image"></label>
|
||||
</p>
|
||||
<p class="div_index_yan">
|
||||
<span>
|
||||
<a href="#" class="next-captcha">
|
||||
<img src="{{ image_url }}" class="captcha" alt="captcha">
|
||||
</a>
|
||||
</span>
|
||||
<input id="id_reg_captcha_0" name="captcha_0" type="hidden" value="{{ hash_key }}">
|
||||
<input type="text" id="id_reg_captcha_1" name="captcha_1" placeholder="验证码">
|
||||
|
||||
</p>
|
||||
<p class="forgetmenot">
|
||||
<label class="icheck-label form-label" for="rememberme"><input name="rememberme" type="checkbox"
|
||||
id="rememberme" value="forever"
|
||||
class="skin-square-orange" checked> I
|
||||
agree to terms to conditions</label>
|
||||
</p>
|
||||
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" name="wp-submit" id="wp-submit" class="btn btn-orange btn-block"
|
||||
value="注册"/>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<p id="nav">
|
||||
<a class="pull-left" href="#" title="Password Lost and Found">忘记密码</a>
|
||||
<a class="pull-right" href="{% url 'dashboard-login' %}" title="Sign Up">登录</a>
|
||||
</p>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- General section box modal start -->
|
||||
<div class="modal" id="section-settings" tabindex="-1" role="dialog" aria-labelledby="ultraModal-Label"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog animated bounceInDown">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Section Settings</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
Body goes here...
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button data-dismiss="modal" class="btn btn-default" type="button">Close</button>
|
||||
<button class="btn btn-success" type="button">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- modal end -->
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script>
|
||||
$(function () {
|
||||
$(".next-captcha").click(function (e) {
|
||||
e.preventDefault();
|
||||
$.getJSON("{% url 'refresh-captcha' %}", function (json) {
|
||||
// This should update your captcha image src and captcha hidden input
|
||||
// debugger;
|
||||
var status = json['status'];
|
||||
console.log(status);
|
||||
console.log("6666666666666666666666666666666");
|
||||
var new_cptch_key = json['new_cptch_key'];
|
||||
var new_cptch_image = json['new_cptch_image'];
|
||||
id_captcha_0 = $("#id_reg_captcha_0");
|
||||
img = $(".captcha");
|
||||
id_captcha_0.attr("value", new_cptch_key);
|
||||
img.attr("src", new_cptch_image);
|
||||
});
|
||||
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -1,119 +1,119 @@
|
|||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<!-- START TOPBAR -->
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class="page-container row-fluid">
|
||||
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>
|
||||
<div class="page-title">
|
||||
|
||||
<div class="pull-left">
|
||||
<h1 class="title">系统设置</h1></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="col-lg-12 col-md-12 col-xs-12 col-sm-12">
|
||||
<section class="box ">
|
||||
<header class="panel_header">
|
||||
<h2 class="title pull-left">用户信息</h2>
|
||||
</header>
|
||||
<div class="content-body">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-sm-9 col-xs-10">
|
||||
<form method="post"
|
||||
action="{% url 'user-management-update' usee.id %}"
|
||||
enctype="multipart/form-data">{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
<option value="{{ userprofile.organization.id }}">{{ userprofile.organization.name }}</option>
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="name">姓名</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="name"
|
||||
value="{{ userprofile.name }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="email">邮箱</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="email"
|
||||
value="{{ usee.email }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="username">电话</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="username"
|
||||
value="{{ usee.username }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="image">图标
|
||||
<div class="controls">
|
||||
<input type="file" name="image"><img
|
||||
src="{{ userprofile.image.url }}"
|
||||
style="width: 80px;height: 80px;"
|
||||
class="img-circle">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="passwordold">旧密码<br/>
|
||||
<input type="password" name="passwordold" id="user_pass" class="input"
|
||||
value="" size="20"/></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="passwordnew">新密码<br/>
|
||||
<input type="password" name="passwordnew" id="user_pass" class="input"
|
||||
value="" size="20"/></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="confirm_password">确认密码<br/>
|
||||
<input type="password" name="confirm_password" id="user_pass1"
|
||||
class="input" value=""
|
||||
size="20"/></label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" style="margin-top: 50px">提交修改
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<div class="chatapi-windows "></div>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
|
||||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<!-- START TOPBAR -->
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class="page-container row-fluid">
|
||||
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>
|
||||
<div class="page-title">
|
||||
|
||||
<div class="pull-left">
|
||||
<h1 class="title">系统设置</h1></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="col-lg-12 col-md-12 col-xs-12 col-sm-12">
|
||||
<section class="box ">
|
||||
<header class="panel_header">
|
||||
<h2 class="title pull-left">用户信息</h2>
|
||||
</header>
|
||||
<div class="content-body">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-sm-9 col-xs-10">
|
||||
<form method="post"
|
||||
action="{% url 'user-management-update' usee.id %}"
|
||||
enctype="multipart/form-data">{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="organization">单位</label>
|
||||
<div class="controls">
|
||||
<select class="form-control" name="organization">
|
||||
<option value="{{ userprofile.organization.id }}">{{ userprofile.organization.name }}</option>
|
||||
{% for o in organization %}
|
||||
<option value="{{ o.id }}">{{ o.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="name">姓名</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="name"
|
||||
value="{{ userprofile.name }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="email">邮箱</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="email"
|
||||
value="{{ usee.email }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="username">电话</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="form-control" name="username"
|
||||
value="{{ usee.username }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="image">图标
|
||||
<div class="controls">
|
||||
<input type="file" name="image"><img
|
||||
src="{{ userprofile.image.url }}"
|
||||
style="width: 80px;height: 80px;"
|
||||
class="img-circle">
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="passwordold">旧密码<br/>
|
||||
<input type="password" name="passwordold" id="user_pass" class="input"
|
||||
value="" size="20"/></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="passwordnew">新密码<br/>
|
||||
<input type="password" name="passwordnew" id="user_pass" class="input"
|
||||
value="" size="20"/></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="confirm_password">确认密码<br/>
|
||||
<input type="password" name="confirm_password" id="user_pass1"
|
||||
class="input" value=""
|
||||
size="20"/></label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" style="margin-top: 50px">提交修改
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<div class="chatapi-windows "></div>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -1,80 +1,80 @@
|
|||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block css %}
|
||||
<link href="{% static 'management/css/uikit.min.css' %}" rel="stylesheet" type="text/css" media="screen"/>
|
||||
<link href="{% static 'management/css/nestable.min.css' %}" rel="stylesheet" type="text/css" media="screen"/>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<div class="page-container row-fluid">
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>
|
||||
<div class="page-title">
|
||||
<div class="pull-left">
|
||||
<h1 class="title">用户管理</h1></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="col-lg-12">
|
||||
<section class="box ">
|
||||
<header class="panel_header">
|
||||
<h2 class="title pull-left">成员列表</h2>
|
||||
</header>
|
||||
<div class="content-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">头像</th>
|
||||
<th style="text-align: center">姓名</th>
|
||||
<th style="text-align: center">电话</th>
|
||||
<th style="text-align: center">单位名称</th>
|
||||
<th style="text-align: center">单位类型</th>
|
||||
<th style="text-align: center">行政区划</th>
|
||||
<th style="text-align: center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for u in userallinfo %}
|
||||
<tr>
|
||||
<td><img src="{{ u.image.url }}" style="width: 80px;height: 80px;"
|
||||
class="img-circle"></td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ u.name }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ u.phone }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ u.organization }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ u.type }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ u.administrativedivision }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">
|
||||
<a href="{% url 'user-management-delete' u.id %}"
|
||||
class="btn btn-danger btn-mini">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="metadata-pagination">
|
||||
{% include 'dashboard/paginator/user-management-paginate.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<div class="chatapi-windows ">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script src="{% static 'management/js/uikit.min.js' %}" type="text/javascript"></script>
|
||||
<script src="{% static 'management/js/nestable.min.js' %}" type="text/javascript"></script>
|
||||
<script>
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block css %}
|
||||
<link href="{% static 'management/css/uikit.min.css' %}" rel="stylesheet" type="text/css" media="screen"/>
|
||||
<link href="{% static 'management/css/nestable.min.css' %}" rel="stylesheet" type="text/css" media="screen"/>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<div class="page-container row-fluid">
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12'>
|
||||
<div class="page-title">
|
||||
<div class="pull-left">
|
||||
<h1 class="title">用户管理</h1></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="col-lg-12">
|
||||
<section class="box ">
|
||||
<header class="panel_header">
|
||||
<h2 class="title pull-left">成员列表</h2>
|
||||
</header>
|
||||
<div class="content-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">头像</th>
|
||||
<th style="text-align: center">姓名</th>
|
||||
<th style="text-align: center">电话</th>
|
||||
<th style="text-align: center">单位名称</th>
|
||||
<th style="text-align: center">单位类型</th>
|
||||
<th style="text-align: center">行政区划</th>
|
||||
<th style="text-align: center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for u in userallinfo %}
|
||||
<tr>
|
||||
<td><img src="{{ u.image.url }}" style="width: 80px;height: 80px;"
|
||||
class="img-circle"></td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ u.name }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ u.phone }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ u.organization }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ u.type }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ u.administrativedivision }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">
|
||||
<a href="{% url 'user-management-delete' u.id %}"
|
||||
class="btn btn-danger btn-mini">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="metadata-pagination">
|
||||
{% include 'dashboard/paginator/user-management-paginate.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<div class="chatapi-windows ">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% block add_js %}
|
||||
<script src="{% static 'management/js/uikit.min.js' %}" type="text/javascript"></script>
|
||||
<script src="{% static 'management/js/nestable.min.js' %}" type="text/javascript"></script>
|
||||
<script>
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,48 +1,48 @@
|
|||
from django.urls import path
|
||||
|
||||
from management import views
|
||||
|
||||
urlpatterns = [
|
||||
# 用户管理
|
||||
path('user/management/', views.user_management, name='user-management-management'),
|
||||
path('user/delete/<str:pk>/', views.user_delete, name='user-management-delete'),
|
||||
path('user/update/<str:pk>/', views.user_update, name='user-management-update'),
|
||||
# 群组管理
|
||||
path('group/management/', views.group_management, name='group-management-management'),
|
||||
path('group/create/', views.group_create, name='group-management-create'),
|
||||
path('group/update/<str:pk>/', views.group_update, name='group-management-update'),
|
||||
path('group/delete/<str:pk>/', views.group_delete, name='group-management-delete'),
|
||||
|
||||
# 添加群组管理员、成员
|
||||
path('group/admin/create/<str:pk>/', views.group_admin_create, name='group-admin-create'),
|
||||
path('group/admin/delete/<str:pk>/<str:group_pk>/', views.group_admin_delete, name='group-admin-delete'),
|
||||
path('group/user/create/<str:pk>/', views.group_user_create, name='group-user-create'),
|
||||
path('group/user/delete/<str:pk>/<str:group_pk>/', views.group_user_delete, name='group-user-delete'),
|
||||
|
||||
# 主体单位管理
|
||||
path('organization/management/', views.organization_management, name='organization-management-management'),
|
||||
path('organization/create/', views.organization_create, name='organization-management-create'),
|
||||
path('organization/delete/<str:pk>/', views.organization_delete, name='organization-management-delete'),
|
||||
path('organization/update/<str:pk>/', views.organization_update, name='organization-management-update'),
|
||||
|
||||
#新媒体管理
|
||||
path('newmedia/management/create/menu/',views.newmedia_management_create_menu,name='newmedia-management-create-menu'),
|
||||
path('newmedia/management/edit/menu/',views.newmedia_management_edit_menu,name='newmedia-management-edit-menu'),
|
||||
path('newmedia/management/create/weixin/',views.newmedia_management_create_weixin,name='newmedia-management-create-weixin'),
|
||||
path('newmedia/management/create/weibo/',views.newmedia_management_create_weibo,name='newmedia-management-create-weibo'),
|
||||
path('newmedia/management/create/toutiao/',views.newmedia_management_create_toutiao,name='newmedia-management-create-toutiao'),
|
||||
path('newmedia/management/create/qita/',views.newmedia_management_create_qita,name='newmedia-management-create-qita'),
|
||||
path('newmedia/management/edit/weixin/',views.newmedia_management_edit_weixin,name='newmedia-management-edit-weixin'),
|
||||
path('newmedia/management/edit/weibo/',views.newmedia_management_edit_weibo,name='newmedia-management-edit-weibo'),
|
||||
path('newmedia/management/edit/toutiao/',views.newmedia_management_edit_toutiao,name='newmedia-management-edit-toutiao'),
|
||||
path('newmedia/management/edit/qita/',views.newmedia_management_edit_qita,name='newmedia-management-edit-qita'),
|
||||
path('newmedia/management/update/weixin/<str:pk>/',views.newmedia_management_update_weixin,name='newmedia-management-update-weixin'),
|
||||
path('newmedia/management/update/weibo/<str:pk>/',views.newmedia_management_update_weibo,name='newmedia-management-update-weibo'),
|
||||
path('newmedia/management/update/toutiao/<str:pk>/',views.newmedia_management_update_toutiao,name='newmedia-management-update-toutiao'),
|
||||
path('newmedia/management/update/qita/<str:pk>/',views.newmedia_management_update_qita,name='newmedia-management-update-qita'),
|
||||
path('newmedia/management/delete/weixin/<str:pk>/',views.newmedia_management_delete_weixin,name='newmedia-management-delete-weixin'),
|
||||
path('newmedia/management/delete/weibo/<str:pk>/',views.newmedia_management_delete_weibo,name='newmedia-management-delete-weibo'),
|
||||
path('newmedia/management/delete/toutiao/<str:pk>/',views.newmedia_management_delete_toutiao,name='newmedia-management-delete-toutiao'),
|
||||
path('newmedia/management/delete/qita/<str:pk>/',views.newmedia_management_delete_qita,name='newmedia-management-delete-qita'),
|
||||
|
||||
]
|
||||
from django.urls import path
|
||||
|
||||
from management import views
|
||||
|
||||
urlpatterns = [
|
||||
# 用户管理
|
||||
path('user/management/', views.user_management, name='user-management-management'),
|
||||
path('user/delete/<str:pk>/', views.user_delete, name='user-management-delete'),
|
||||
path('user/update/<str:pk>/', views.user_update, name='user-management-update'),
|
||||
# 群组管理
|
||||
path('group/management/', views.group_management, name='group-management-management'),
|
||||
path('group/create/', views.group_create, name='group-management-create'),
|
||||
path('group/update/<str:pk>/', views.group_update, name='group-management-update'),
|
||||
path('group/delete/<str:pk>/', views.group_delete, name='group-management-delete'),
|
||||
|
||||
# 添加群组管理员、成员
|
||||
path('group/admin/create/<str:pk>/', views.group_admin_create, name='group-admin-create'),
|
||||
path('group/admin/delete/<str:pk>/<str:group_pk>/', views.group_admin_delete, name='group-admin-delete'),
|
||||
path('group/user/create/<str:pk>/', views.group_user_create, name='group-user-create'),
|
||||
path('group/user/delete/<str:pk>/<str:group_pk>/', views.group_user_delete, name='group-user-delete'),
|
||||
|
||||
# 主体单位管理
|
||||
path('organization/management/', views.organization_management, name='organization-management-management'),
|
||||
path('organization/create/', views.organization_create, name='organization-management-create'),
|
||||
path('organization/delete/<str:pk>/', views.organization_delete, name='organization-management-delete'),
|
||||
path('organization/update/<str:pk>/', views.organization_update, name='organization-management-update'),
|
||||
|
||||
#新媒体管理
|
||||
path('newmedia/management/create/menu/',views.newmedia_management_create_menu,name='newmedia-management-create-menu'),
|
||||
path('newmedia/management/edit/menu/',views.newmedia_management_edit_menu,name='newmedia-management-edit-menu'),
|
||||
path('newmedia/management/create/weixin/',views.newmedia_management_create_weixin,name='newmedia-management-create-weixin'),
|
||||
path('newmedia/management/create/weibo/',views.newmedia_management_create_weibo,name='newmedia-management-create-weibo'),
|
||||
path('newmedia/management/create/toutiao/',views.newmedia_management_create_toutiao,name='newmedia-management-create-toutiao'),
|
||||
path('newmedia/management/create/qita/',views.newmedia_management_create_qita,name='newmedia-management-create-qita'),
|
||||
path('newmedia/management/edit/weixin/',views.newmedia_management_edit_weixin,name='newmedia-management-edit-weixin'),
|
||||
path('newmedia/management/edit/weibo/',views.newmedia_management_edit_weibo,name='newmedia-management-edit-weibo'),
|
||||
path('newmedia/management/edit/toutiao/',views.newmedia_management_edit_toutiao,name='newmedia-management-edit-toutiao'),
|
||||
path('newmedia/management/edit/qita/',views.newmedia_management_edit_qita,name='newmedia-management-edit-qita'),
|
||||
path('newmedia/management/update/weixin/<str:pk>/',views.newmedia_management_update_weixin,name='newmedia-management-update-weixin'),
|
||||
path('newmedia/management/update/weibo/<str:pk>/',views.newmedia_management_update_weibo,name='newmedia-management-update-weibo'),
|
||||
path('newmedia/management/update/toutiao/<str:pk>/',views.newmedia_management_update_toutiao,name='newmedia-management-update-toutiao'),
|
||||
path('newmedia/management/update/qita/<str:pk>/',views.newmedia_management_update_qita,name='newmedia-management-update-qita'),
|
||||
path('newmedia/management/delete/weixin/<str:pk>/',views.newmedia_management_delete_weixin,name='newmedia-management-delete-weixin'),
|
||||
path('newmedia/management/delete/weibo/<str:pk>/',views.newmedia_management_delete_weibo,name='newmedia-management-delete-weibo'),
|
||||
path('newmedia/management/delete/toutiao/<str:pk>/',views.newmedia_management_delete_toutiao,name='newmedia-management-delete-toutiao'),
|
||||
path('newmedia/management/delete/qita/<str:pk>/',views.newmedia_management_delete_qita,name='newmedia-management-delete-qita'),
|
||||
|
||||
]
|
||||
|
|
1824
management/views.py
1824
management/views.py
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,3 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class MonitorConfig(AppConfig):
|
||||
name = 'monitor'
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class MonitorConfig(AppConfig):
|
||||
name = 'monitor'
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
|
|
@ -1,111 +1,111 @@
|
|||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<!-- START TOPBAR -->
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class="page-container row-fluid">
|
||||
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
<div class="chatapi-windows "></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-weixin' %}">微信</a>
|
||||
</li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-toutiao' %}">头条</a>
|
||||
</li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-weibo' %}">微博</a></li>
|
||||
<li role="presentation" class="active"><a
|
||||
href="{% url 'monitor-new-media-public-opinion-qita' %}">其他</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">微信热点</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-lg-6" style="margin-top: 10px">
|
||||
<div class="col-lg-3">
|
||||
公众号
|
||||
<select id="basicSelect">
|
||||
<option value="qita_all">全部</option>
|
||||
{% for q in qita %}
|
||||
<option value="{{ q.id }}">{{ q.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
分组
|
||||
<select id="basicSelect">
|
||||
<option value="group_all">全部</option>
|
||||
{% for g in group %}
|
||||
<option value="{{ g.id }}">{{ g.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<table class="table table-hover" style="font-size: 14px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">公众号</th>
|
||||
<th style="text-align: center">封面</th>
|
||||
<th style="text-align: center">标题</th>
|
||||
<th style="text-align: center">评论数</th>
|
||||
<th style="text-align: center">回复数</th>
|
||||
<th style="text-align: center">发布时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in res %}
|
||||
<tr>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.code }}</td>
|
||||
<td style="vertical-align: middle;text-align: center"><img
|
||||
src="{{ r.image.url }}" style="width: 40px;height: 40px;"
|
||||
class="img-circle"></td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.title }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.comment }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.reply }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<!-- START TOPBAR -->
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class="page-container row-fluid">
|
||||
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
<div class="chatapi-windows "></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-weixin' %}">微信</a>
|
||||
</li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-toutiao' %}">头条</a>
|
||||
</li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-weibo' %}">微博</a></li>
|
||||
<li role="presentation" class="active"><a
|
||||
href="{% url 'monitor-new-media-public-opinion-qita' %}">其他</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">微信热点</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-lg-6" style="margin-top: 10px">
|
||||
<div class="col-lg-3">
|
||||
公众号
|
||||
<select id="basicSelect">
|
||||
<option value="qita_all">全部</option>
|
||||
{% for q in qita %}
|
||||
<option value="{{ q.id }}">{{ q.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
分组
|
||||
<select id="basicSelect">
|
||||
<option value="group_all">全部</option>
|
||||
{% for g in group %}
|
||||
<option value="{{ g.id }}">{{ g.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<table class="table table-hover" style="font-size: 14px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">公众号</th>
|
||||
<th style="text-align: center">封面</th>
|
||||
<th style="text-align: center">标题</th>
|
||||
<th style="text-align: center">评论数</th>
|
||||
<th style="text-align: center">回复数</th>
|
||||
<th style="text-align: center">发布时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in res %}
|
||||
<tr>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.code }}</td>
|
||||
<td style="vertical-align: middle;text-align: center"><img
|
||||
src="{{ r.image.url }}" style="width: 40px;height: 40px;"
|
||||
class="img-circle"></td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.title }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.comment }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.reply }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,107 +1,107 @@
|
|||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<!-- START TOPBAR -->
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class="page-container row-fluid">
|
||||
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
<div class="chatapi-windows "></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-weixin' %}">微信</a></li>
|
||||
<li role="presentation" class="active"><a href="{% url 'monitor-new-media-public-opinion-toutiao' %}">头条</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-weibo' %}">微博</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-qita' %}">其他</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">微信热点</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-lg-6" style="margin-top: 10px">
|
||||
<div class="col-lg-3">
|
||||
公众号
|
||||
<select id="basicSelect">
|
||||
<option value="toutiao_all">全部</option>
|
||||
{% for t in toutiao %}
|
||||
<option value="{{ t.id }}">{{ t.code }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
分组
|
||||
<select id="basicSelect">
|
||||
<option value="group_all">全部</option>
|
||||
{% for g in group %}
|
||||
<option value="{{ g.id }}">{{ g.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<table class="table table-hover" style="font-size: 14px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">公众号</th>
|
||||
<th style="text-align: center">封面</th>
|
||||
<th style="text-align: center">标题</th>
|
||||
<th style="text-align: center">评论数</th>
|
||||
<th style="text-align: center">回复数</th>
|
||||
<th style="text-align: center">发布时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in res %}
|
||||
<tr>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.code }}</td>
|
||||
<td style="vertical-align: middle;text-align: center"><img src="{{ r.image.url }}" style="width: 40px;height: 40px;"
|
||||
class="img-circle"></td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.title }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.comment }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.reply }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<!-- START TOPBAR -->
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class="page-container row-fluid">
|
||||
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
<div class="chatapi-windows "></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-weixin' %}">微信</a></li>
|
||||
<li role="presentation" class="active"><a href="{% url 'monitor-new-media-public-opinion-toutiao' %}">头条</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-weibo' %}">微博</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-qita' %}">其他</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">微信热点</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-lg-6" style="margin-top: 10px">
|
||||
<div class="col-lg-3">
|
||||
公众号
|
||||
<select id="basicSelect">
|
||||
<option value="toutiao_all">全部</option>
|
||||
{% for t in toutiao %}
|
||||
<option value="{{ t.id }}">{{ t.code }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
分组
|
||||
<select id="basicSelect">
|
||||
<option value="group_all">全部</option>
|
||||
{% for g in group %}
|
||||
<option value="{{ g.id }}">{{ g.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<table class="table table-hover" style="font-size: 14px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">公众号</th>
|
||||
<th style="text-align: center">封面</th>
|
||||
<th style="text-align: center">标题</th>
|
||||
<th style="text-align: center">评论数</th>
|
||||
<th style="text-align: center">回复数</th>
|
||||
<th style="text-align: center">发布时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in res %}
|
||||
<tr>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.code }}</td>
|
||||
<td style="vertical-align: middle;text-align: center"><img src="{{ r.image.url }}" style="width: 40px;height: 40px;"
|
||||
class="img-circle"></td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.title }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.comment }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.reply }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,107 +1,107 @@
|
|||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<!-- START TOPBAR -->
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class="page-container row-fluid">
|
||||
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
<div class="chatapi-windows "></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation" ><a href="{% url 'monitor-new-media-public-opinion-weixin' %}">微信</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-toutiao' %}">头条</a></li>
|
||||
<li role="presentation" class="active"><a href="{% url 'monitor-new-media-public-opinion-weibo' %}">微博</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-qita' %}">其他</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">微信热点</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-lg-6" style="margin-top: 10px">
|
||||
<div class="col-lg-3">
|
||||
公众号
|
||||
<select id="basicSelect">
|
||||
<option value="weibo_all">全部</option>
|
||||
{% for w in weibo %}
|
||||
<option value="{{ w.id }}">{{ w.code }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
分组
|
||||
<select id="basicSelect">
|
||||
<option value="group_all">全部</option>
|
||||
{% for g in group %}
|
||||
<option value="{{ g.id }}">{{ g.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<table class="table table-hover" style="font-size: 14px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">公众号</th>
|
||||
<th style="text-align: center">封面</th>
|
||||
<th style="text-align: center">标题</th>
|
||||
<th style="text-align: center">评论数</th>
|
||||
<th style="text-align: center">回复数</th>
|
||||
<th style="text-align: center">发布时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in res %}
|
||||
<tr>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.code }}</td>
|
||||
<td style="vertical-align: middle;text-align: center"><img src="{{ r.image.url }}" style="width: 40px;height: 40px;"
|
||||
class="img-circle"></td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.title }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.comment }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.reply }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<!-- START TOPBAR -->
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class="page-container row-fluid">
|
||||
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
<div class="chatapi-windows "></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation" ><a href="{% url 'monitor-new-media-public-opinion-weixin' %}">微信</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-toutiao' %}">头条</a></li>
|
||||
<li role="presentation" class="active"><a href="{% url 'monitor-new-media-public-opinion-weibo' %}">微博</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-qita' %}">其他</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">微信热点</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-lg-6" style="margin-top: 10px">
|
||||
<div class="col-lg-3">
|
||||
公众号
|
||||
<select id="basicSelect">
|
||||
<option value="weibo_all">全部</option>
|
||||
{% for w in weibo %}
|
||||
<option value="{{ w.id }}">{{ w.code }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
分组
|
||||
<select id="basicSelect">
|
||||
<option value="group_all">全部</option>
|
||||
{% for g in group %}
|
||||
<option value="{{ g.id }}">{{ g.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<table class="table table-hover" style="font-size: 14px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">公众号</th>
|
||||
<th style="text-align: center">封面</th>
|
||||
<th style="text-align: center">标题</th>
|
||||
<th style="text-align: center">评论数</th>
|
||||
<th style="text-align: center">回复数</th>
|
||||
<th style="text-align: center">发布时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in res %}
|
||||
<tr>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.code }}</td>
|
||||
<td style="vertical-align: middle;text-align: center"><img src="{{ r.image.url }}" style="width: 40px;height: 40px;"
|
||||
class="img-circle"></td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.title }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.comment }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.reply }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,107 +1,107 @@
|
|||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<!-- START TOPBAR -->
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class="page-container row-fluid">
|
||||
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
<div class="chatapi-windows "></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation" class="active"><a href="{% url 'monitor-new-media-public-opinion-weixin' %}">微信</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-toutiao' %}">头条</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-weibo' %}">微博</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-qita' %}">其他</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">微信热点</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-lg-6" style="margin-top: 10px">
|
||||
<div class="col-lg-3">
|
||||
公众号
|
||||
<select id="basicSelect">
|
||||
<option value="weixin_all">全部</option>
|
||||
{% for w in weixin %}
|
||||
<option value="{{ w.id }}">{{ w.code }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
分组
|
||||
<select id="basicSelect">
|
||||
<option value="group_all">全部</option>
|
||||
{% for g in group %}
|
||||
<option value="{{ g.id }}">{{ g.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<table class="table table-hover" style="font-size: 14px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">公众号</th>
|
||||
<th style="text-align: center">封面</th>
|
||||
<th style="text-align: center">标题</th>
|
||||
<th style="text-align: center">评论数</th>
|
||||
<th style="text-align: center">回复数</th>
|
||||
<th style="text-align: center">发布时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in res %}
|
||||
<tr>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.code }}</td>
|
||||
<td style="vertical-align: middle;text-align: center"><img src="{{ r.image.url }}" style="width: 40px;height: 40px;"
|
||||
class="img-circle"></td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.title }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.comment }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.reply }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
{% extends 'dashboard/base/base.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<body class=" ">
|
||||
<!-- START TOPBAR -->
|
||||
|
||||
<!-- START CONTAINER -->
|
||||
<div class="page-container row-fluid">
|
||||
|
||||
<div class="page-sidebar ">
|
||||
{% include 'dashboard/base/left.html' %}
|
||||
</div>
|
||||
<section id="main-content" class=" ">
|
||||
<section class="wrapper" style='margin-top:60px;display:inline-block;width:100%;padding:15px 0 0 15px;'>
|
||||
{% if messages %}
|
||||
<div class="alert alert-success alert-dismissible" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
{% for message in messages %}
|
||||
{{ message }}.<br/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
<div class="chatapi-windows "></div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation" class="active"><a href="{% url 'monitor-new-media-public-opinion-weixin' %}">微信</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-toutiao' %}">头条</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-weibo' %}">微博</a></li>
|
||||
<li role="presentation"><a href="{% url 'monitor-new-media-public-opinion-qita' %}">其他</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">微信热点</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-lg-6" style="margin-top: 10px">
|
||||
<div class="col-lg-3">
|
||||
公众号
|
||||
<select id="basicSelect">
|
||||
<option value="weixin_all">全部</option>
|
||||
{% for w in weixin %}
|
||||
<option value="{{ w.id }}">{{ w.code }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
分组
|
||||
<select id="basicSelect">
|
||||
<option value="group_all">全部</option>
|
||||
{% for g in group %}
|
||||
<option value="{{ g.id }}">{{ g.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">Go!</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<!-- Default panel contents -->
|
||||
<table class="table table-hover" style="font-size: 14px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: center">公众号</th>
|
||||
<th style="text-align: center">封面</th>
|
||||
<th style="text-align: center">标题</th>
|
||||
<th style="text-align: center">评论数</th>
|
||||
<th style="text-align: center">回复数</th>
|
||||
<th style="text-align: center">发布时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for r in res %}
|
||||
<tr>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.code }}</td>
|
||||
<td style="vertical-align: middle;text-align: center"><img src="{{ r.image.url }}" style="width: 40px;height: 40px;"
|
||||
class="img-circle"></td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.title }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.comment }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.reply }}</td>
|
||||
<td style="vertical-align: middle;text-align: center">{{ r.date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
#新媒体舆情
|
||||
path('new/media/public/opinion/weixin/',views.new_media_public_opinion_weixin,name='monitor-new-media-public-opinion-weixin'),
|
||||
path('new/media/public/opinion/weibo/',views.new_media_public_opinion_weibo,name='monitor-new-media-public-opinion-weibo'),
|
||||
path('new/media/public/opinion/toutiao/',views.new_media_public_opinion_toutiao,name='monitor-new-media-public-opinion-toutiao'),
|
||||
path('new/media/public/opinion/qita/',views.new_media_public_opinion_qita,name='monitor-new-media-public-opinion-qita'),
|
||||
]
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
#新媒体舆情
|
||||
path('new/media/public/opinion/weixin/',views.new_media_public_opinion_weixin,name='monitor-new-media-public-opinion-weixin'),
|
||||
path('new/media/public/opinion/weibo/',views.new_media_public_opinion_weibo,name='monitor-new-media-public-opinion-weibo'),
|
||||
path('new/media/public/opinion/toutiao/',views.new_media_public_opinion_toutiao,name='monitor-new-media-public-opinion-toutiao'),
|
||||
path('new/media/public/opinion/qita/',views.new_media_public_opinion_qita,name='monitor-new-media-public-opinion-qita'),
|
||||
]
|
||||
|
|
154
monitor/views.py
154
monitor/views.py
|
@ -1,77 +1,77 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
from dashboard.models import Weixin, Weixin_data, Toutiao_data, Weibo_data, Qita_jc, Group, Toutiao, Weibo, Qita
|
||||
|
||||
|
||||
def new_media_public_opinion_weixin(request):
|
||||
weixin = Weixin.objects.all()
|
||||
group = Group.objects.all()
|
||||
weixin_data = Weixin_data.objects.all()
|
||||
res = []
|
||||
for w in weixin_data:
|
||||
o = dict()
|
||||
o['id'] = str(w.id)
|
||||
o['code'] = w.weixin.code
|
||||
o['image'] = w.weixin.image
|
||||
o['title'] = w.title
|
||||
o['comment'] = w.comment
|
||||
o['reply'] = w.reply
|
||||
o['date'] = w.date
|
||||
res.append(o)
|
||||
return render(request, 'monitor/new-media-public-opinion-weixin.html', {'res':res,'weixin':weixin,'group':group})
|
||||
|
||||
def new_media_public_opinion_toutiao(request):
|
||||
toutiao = Toutiao.objects.all()
|
||||
group = Group.objects.all()
|
||||
toutiao_data = Toutiao_data.objects.all()
|
||||
res = []
|
||||
for t in toutiao_data:
|
||||
o = dict()
|
||||
o['id'] = str(t.id)
|
||||
o['code'] = t.toutiao.code
|
||||
o['image'] = t.toutiao.image
|
||||
o['title'] = t.title
|
||||
o['count'] = t.count
|
||||
o['commentcount'] = t.commentcount
|
||||
o['reply'] = t.reply
|
||||
o['date'] = t.date
|
||||
res.append(o)
|
||||
return render(request, 'monitor/new-media-public-opinion-toutiao.html', {'res':res,'toutiao':toutiao,'group':group})
|
||||
|
||||
def new_media_public_opinion_weibo(request):
|
||||
weibo = Weibo.objects.all()
|
||||
group = Group.objects.all()
|
||||
weibo_data = Weibo_data.objects.all()
|
||||
res = []
|
||||
for w in weibo_data:
|
||||
o = dict()
|
||||
o['id'] = str(w.id)
|
||||
o['code'] = w.weibo.code
|
||||
o['image'] = w.weibo.image
|
||||
o['title'] = w.title
|
||||
o['like'] = w.like
|
||||
o['transpond'] = w.transpond
|
||||
o['comment'] = w.comment
|
||||
o['date'] = w.date
|
||||
res.append(o)
|
||||
return render(request, 'monitor/new-media-public-opinion-weibo.html', {'res':res,'weibo':weibo,'group':group})
|
||||
|
||||
def new_media_public_opinion_qita(request):
|
||||
qita = Qita.objects.all()
|
||||
group = Group.objects.all()
|
||||
qita_jc = Qita_jc.objects.all()
|
||||
res = []
|
||||
for q in qita_jc:
|
||||
o = dict()
|
||||
o['id'] = str(q.id)
|
||||
o['type'] = q.qita.type
|
||||
o['name'] = q.qita.name
|
||||
o['image'] = q.qita.image
|
||||
o['count'] = q.count
|
||||
o['count_jc'] = q.count_jc
|
||||
o['comment'] = q.comment
|
||||
o['reply'] = q.reply
|
||||
o['date'] = q.date
|
||||
res.append(o)
|
||||
return render(request, 'monitor/new-media-public-opinion-qita.html', {'res':res,'qita':qita,'group':group})
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
from dashboard.models import Weixin, Weixin_data, Toutiao_data, Weibo_data, Qita_jc, Group, Toutiao, Weibo, Qita
|
||||
|
||||
|
||||
def new_media_public_opinion_weixin(request):
|
||||
weixin = Weixin.objects.all()
|
||||
group = Group.objects.all()
|
||||
weixin_data = Weixin_data.objects.all()
|
||||
res = []
|
||||
for w in weixin_data:
|
||||
o = dict()
|
||||
o['id'] = str(w.id)
|
||||
o['code'] = w.weixin.code
|
||||
o['image'] = w.weixin.image
|
||||
o['title'] = w.title
|
||||
o['comment'] = w.comment
|
||||
o['reply'] = w.reply
|
||||
o['date'] = w.date
|
||||
res.append(o)
|
||||
return render(request, 'monitor/new-media-public-opinion-weixin.html', {'res':res,'weixin':weixin,'group':group})
|
||||
|
||||
def new_media_public_opinion_toutiao(request):
|
||||
toutiao = Toutiao.objects.all()
|
||||
group = Group.objects.all()
|
||||
toutiao_data = Toutiao_data.objects.all()
|
||||
res = []
|
||||
for t in toutiao_data:
|
||||
o = dict()
|
||||
o['id'] = str(t.id)
|
||||
o['code'] = t.toutiao.code
|
||||
o['image'] = t.toutiao.image
|
||||
o['title'] = t.title
|
||||
o['count'] = t.count
|
||||
o['commentcount'] = t.commentcount
|
||||
o['reply'] = t.reply
|
||||
o['date'] = t.date
|
||||
res.append(o)
|
||||
return render(request, 'monitor/new-media-public-opinion-toutiao.html', {'res':res,'toutiao':toutiao,'group':group})
|
||||
|
||||
def new_media_public_opinion_weibo(request):
|
||||
weibo = Weibo.objects.all()
|
||||
group = Group.objects.all()
|
||||
weibo_data = Weibo_data.objects.all()
|
||||
res = []
|
||||
for w in weibo_data:
|
||||
o = dict()
|
||||
o['id'] = str(w.id)
|
||||
o['code'] = w.weibo.code
|
||||
o['image'] = w.weibo.image
|
||||
o['title'] = w.title
|
||||
o['like'] = w.like
|
||||
o['transpond'] = w.transpond
|
||||
o['comment'] = w.comment
|
||||
o['date'] = w.date
|
||||
res.append(o)
|
||||
return render(request, 'monitor/new-media-public-opinion-weibo.html', {'res':res,'weibo':weibo,'group':group})
|
||||
|
||||
def new_media_public_opinion_qita(request):
|
||||
qita = Qita.objects.all()
|
||||
group = Group.objects.all()
|
||||
qita_jc = Qita_jc.objects.all()
|
||||
res = []
|
||||
for q in qita_jc:
|
||||
o = dict()
|
||||
o['id'] = str(q.id)
|
||||
o['type'] = q.qita.type
|
||||
o['name'] = q.qita.name
|
||||
o['image'] = q.qita.image
|
||||
o['count'] = q.count
|
||||
o['count_jc'] = q.count_jc
|
||||
o['comment'] = q.comment
|
||||
o['reply'] = q.reply
|
||||
o['date'] = q.date
|
||||
res.append(o)
|
||||
return render(request, 'monitor/new-media-public-opinion-qita.html', {'res':res,'qita':qita,'group':group})
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
import NewMediaMonitoring.wsgi
|
||||
import NewMediaMonitoring.wsgi
|
||||
application = NewMediaMonitoring.wsgi.application
|
290
polls/views.py
290
polls/views.py
|
@ -1,145 +1,145 @@
|
|||
from django.shortcuts import render
|
||||
from django.http import HttpResponse, JsonResponse
|
||||
from django.contrib.auth import get_user_model, authenticate, login
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django_token.models import Token
|
||||
import datetime
|
||||
|
||||
from .models import VerifyCode
|
||||
#这个地方sent_sms_code原先是send_sms_code,报错
|
||||
from .utils import generate_code, sent_sms_code
|
||||
|
||||
|
||||
def index(request):
|
||||
username = request.GET.get('username')
|
||||
password = request.GET.get('password')
|
||||
print(username, password)
|
||||
return JsonResponse({'status': 'error', 'message': '用户名或密码错误'})
|
||||
|
||||
|
||||
def status_500(request):
|
||||
return HttpResponse(status=500)
|
||||
|
||||
|
||||
def status_401(request):
|
||||
return HttpResponse(status=401)
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def polls_login(request):
|
||||
if request.method == 'POST':
|
||||
phone = request.POST.get('phone')
|
||||
password = request.POST.get('password')
|
||||
UserModel = get_user_model()
|
||||
user = UserModel.objects.filter(username=phone).first()
|
||||
if not user:
|
||||
return JsonResponse({'status': 'error', 'message': '用户名或密码错误'})
|
||||
|
||||
u = authenticate(request, username=phone, password=password)
|
||||
if u is not None:
|
||||
login(request, u)
|
||||
token = Token.objects.get_or_create(user=u)
|
||||
result = dict()
|
||||
profile = u.userprofile_set.first()
|
||||
result['phone'] = u.first_name
|
||||
result['token'] = token
|
||||
if profile:
|
||||
result['name'] = profile.name
|
||||
result['gender'] = profile.sex
|
||||
result['thumbnail'] = profile.image.path
|
||||
result['organization'] = profile.organization.name
|
||||
return JsonResponse({'status': 'success', 'message': result})
|
||||
else:
|
||||
return JsonResponse({'status': 'error', 'message': '用户名或密码错误'})
|
||||
else:
|
||||
return HttpResponse(status=405)
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def send_code(request):
|
||||
if request.method == 'GET':
|
||||
return HttpResponse(status=405)
|
||||
phone = request.POST.get('phone')
|
||||
category = request.POST.get('category', 0)
|
||||
if not phone:
|
||||
return JsonResponse({'status': 'error', 'message': '手机号不正确'})
|
||||
|
||||
exist_code = VerifyCode.objects.filter(
|
||||
phone=phone, category=category).first()
|
||||
if exist_code and exist_code.in_progress():
|
||||
return JsonResponse({'status': 'error', 'message': '验证码使用中'})
|
||||
|
||||
code = generate_code()
|
||||
now = datetime.datetime.now()
|
||||
after_10mins = now + datetime.timedelta(minutes=10)
|
||||
response = sent_sms_code(phone, code)
|
||||
result = response.decode('utf8')
|
||||
if "OK" in result:
|
||||
VerifyCode.objects.create(code=code, phone=phone, category=category)
|
||||
return JsonResponse({'status': 'success'})
|
||||
return JsonResponse({'status': 'error', 'message': '验证码发送失败'})
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def register_step_one(request):
|
||||
if request.method == 'GET':
|
||||
return HttpResponse(status=405)
|
||||
phone = request.POST.get('phone')
|
||||
code = request.POST.get('code')
|
||||
|
||||
UserModel = get_user_model()
|
||||
is_exists = UserModel.objects.filter(username=phone).exists()
|
||||
if is_exists:
|
||||
return JsonResponse({'status': 'error', 'message': '该手机号已经使用'})
|
||||
|
||||
verify_code = VerifyCode.objects.filter(
|
||||
phone=phone, code=code, category=0).first()
|
||||
if verify_code and verify_code.in_progress():
|
||||
return JsonResponse({'status': 'success', 'message': {phone: phone}})
|
||||
else:
|
||||
return JsonResponse({'status': 'error', 'message': '验证码超时,请重发'})
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def register_step_two(request):
|
||||
if request.method == 'GET':
|
||||
return HttpResponse(status=405)
|
||||
phone = request.POST.get('phone')
|
||||
name = request.POST.get('name')
|
||||
gender = request.POST.get('gender')
|
||||
password = request.POST.get('password')
|
||||
organization = request.POST.get('organization')
|
||||
UserModel = get_user_model()
|
||||
UserModel.objects.create_user(username=phone, password=password)
|
||||
return JsonResponse({'status': 'success', 'message': '注册成功'})
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def password_recover_step_one(request):
|
||||
if request.method == 'GET':
|
||||
return HttpResponse(status=405)
|
||||
phone = request.POST.get('phone')
|
||||
code = request.POST.get('code')
|
||||
verify_code = VerifyCode.objects.filter(
|
||||
phone=phone, code=code, category=1).first()
|
||||
if verify_code and verify_code.in_progress():
|
||||
return JsonResponse({'status': 'success', 'message': {phone: phone}})
|
||||
else:
|
||||
return JsonResponse({'status': 'error', 'message': '验证码超时,请重发'})
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def password_recover_step_two(request):
|
||||
if request.method == 'GET':
|
||||
return HttpResponse(status=405)
|
||||
phone = request.POST.get('phone')
|
||||
password = request.POST.get('password')
|
||||
password_confirm = request.POST.get('password_confirm')
|
||||
if password != password_confirm:
|
||||
return JsonResponse({'status': 'error', 'message': '两次密码输入不一致'})
|
||||
UserModel = get_user_model()
|
||||
user = UserModel.objects.filter(username=phone).first()
|
||||
if not user:
|
||||
return JsonResponse({'status': 'error', 'message': '用户名不存在'})
|
||||
user.set_password(password)
|
||||
return JsonResponse({'status': 'success', 'message': {phone: phone}})
|
||||
from django.shortcuts import render
|
||||
from django.http import HttpResponse, JsonResponse
|
||||
from django.contrib.auth import get_user_model, authenticate, login
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django_token.models import Token
|
||||
import datetime
|
||||
|
||||
from .models import VerifyCode
|
||||
#这个地方sent_sms_code原先是send_sms_code,报错
|
||||
from .utils import generate_code, sent_sms_code
|
||||
|
||||
|
||||
def index(request):
|
||||
username = request.GET.get('username')
|
||||
password = request.GET.get('password')
|
||||
print(username, password)
|
||||
return JsonResponse({'status': 'error', 'message': '用户名或密码错误'})
|
||||
|
||||
|
||||
def status_500(request):
|
||||
return HttpResponse(status=500)
|
||||
|
||||
|
||||
def status_401(request):
|
||||
return HttpResponse(status=401)
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def polls_login(request):
|
||||
if request.method == 'POST':
|
||||
phone = request.POST.get('phone')
|
||||
password = request.POST.get('password')
|
||||
UserModel = get_user_model()
|
||||
user = UserModel.objects.filter(username=phone).first()
|
||||
if not user:
|
||||
return JsonResponse({'status': 'error', 'message': '用户名或密码错误'})
|
||||
|
||||
u = authenticate(request, username=phone, password=password)
|
||||
if u is not None:
|
||||
login(request, u)
|
||||
token = Token.objects.get_or_create(user=u)
|
||||
result = dict()
|
||||
profile = u.userprofile_set.first()
|
||||
result['phone'] = u.first_name
|
||||
result['token'] = token
|
||||
if profile:
|
||||
result['name'] = profile.name
|
||||
result['gender'] = profile.sex
|
||||
result['thumbnail'] = profile.image.path
|
||||
result['organization'] = profile.organization.name
|
||||
return JsonResponse({'status': 'success', 'message': result})
|
||||
else:
|
||||
return JsonResponse({'status': 'error', 'message': '用户名或密码错误'})
|
||||
else:
|
||||
return HttpResponse(status=405)
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def send_code(request):
|
||||
if request.method == 'GET':
|
||||
return HttpResponse(status=405)
|
||||
phone = request.POST.get('phone')
|
||||
category = request.POST.get('category', 0)
|
||||
if not phone:
|
||||
return JsonResponse({'status': 'error', 'message': '手机号不正确'})
|
||||
|
||||
exist_code = VerifyCode.objects.filter(
|
||||
phone=phone, category=category).first()
|
||||
if exist_code and exist_code.in_progress():
|
||||
return JsonResponse({'status': 'error', 'message': '验证码使用中'})
|
||||
|
||||
code = generate_code()
|
||||
now = datetime.datetime.now()
|
||||
after_10mins = now + datetime.timedelta(minutes=10)
|
||||
response = sent_sms_code(phone, code)
|
||||
result = response.decode('utf8')
|
||||
if "OK" in result:
|
||||
VerifyCode.objects.create(code=code, phone=phone, category=category)
|
||||
return JsonResponse({'status': 'success'})
|
||||
return JsonResponse({'status': 'error', 'message': '验证码发送失败'})
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def register_step_one(request):
|
||||
if request.method == 'GET':
|
||||
return HttpResponse(status=405)
|
||||
phone = request.POST.get('phone')
|
||||
code = request.POST.get('code')
|
||||
|
||||
UserModel = get_user_model()
|
||||
is_exists = UserModel.objects.filter(username=phone).exists()
|
||||
if is_exists:
|
||||
return JsonResponse({'status': 'error', 'message': '该手机号已经使用'})
|
||||
|
||||
verify_code = VerifyCode.objects.filter(
|
||||
phone=phone, code=code, category=0).first()
|
||||
if verify_code and verify_code.in_progress():
|
||||
return JsonResponse({'status': 'success', 'message': {phone: phone}})
|
||||
else:
|
||||
return JsonResponse({'status': 'error', 'message': '验证码超时,请重发'})
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def register_step_two(request):
|
||||
if request.method == 'GET':
|
||||
return HttpResponse(status=405)
|
||||
phone = request.POST.get('phone')
|
||||
name = request.POST.get('name')
|
||||
gender = request.POST.get('gender')
|
||||
password = request.POST.get('password')
|
||||
organization = request.POST.get('organization')
|
||||
UserModel = get_user_model()
|
||||
UserModel.objects.create_user(username=phone, password=password)
|
||||
return JsonResponse({'status': 'success', 'message': '注册成功'})
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def password_recover_step_one(request):
|
||||
if request.method == 'GET':
|
||||
return HttpResponse(status=405)
|
||||
phone = request.POST.get('phone')
|
||||
code = request.POST.get('code')
|
||||
verify_code = VerifyCode.objects.filter(
|
||||
phone=phone, code=code, category=1).first()
|
||||
if verify_code and verify_code.in_progress():
|
||||
return JsonResponse({'status': 'success', 'message': {phone: phone}})
|
||||
else:
|
||||
return JsonResponse({'status': 'error', 'message': '验证码超时,请重发'})
|
||||
|
||||
|
||||
@csrf_exempt
|
||||
def password_recover_step_two(request):
|
||||
if request.method == 'GET':
|
||||
return HttpResponse(status=405)
|
||||
phone = request.POST.get('phone')
|
||||
password = request.POST.get('password')
|
||||
password_confirm = request.POST.get('password_confirm')
|
||||
if password != password_confirm:
|
||||
return JsonResponse({'status': 'error', 'message': '两次密码输入不一致'})
|
||||
UserModel = get_user_model()
|
||||
user = UserModel.objects.filter(username=phone).first()
|
||||
if not user:
|
||||
return JsonResponse({'status': 'error', 'message': '用户名不存在'})
|
||||
user.set_password(password)
|
||||
return JsonResponse({'status': 'success', 'message': {phone: phone}})
|
||||
|
|
|
@ -6,4 +6,4 @@ django-cors-headers
|
|||
aliyun-python-sdk-core-v3
|
||||
channels
|
||||
requests
|
||||
parsel
|
||||
parsel
|
||||
|
|
7276
static/js/scripts.js
7276
static/js/scripts.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue