Commit 457a8a92 by 孙贺洋

初始提交

parents
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="FacetManager">
<facet type="django" name="Django">
<configuration>
<option name="rootFolder" value="$MODULE_DIR$" />
<option name="settingsModule" value="TYUT_Lost_Found/settings.py" />
<option name="manageScript" value="$MODULE_DIR$/manage.py" />
<option name="environment" value="&lt;map/&gt;" />
<option name="doNotUseTestRunner" value="false" />
<option name="trackFilePattern" value="migrations" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/Lost_Found/templates" />
</list>
</option>
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/TYUT_Lost_Found.iml" filepath="$PROJECT_DIR$/.idea/TYUT_Lost_Found.iml" />
</modules>
</component>
</project>
\ No newline at end of file
from django.contrib import admin
from .models import Users,Object_hunting,Recruitment
# Register your models here.
admin.site.register(Users)
admin.site.register(Object_hunting)
admin.site.register(Recruitment)
\ No newline at end of file
from django.apps import AppConfig
class LostFoundConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'Lost_Found'
# Generated by Django 3.2.12 on 2022-02-22 16:05
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Users',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('user_name', models.CharField(max_length=45)),
('user_id', models.CharField(max_length=20)),
('user_tel', models.CharField(default='', max_length=25)),
('user_password', models.CharField(max_length=100)),
('user_toxiang', models.ImageField(default='', upload_to='img')),
],
),
migrations.CreateModel(
name='Recruitment',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('r_name', models.CharField(max_length=50)),
('r_classification', models.CharField(max_length=20)),
('r_detail', models.CharField(default='主人没有留下哦!', max_length=300)),
('r_date', models.IntegerField(default=0)),
('r_place', models.CharField(default='主人没有留下哦!', max_length=200)),
('r_contact_details', models.CharField(max_length=50)),
('r_publish_time', models.DateTimeField(auto_now_add=True)),
('o_piicture', models.ImageField(default='https://tse4-mm.cn.bing.net/th/ id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1', height_field=400, upload_to='img', width_field=400)),
('users', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Lost_Found.users')),
],
),
migrations.CreateModel(
name='Object_hunting',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('o_name', models.CharField(max_length=50)),
('o_classification', models.CharField(max_length=20)),
('o_detail', models.CharField(default='主人没有留下哦!', max_length=300)),
('o_date', models.CharField(default='', max_length=25)),
('o_place', models.CharField(default='主人没有留下哦!', max_length=200)),
('o_contact_details', models.CharField(max_length=50)),
('o_publish_time', models.DateTimeField(auto_now_add=True)),
('o_piicture', models.ImageField(default='https://tse4-mm.cn.bing.net/th/ id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1', height_field=400, upload_to='img', width_field=400)),
('users', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Lost_Found.users')),
],
),
]
# Generated by Django 3.2.12 on 2022-02-22 16:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Lost_Found', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='object_hunting',
name='o_piicture',
field=models.ImageField(default='https://tse4-mm.cn.bing.net/th/ id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1', upload_to='img'),
),
migrations.AlterField(
model_name='recruitment',
name='o_piicture',
field=models.ImageField(default='https://tse4-mm.cn.bing.net/th/ id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1', upload_to='img'),
),
migrations.AlterField(
model_name='recruitment',
name='r_date',
field=models.CharField(default='', max_length=25),
),
]
# Generated by Django 3.2.12 on 2022-02-24 00:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('Lost_Found', '0002_auto_20220222_1619'),
]
operations = [
migrations.RenameField(
model_name='object_hunting',
old_name='o_piicture',
new_name='o_picture',
),
migrations.RenameField(
model_name='recruitment',
old_name='o_piicture',
new_name='r_picture',
),
]
# Generated by Django 3.2.12 on 2022-02-27 06:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Lost_Found', '0003_auto_20220224_0026'),
]
operations = [
migrations.CreateModel(
name='shijian',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('classification', models.CharField(max_length=32, null=True)),
('start_time', models.IntegerField(null=True)),
('end_time', models.IntegerField(null=True)),
('keyword', models.CharField(max_length=100, null=True)),
],
),
]
from distutils.command.upload import upload
from email.policy import default
from django.db import models
from django.forms import ImageField
# Create your models here.
#用户信息
class Users(models.Model): #my
user_name = models.CharField(max_length=45) #用户名
user_id = models.CharField(max_length=20) #用户账号(ID)
user_tel = models.CharField(max_length=25, default="") #用户tel
user_password = models.CharField(max_length=100) #用户密码
user_toxiang = models.ImageField(default="",upload_to='img') #用户头像
# content = {'user_name':user_name,'user_id':user_id,'user_password':user_password}
# def __str__(self):
# return self.content
#寻物
class Object_hunting(models.Model):
o_name = models.CharField(max_length=50) #物品名称,字符串类型,最大长度为50/3
o_classification = models.CharField(max_length=20) #物品分类 ,字符串类型,最大长度为20/3
o_detail = models.CharField(max_length=300,default='主人没有留下哦!') #物品详情,字符串类型,最大长度为300/3
o_date = models.CharField(max_length=25,default="") #日期2022年2月1日 存入数据库示例:20220201 长整型
o_place = models.CharField(max_length=200,default='主人没有留下哦!') #地点 字符串类型, 最大长度为200/3
o_contact_details = models.CharField(max_length=50) #联系方式 字符串类型, 最大长度为50/3
o_publish_time = models.DateTimeField(auto_now_add=True) #发布时间 字符串类型,自动记录电脑或手机当前时间
o_picture = models.ImageField(default="https://tse4-mm.cn.bing.net/th/\
id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1",upload_to='img') #物品图片
users = models.ForeignKey(Users,on_delete=models.CASCADE) #外键,将每个用户与他发布的贴子关联 老师-->学生
# content = {'o_name':o_name,'o_classificatio':o_classification,'o_detail':o_detail,'o_date':o_date,'o_place':o_place,
# 'o_contact_details':o_contact_details,'o_publish_time':o_publish_time}
# def __str__(self):
# return self.content
#招领
class Recruitment(models.Model):
r_name = models.CharField(max_length=50) #物品名称,字符串类型,最大长度为50/3
r_classification = models.CharField(max_length=20) #物品分类,字符串类型,最大长度为20/3
r_detail = models.CharField(max_length=300,default='主人没有留下哦!') #物品详情,字符串类型,最大长度为300/3
r_date = models.CharField(max_length=25,default="") #日期2022年2月1日 存入数据库示例:20220201 长整型
r_place = models.CharField(max_length=200,default='主人没有留下哦!') #地点 字符串类型, 最大长度为200/3
r_contact_details = models.CharField(max_length=50) #联系方式 字符串类型, 最大长度为50/3
r_publish_time = models.DateTimeField(auto_now_add=True) #发布时间 字符串类型,自动记录电脑或手机当前时间
r_picture = models.ImageField(default="https://tse4-mm.cn.bing.net/th/\
id/OIP-C.oSootNOXWtKqqXkJkFgl9wHaFj?pid=ImgDet&rs=1",upload_to='img') #物品图片
users = models.ForeignKey(Users,on_delete=models.CASCADE) #外键,将每个用户与他发布的贴子关联 老师-->学生
# content = {'r_name':r_name,'r_classificatio':r_classification,'r_detail':r_detail,'r_date':r_date,'r_place':r_place,
# 'r_contact_details':r_contact_details,'r_publish_time':r_publish_time}
# def __str__(self):
# return self.content
#搜索功能
class shijian(models.Model):
classification = models.CharField(max_length=32,null=True)
start_time = models.IntegerField(null=True)
end_time = models.IntegerField(null=True)
keyword = models.CharField(max_length=100,null=True)
\ No newline at end of file
p {
line-height: 35px;
margin-left: 300px;
margin-right: 300px;
}
h1 {
margin-left: 300px;
margin-right: 300px;
font-size: x-large;
}
h2 {
line-height: 35px;
margin-left: 300px;
margin-right: 300px;
}
ul {
line-height: 35px;
margin-left: 300px;
margin-right: 300px;
}
div {
width: 100px;
height: 30px;
border: 1px solid;
border-radius: 20px;
background-color: black;
}
span {
color: white;
/* margin-top: 0px; */
margin-left: 18px;
line-height: 30px;
}
* {
margin: 0;
padding: 0;
}
/* :root根伪类 --为自定义属性 方便我们重复使用同一个属性 自定义属性使用var(--white);进行调用 */
:root {
/* 颜色 */
--white: #e9e9e9;
--gray: #333;
--blue: #0367a6;
--lightblue: #008997;
/* 外边框圆角属性 */
--button-radius: 0.7rem;
/* 最大宽、高 的值*/
--max-width: 758px;
--max-height: 420px;
/* 字体样式 */
font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
body .container .container_form {
height: 100%;
position: absolute;
top: 0;
left: 0;
transition: all 0.6s ease-in-out;
transform: translateX(0);
width: 50%;
}
body .container .container_form .form {
background-color: var(--white);
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
height: 100%;
padding: 0 3rem;
text-align: center;
}
body .container .container_form .form .form_title {
font-weight: 300;
margin: 14px 0 1.25rem;
}
body .container .container_form .form .input {
background-color: #fff;
border: none;
padding: 0.9rem 0.9rem;
margin: 0.3rem 0;
width: 100%;
}
body .container .container_form .form .btn {
margin-top: 1.5rem;
}
body .container .container_signin {
z-index: 3;
}
body .container .container_signin .link {
color: var(--gray);
font-size: 0.9rem;
margin: 1.5rem 0;
text-decoration: none;
}
body .container .container_signup {
z-index: 2;
}
body .container .btn {
background-color: var(--blue);
background-image: linear-gradient(
90deg,
var(--blue) 0%,
var(--lightblue) 74%
);
border-radius: 20px;
border: 1px solid var(--blue);
color: var(--white);
cursor: pointer;
font-size: 0.8rem;
font-weight: bold;
letter-spacing: 0.1rem;
padding: 0.9rem 4rem;
text-transform: uppercase;
transition: all 0.6s ease-in-out;
margin-bottom: 20px;
}
body .container .button{
position: absolute;
margin-bottom: 25px;
margin-left: 190px;
border: #bbbbbb solid 1px;
color: silver;
}
body .container .button:hover{
border: #0367a6 solid 1px;
color: #0367a6;
background: yellowgreen;
}
body .container .btn:active {
transform: scale(0.95);
}
body .container .btn:focus {
outline: none;
}
body .container .overlay_panel {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
height: 100%;
width: 50%;
position: absolute;
right: 0;
transition: all 0.6s ease-in-out;
transform: translateX(0);
}
body .container .overlay_left {
z-index: 2;
transition: all 0.6s ease-in-out;
}
body .container .overlay_right {
z-index: 3;
transition: all 0.6s ease-in-out;
}
body .right_panel_active .container_form {
transform: translateX(100%);
}
body .right_panel_active .container_signup {
z-index: 3;
}
body .right_panel_active .container_signin {
z-index: 2;
}
body .right_panel_active .overlay_panel {
transform: translateX(-100%);
}
body .right_panel_active .overlay_left {
z-index: 3;
}
body .right_panel_active .overlay_right {
z-index: 2;
}
.Logo {
position: relative;
float: none;
height: 60px;
width: 60px;
margin-bottom: -22px;
}
* {
margin: 0;
padding: 0;
}
/* :root根伪类 --为自定义属性 方便我们重复使用同一个属性 自定义属性使用var(--white);进行调用 */
:root {
/* 颜色 */
--white: #e9e9e9;
--gray: #333;
--blue: #0367a6;
--lightblue: #008997;
/* 外边框圆角属性 */
--button-radius: 0.7rem;
/* 最大宽、高 的值*/
--max-width: 758px;
--max-height: 420px;
/* 字体样式 */
font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
/*无关变量————————————————————————————————————————————————————————————————————————————————————*/
body .container .container_form {
height: 100%;
position: absolute;
top: 0;
left: 0;
transition: all 0.6s ease-in-out;
transform: translateX(0);
width: 50%;
margin-left: 210px;
}
body .container .container_form .form {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
height: 100%;
padding: 0 3rem;
text-align: center;
color: #ffffff;
}
body .container .container_form .form .form_title {
font-weight: 300;
margin: 14px 0 1.25rem;
}
body .container .container_form .form .input {
/*background-color: #fff;*/
border: none;
padding: 0.9rem 0.9rem;
margin: 0.3rem 0;
width: 100%;
background:rgba(0,0,0,0.5); filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7F000000,endcolorstr=#7F000000);
}
body .container .container_form .form .btn {
margin-top: 1.5rem;
}
body .container .container_signin {
z-index: 3;
}
body .container .container_signin .link {
color: var(--gray);
font-size: 0.9rem;
margin: 1.5rem 0;
text-decoration: none;
}
body .container .container_signup {
z-index: 2;
}
body .container .btn {
background-color: var(--blue);
background-image: linear-gradient(
90deg,
var(--blue) 0%,
var(--lightblue) 74%
);
border-radius: 20px;
border: 1px solid var(--blue);
color: var(--white);
cursor: pointer;
font-size: 0.8rem;
font-weight: bold;
letter-spacing: 0.1rem;
padding: 0.9rem 4rem;
text-transform: uppercase;
transition: all 0.6s ease-in-out;
margin-bottom: 20px;
}
body .container .button{
position: absolute;
margin-bottom: 25px;
margin-left: 190px;
border: #bbbbbb solid 1px;
color: silver;
margin-top: 165px;
background:rgba(0,0,0,0.1); filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7F000000,endcolorstr=#7F000000);
}
body .container .button_x{
position: absolute;
filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7F000000,endcolorstr=#7F000000);
background: var(--blue) linear-gradient(
90deg,
var(--blue) 0%,
var(--lightblue) 74%
);
border-radius: 20px;
border: 1px solid var(--blue);
color: var(--white);
cursor: pointer;
font-size: 0.8rem;
font-weight: bold;
letter-spacing: 0.1rem;
padding: 0.9rem 0.7rem;
text-transform: uppercase;
transition: all 0.6s ease-in-out;
margin-top: 290px;
margin-left: 280px;
text-decoration: none;
}
body .container .button:hover{
border: #0367a6 solid 1px;
color: #0367a6;
background: yellowgreen;
}
body .container .btn:active {
transform: scale(0.95);
}
body .container .btn:focus {
outline: none;
}
body .container .overlay_panel {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
height: 100%;
width: 50%;
position: absolute;
right: 0;
transition: all 0.6s ease-in-out;
transform: translateX(0);
}
body .container .overlay_left {
z-index: 2;
transition: all 0.6s ease-in-out;
}
body .container .overlay_right {
z-index: 3;
transition: all 0.6s ease-in-out;
}
body .right_panel_active .container_form {
transform: translateX(100%);
}
body .right_panel_active .container_signup {
z-index: 3;
}
body .right_panel_active .container_signin {
z-index: 2;
}
body .right_panel_active .overlay_panel {
transform: translateX(-100%);
}
body .right_panel_active .overlay_left {
z-index: 3;
}
body .right_panel_active .overlay_right {
z-index: 2;
}
.Logo {
position: relative;
float: none;
height: 60px;
width: 60px;
/*margin-bottom: -22px;*/
margin-top: 110px;
}
body {
background-color: #e6e0da;
margin:0;
padding:0;
display: flex;
}
.navigation {
width: 100%;
height: 50px;
background-color: rgb(0,0,0,0.82);
/*display: flex;*/
/*justify-content: center;*/
position: fixed;
z-index: 10;
}
.navigation div {
height: 100%;
width: 120px;
border-right: 1px solid white;
border-left: 1px solid white;
}
.navigation a {
width: 100px;
text-decoration: none;
font-size: initial;
line-height: 50px;
color: white;
text-align: center;
border-left: 1px solid;;
}
.navigation .logo{
position: absolute;
margin-left: -1400px;
height: 50px;
}
.last {
border-right: 1px solid;
float: right;
}
.before{
float: left;
border-right: 1px solid;
}
.navigation a:hover {
background-color: rgb(230,224,218,0.7);
color: #000000;
}
.per_center {
width: 160px;
height: 300px;
margin-left: 60px;
margin-top: 130px;
border-radius: 20px;
box-shadow:-10px -5px 25px -5px;
border: outset;
}
.content p{
margin-left: 20px;
margin-right: 10px;
margin-top: 25px;
font-size: large;
font-family: fangsong;
border-style: outset;
}
.per_center img {
width: 80px;
height: 80px;
border-radius: 60px;
margin-left: 40px;
margin-top: 25px;
z-index: 0;
}
.typ {
}
@keyframes scaleDraw { /*定义关键帧、scaleDrew是需要绑定到选择器的关键帧名称*/
0%{
transform: scale(1); /*开始为原始大小*/
}
25%{
transform: scale(1.1); /*放大1.1倍*/
}
50%{
transform: scale(1);
}
75%{
transform: scale(1.1);
}
}
.per_center{
-webkit-animation-name: scaleDraw; /*关键帧名称*/
-webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
-webkit-animation-iteration-count: infinite; /*动画播放的次数*/
-webkit-animation-duration: 5s; /*动画所花费的时间*/
}
.release {
width: 900px;
border-top: 50px solid rgb(0,0,0,0.82);
margin-left: 50px;
margin-top: 131px;
box-shadow:-10px -5px 25px -5px;
}
.box{
width: 100%;
height: 123px;
border: 1px solid black;
}
/*按钮区——————————————————————————————————————————————————————————————————*/
.box{
display: flex;
}
.release .box .pictures{
height: 120px;
width: 120px;
}
.release .box .pictures:hover{
border: yellowgreen 2px solid;
}
.public_container{
width: 1200px;
margin: 100px auto;
}
.out_load{
width: 200px;
height: 70px;
border-radius: 25px;
background: linear-gradient(to bottom right, #000 , #cfd2db , #000); /* 标准的语法 */
font-size: 25px;
margin: 25px 400px;
border: 0;
}
.out_load:hover{
/*margin-top: 28px;*/
box-shadow: 0 10px 25px #000;
}
.Logo {
width: 40px;
position: relative;
left: 31%;
}
body {
margin:0;
padding:0;
background-color: #e6e0da;
margin-bottom: 50px;
}
.navigation {
width: 100%;
height: 50px;
background-color: rgb(0,0,0,0.82);
/*display: flex;*/
/*justify-content: center;*/
position: fixed;
z-index: 3333;
}
.navigation div {
height: 100%;
width: 120px;
border-right: 1px solid white;
border-left: 1px solid white;
z-index: 333;
}
.navigation a {
width: 100px;
text-decoration: none;
font-size: initial;
line-height: 50px;
color: white;
text-align: center;
border-left: 1px solid;
font-family: fantasy;
}
.last {
border-right: 1px solid;
float: right;
text-align: end;
}
.before{
float: left;
border-right: 1px solid;
}
.navigation a:hover {
background-color: rgb(230,224,218,0.7);
color: #000000;
}
.Logo {
width: 40px;
position: relative;
left: 27.7%;
margin-top: 5px;
}
.first {
width: 900px;
height: 1300px;
margin: auto;
border: 2px solid #e6e0da;
}
.box {
width: 100%;
border: 2px solid black;
margin-top: 100px;
border-top: 60px solid;
background-color: white;
}
.box1 {
width: 100%;
height: 100px;
border-bottom: 2px solid black;
}
.must {
display: block;
margin-top: 15px;
color: #000000;
font-family: fangsong;
font-size: larger;
margin-left: 15px;
}
.box1 select{
margin-left: 400px;
margin-top: -10px;
width: 125px;
height: 33px;
}
.box2 {
width: 100%;
border-bottom: 2px solid black;
}
.box2 select {
margin-left: 150px;
width: 100px;
height: 30px;
}
.box2 p,
span{
display: inline;
}
.name {
margin-top: 15px;
}
.box2 p {
margin-left: 45px;
font-size: 25px;
font-family: cursive;
}
.input {
margin: 0 auto;
border: 0;
background: none;
width: 680px;
height: 23px;
font-size: 20px;
font-weight: 300;
color: black;
outline: 0;
border-bottom: 1px solid #c5c0aa;
font-family: YouYuan;
}
.box2 div {
line-height: 70px;
margin-left: 45px;
}
.box2 span {
font-size: 25px;
font-family: cursive;
}
textarea {
width: 500px;
height: 120px;
border: outset;
resize: none;
outline: none;
font-size: 20px;
font-weight: 300;
font-family: YouYuan;
}
.box3 {
width: 100%;
border-bottom: 2px solid black;
}
.box3 div{
height: 75px;
margin-left: 45px;
font-size: 25px;
font-family: cursive;
}
.box3 label {
font-size: large;
}
.input1 {
margin: 0 auto;
border: 0;
background: none;
width: 607px;
height: 23px;
font-size: 20px;
font-weight: 300;
color: black;
outline: 0;
border-bottom: 1px solid #c5c0aa;
font-family: YouYuan;
}
.input2 {
border: outset;
font-family: YouYuan;
outline: none;
}
.box4 {
width: 100%;
height: 200px;
border-bottom: 2px solid black;
display: flex;
}
.box4 p {
font-size: x-large;
margin-left: 15px;
font-family: fangsong;
}
.box4 div {
width: 150px;
height: 150px;
margin-top: 35px;
margin-left: 25px;;
}
.box5 {
height: 150px;
}
.box5 button{
width: 130px;
height: 50px;
margin-left: 385px;
margin-top: 50px;
font-family: auto;
font-size: 25px;
}
\ No newline at end of file
body {
margin:0;
padding:0;
background-color: #e6e0da;
margin-bottom: 50px;
}
.navigation {
width: 100%;
height: 50px;
background-color: rgb(0,0,0,0.82);
/*display: flex;*/
/*justify-content: center;*/
position: fixed;
z-index: 10;
}
.navigation div {
height: 100%;
width: 120px;
border-right: 1px solid white;
border-left: 1px solid white;
}
.navigation a {
width: 100px;
text-decoration: none;
font-size: initial;
line-height: 50px;
color: white;
text-align: center;
border-left: 1px solid;;
}
.last {
border-right: 1px solid;
float: right;
}
.before{
float: left;
border-right: 1px solid;
}
.navigation a:hover {
background-color: rgb(230,224,218,0.7);
color: #000000;
}
.first {
width: 1300px;
height: 1544px;
display: flex;
margin: auto;
}
.box {
box-shadow: -10px -5px 25px -5px;
border: 4px;
border-style: inset;
width: 59%;
margin: auto;
margin-top: 119px;
margin-bottom: 50px;
background-color: white;
}
.picture {
width: 100%;
height: 500px;
border-bottom: 2px solid #0a0a0a;
}
.banner{
position: relative;/*相对定位 给绝对定位位置参考*/
width: 100%;
height: 300px;
float: left;
}
.banner .item{
display: none;
position: absolute;
width: 100%;
height: 300px;
top: 0;
left: 0;
margin-left: 180px;
}
ul{
list-style-type: none;/*清除默认列表样式 ....*/
margin: 0;
padding: 0;/*内外编剧清除*/
}
.lunbo{
width: 80%;
height: 371px;
margin-top: 59px;
margin-left: -90px;
}
/*左右按钮的属性设置*/
.lr-tab .btn{
position: absolute;
top: 120px;
width: 41px;
height: 69px;
}
.lr-tab .left{
left: 0px;
background-position-x: -83px;
}
.lr-tab .right{
right: 0px;
background-position-x: -125px;
}
/*左右按钮触碰事件*/
.lr-tab .left:hover{
background-position-x: 0px;
}
.lr-tab .right:hover{
background-position-x: -41px;
}
/*圆形按钮属性设定*/
.tab-btn{
position: absolute;
right: 40px;
bottom: 20px;
width: 120px;
height: 30px;
top: 270px;
margin-top: 110px;
margin-right: 45px;
}
.tab-btn .btn{
float: left;
width: 6px;
height: 6px;
background: #868686;
border: 2px solid #c3c3c3;/*边框*/
margin-left: 10px;
border-radius: 60px;
}
/*圆形按钮触碰事件*/
.tab-btn .btn:hover{
background: #e4e4e4;
border-color:#7f7f7f;
}
.tab-btn .active{
background: #e4e4e4;
border-color:#7f7f7f;
}
.information {
width: 100%;
border-bottom: 1px solid #000;
}
.information b {
margin-left: 10px;
font-family: cursive;
}
.information p {
font-size: 25px;
font-family: cursive;
margin-left: 80px;
margin-right: 50px;
}
.information p span {
font-size: 20px;
font-family: cursive;
}
.recevice {
height: 140px;
}
/* .recevice a{
text-decoration: none;
text-align: center;
font-size: xxx-large;
color: #000000;
margin-left: 52px;
position: relative;
left:200px ;
} */
.recevice button {
width: 200px;
margin: auto;
margin-top: 50px;
height: 70px;
border-radius: 25px;
background: -webkit-linear-gradient(left top, #000 , #d2dcff , #000); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(bottom right, #000 , #d2dcff , #000); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(bottom right, #000 , #8b8fa0 , #000); /* Firefox 3.6 - 15 */
background: linear-gradient(to bottom right, #000 , #8b8fa0 , #000); /* 标准的语法 */
position: relative;
left: 280px;
font-size: 30px;
}
.top {
box-shadow:-10px -5px 25px -5px;
width: 101%;
height: 80px;
margin-top: -84px;
margin-left: -3px;
background: -webkit-linear-gradient(left top, #000 , #0b247d , #000); /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(bottom right, #000 , #0b247d , #000); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(bottom right, #000 , #0b247d , #000); /* Firefox 3.6 - 15 */
background: linear-gradient(to bottom right, #000 , #0b247d , #000); /* 标准的语法 */
}
.other {
box-shadow:-10px -5px 25px -5px;
border: 2px solid #0b247d;
border: outset;
width: 13.3%;
height: 300px;
margin-top: 116px;
margin-right: -100px;
margin-left: 15px;
border-radius: 20px;
/* background-image: url(img/b13066835024473.jpg); */
}
.other h1 {
margin-left: 10px;
margin-top: -2px;
}
.other img {
height: 85px;
width: 85px;
border-radius: 60px;
/* margin: auto; */
margin-left: 35px;
margin-top: -15px;
position: relative;
left: 15px;
}
.other p {
margin-left: 20px;
margin-right: 10px;
margin-top: 25px;
font-size: large;
font-family: fangsong;
border-style: outset;
}
.person {
box-shadow:-10px -5px 25px 0px;
border: 2px solid #0b247d;
border: outset;
/* border-top: 6px solid ; */
width: 13.3%;
height: 350px;
margin-top: 116px;
margin-left: -100px;
margin-right: 30px;
border-radius: 20px;
}
button:hover{
margin-top: 47px;
box-shadow: 0 10px 25px #000;
}
.Logo {
width: 40px;
position: relative;
left: 31%;
}
body {
margin:0;
padding:0;
background-color: #e6e0da;
margin-bottom: 50px;
}
.navigation {
width: 100%;
height: 50px;
background-color: rgb(0,0,0,0.82);
/*display: flex;*/
/*justify-content: center;*/
position: fixed;
z-index: 3333;
}
.navigation div {
height: 100%;
width: 120px;
border-right: 1px solid white;
border-left: 1px solid white;
z-index: 333;
}
.navigation a {
width: 100px;
text-decoration: none;
font-size: initial;
line-height: 50px;
color: white;
text-align: center;
border-left: 1px solid;
font-family: fantasy;
}
.last {
border-right: 1px solid;
float: right;
text-align: end;
}
.before{
float: left;
border-right: 1px solid;
}
.navigation a:hover {
background-color: rgb(230,224,218,0.7);
color: #000000;
}
/* 搜索栏 */
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Consolas, serif;
}
.search-box{
position: relative;
width: 65px;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
transition: 0.5s;
margin: 0 auto;
top:90px;
}
.search-box:hover{
width: 800px;
}
.search-box::before{
content: '';
position: absolute;
top: 0;
left: 0;
width: 10px;
height: 100%;
background: linear-gradient(#ffffff,#ffffff,#e3e3e3);
z-index: 1;
filter: blur(1px);
}
.search-box::after{
content: '';
position: absolute;
top: 0;
right: -1px;
width: 10px;
height: 100%;
background: #9d9d9d;
z-index: 1;
filter: blur(1px);
}
.shadow{
position: absolute;
top: 0;
left: -50px;
width: calc(100% + 50px);
height: 300px;
background: linear-gradient(180deg,rgba(0,0,0,0.1),transparent,transparent);
transform-origin: top;
transform: skew(45deg);
pointer-events: none;
}
.shadow::before{
content: '';
position: absolute;
width: 50px;
height: 50px;
background: #e6e0da;/*小三角*/
z-index: 1;
}
.search-box input{
position: relative;
width: 100%;
height: 100%;
border: none;
padding: 10px 25px;
outline: none;
font-size: 1.1em;
color: #555555;
background: linear-gradient(#dbdae1,#a3aaba);
box-shadow: 5px 5px 5px rgba(0,0,0,0.1),
15px 15px 15px rgba(0,0,0,0.1),
20px 20px 15px rgba(0,0,0,0.1),
30px 30px 15px rgba(0,0,0,0.1);
/* inset: 1px 1px 2px #fff; */
}
.search-box input::placeholder,
.search-box input
{
color: transparent;
}
.search-box:hover input::placeholder,
.search-box:hover input
{
color: #555555;
}
ion-icon{
position: absolute;
right: 20px;
color: #555555;
font-size: 1.5em;
cursor: pointer;
z-index: 1;
}
/* 轮播图 */
.picture {
width: 1200px;
height: 600px;
margin: auto;
margin-top: 120px;
}
.banner{
position: relative;/*相对定位 给绝对定位位置参考*/
width: 100%;
height: 440px;
float: left;
}
.banner .item{
display: none;
position: absolute;
width: 100%;
height: 300px;
top: 0;
left: 0;
margin-left: 180px;
}
ul{
list-style-type: none;/*清除默认列表样式 ....*/
margin: 0;
padding: 0;/*内外编剧清除*/
}
.lunbo{
width: 100%;
height: 600px;
margin-top: 0px;
margin-left: -180px;
}
/*左右按钮的属性设置*/
.lr-tab .btn{
position: absolute;
top: 120px;
width: 41px;
height: 69px;
}
.lr-tab .left{
left: 0px;
background-position-x: -83px;
}
.lr-tab .right{
right: 0px;
background-position-x: -125px;
}
/*左右按钮触碰事件*/
.lr-tab .left:hover{
background-position-x: 0px;
}
.lr-tab .right:hover{
background-position-x: -41px;
}
/*圆形按钮属性设定*/
.tab-btn{
position: absolute;
right: 40px;
bottom: 20px;
width: 120px;
height: 30px;
top: 430px;
margin-top: 110px;
margin-right: 45px;
}
.tab-btn .btn{
float: left;
width: 23px;
height: 8px;
background: #868686;
border: 2px solid #c3c3c3;/*边框*/
margin-left: 10px;
border-radius: 60px;
}
/*圆形按钮触碰事件*/
.tab-btn .btn:hover{
background: #e4e4e4;
border-color:#7f7f7f;
}
.tab-btn .active{
background: #e4e4e4;
border-color:#7f7f7f;
}
.navbar {
width: 1200px;
height: 50px;
background: #333333;
box-shadow: 0 -20px 20px #000000;
margin: auto;
margin-top: 50px;
display: flex;
justify-content: space-between;
}
.navbar div {
height: 100%;
width: 400px;
z-index: 333;
}
.navbar ul{
list-style: none;
}
.navbar ul li{
float: left;
width: 150px;
height: 48px;
background: #222222;
font-size: 14px;
margin-left: -4px;
margin-top: 0px;
}
.navbar ul li:hover{
color: #ffffff;
background: #222222;
z-index: 333;
}
.navbar ul li a{
text-decoration: none;
color: #ffffff;
display: block;
text-align: center;
line-height: 50px;
font-weight: bold;
text-transform: uppercase;
z-index: 333;
}
.navbar ul li ul li{
display: none;
width: 150px;
height: 50px;
float: initial;
background: rgb(141 141 141 / 75%);
font-size: 14px;
margin-left: 0;
margin-top: 0;
}
.navbar ul li ul li a{
z-index: 3;
}
.navbar ul li:hover ul li{
display: block;
border-top: 1px solid #8d8d8d;
z-index: 333;
}
.date {
margin-top: 14px;
color: #333333;
}
.button_c {
margin-top: 50px;
text-decoration: none;
background: #333333;
color: #ffffff;
font-size: 14px;
border: outset 3px silver;
width: 20px;
height: 35px;
}
.key {
/*margin-left: 205px;*/
margin-top: 8px;
height: 30px;
width: 175px;
background: #333333;
color: gray;
float: right;
margin-right: 15px;
}
.key:hover{
background: #ffffff;
border: #7f7f7f 1px solid;
}
.container{
width: 1200px;
margin: 50px auto auto;
columns: 4;
column-gap: 40px;
z-index: 1;
}
.container div {
width: 100%;
margin: 0 0 20px;
padding: 10px;
background: #ffffff;
overflow: hidden;
break-inside: avoid;
user-select:none;
}
.container img {
width: 248px;
}
.container p {
line-height: 45px;
height: 45px;
font-size: medium;
}
.container span {
display: block;
margin-left: 184px;
margin-top: 60px;
font-size: small;
color: #7f7f7f;
font-weight: 600;
font-family: cursive;
}
.container div:hover {
box-shadow: 0 20px 25px #adadad;
margin-bottom: 20px;
z-index: 2;
}
.Logo {
width: 40px;
position: relative;
left: 28.5%;
margin-top: 5px;
}
This image diff could not be displayed because it is too large. You can view the blob instead.
const container = document.getElementsByClassName("container")[0];
const signInBtn = document.getElementById("signIn");
const signUpBtn = document.getElementById("signUp");
signUpBtn.addEventListener("click", () => {
container.classList.add("right_panel_active");
});
signInBtn.addEventListener("click", () => {
container.classList.remove("right_panel_active");
});
function login() {}
function sign() {}
var index2 = 0;
$(".tab-btn .btn").click(function () {
index2 = $(this).index();
$(this).addClass("active").siblings().removeClass("active");
$(".item").eq(index2).fadeIn().siblings().fadeOut();
});
$(".lr-tab .right").click(function () {
index2 ++;
if (index2 >4){ index2 = 0;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
});
$(".lr-tab .left").click(function () {
index2 --;
if(index2 < 0){index2 = 4;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
});
var time2 = setInterval(function () {
index2 ++;
if (index2 >4){ index2 = 0;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
},3000);
var index2 = 0;
$(".tab-btn .btn").click(function () {
index2 = $(this).index();
$(this).addClass("active").siblings().removeClass("active");
$(".item").eq(index2).fadeIn().siblings().fadeOut();
});
$(".lr-tab .right").click(function () {
index2 ++;
if (index2 >4){ index2 = 0;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
});
$(".lr-tab .left").click(function () {
index2 --;
if(index2 < 0){index2 = 4;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
});
var time2 = setInterval(function () {
index2 ++;
if (index2 >4){ index2 = 0;}
$(".item").eq(index2).fadeIn().siblings().fadeOut();
$(".tab-btn .btn").eq(index2).addClass("active").siblings().removeClass("active");
},3000);
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>注册页面</title>
<style type="text/css">
body {
background: var(--white) url("{% static 'img/cug.JPG' %}") no-repeat center fixed;
background-size: cover;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}body .container {
background: var(--lightblue) url("{% static 'img/cug.JPG' %}") no-repeat center fixed;
background-size: cover;
border-radius: var(--button-radius);
box-shadow: 0 0.9rem 1.7rem rgba(0, 0, 0.25), 0 0.7rem 0.7rem rgba(0, 0, 0.22);
height: var(--max-height);
max-width: var(--max-width);
overflow: hidden;
width: 100%;
position: relative;
}
</style>
<link href="{% static 'css/login.css' %}" rel="stylesheet">
</head>
<body>
<main class="container">
<!-- 注册 -->
<div class="container_form container_signup">
<form action="/registers/" class="form" id="form1" method="post">
{% csrf_token %}
<h2 class="form_title">注册{{ error1 }}</h2>
<input autocomplete="off" type="text" placeholder="用户名" class="input" id="sign_user" name="name" value="{{ name }}"/>
<input autocomplete="off" type="tel" placeholder="手机号" class="input" id="sign_email" name="tel" value="{{ tel }}"/>
<input autocomplete="off" type="text" placeholder="验证码" class="input" id="Verification_code" name="code" {{ code }}/>
<button class="button" name="submit" value="get_code">点此获取验证码</button>
<input autocomplete="off" type="password" placeholder="密码(区分大小写)" class="input" id="sign_password" name="password" value="{{ password }}"/>
<input autocomplete="off" type="password" placeholder="确认密码(区分大小写)" class="input" id="sign_password_x" name="password_ag" value="{{ password_ag }}"/>
<button class="btn" onclick="sign()" name="submit" value="rst">点击注册</button>
</form>
</div>
<!-- 登录 -->
<div class="container_form container_signin">
<form action="/login/" class="form" id="form2" method="post">
{% csrf_token %}
<h2 class="form_title">
<img src="{% static 'img/云霄Logo.png' %}" class="Logo">
登录{{ error }}
</h2>
<input autocomplete="off" type="text" placeholder="电话号" class="input" id="login_user" name="tel" value="{{ old_tel }}"/>
<input autocomplete="off" type="password" placeholder="密码" class="input" id="login_password" name="password" />
<a href="{% url 'lose_password' %}" class="link">忘记密码?</a>
<button name="submit" class="btn" onclick="login()">登录</button>
</form>
</div>
<div class="overlay_panel overlay_left">
<button class="btn" id="signIn">已有账号,直接登录</button>
<a href="{% url 'start_views' %}" class="btn" id="signIn" style="text-decoration: none">返回首页</a>
</div>
<div class="overlay_panel overlay_right">
<button class="btn" id="signUp">没有账号,点击注册</button>
<a href="{% url 'start_views' %}" class="btn" id="signUp" style="text-decoration: none">返回首页</a>
</div>
</main>
</body>
<script src="{% static 'js/login.js' %}"></script>
<script src="https://unpkg.com/spacingjs" defer></script>
</html>
\ No newline at end of file
{#<body>#}
{# <form action="/lose_password/" method="post">#}
{# {% csrf_token %}#}
{# <div><span>手机号:</span>#}
{# <input type="text" name="tel" placeholder="请输入您手机号" value="{{ tel }}" \><br>{{ tel_error }}#}
{# </div>#}
{# <div><span>新密码:</span>#}
{# <input type="password" name="password" value="{{ password }}" \>#}
{# </div>#}
{# <div><span>确认密码:</span>#}
{# <input type="password" name="password_ag" value="{{ password_ag }}" \><br>{{ error }}#}
{# </div>#}
{# <div>#}
{# <input type="text" name="code" placeholder="请输入验证码" value="{{ code }}" \>#}
{# <button name="submit" class="btn btn-info" value="get_code" >获取验证码</button><br>{{ code_error }}#}
{# </div>#}
{# <button name="submit" class="btn btn-info" value="confirm">确认</button>#}
{#</form>#}
{#<div> {{ mes_error }} </div>#}
{#</body>#}
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="{% static 'css/lose_password.css'%}" rel="stylesheet">
<title>forget_code</title>
<style>
body {
background: var(--white) url("{% static 'img/cug.JPG' %}") no-repeat center fixed;
background-size: cover;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
body .container {
background: var(--lightblue) url("{% static 'img/cug.JPG' %}") no-repeat center fixed;
background-size: cover;
border-radius: var(--button-radius);
box-shadow: 0 0.9rem 1.7rem rgba(0, 0, 0.25), 0 0.7rem 0.7rem rgba(0, 0, 0.22);
height: var(--max-height);
max-width: var(--max-width);
overflow: hidden;
width: 100%;
position: relative;
background:rgba(0,0,0,0.5); filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7F000000,endcolorstr=#7F000000);}
</style>
</head>
<body>
<main class="container">
<div class="container_form container_signup">
<form action="/lose_password/" class="form" id="form1" method="post">
{% csrf_token %}
<h2 class="form_title">忘记密码{{ error }}</h2>
<input autocomplete="off" type="tel" placeholder="输入绑定的手机号" class="input" name="tel" value="{{ tel }}"/>
<input autocomplete="off" type="text" placeholder="输入新的密码" class="input" name="password" value="{{ password }}"/>
<input autocomplete="off" type="text" placeholder="确认密码" class="input" name="password_ag" value="{{ password_ag }}"/>
<!-- <input autocomplete="off" type="email" placeholder="输入绑定的邮箱" class="input" id="sign_email"/>-->
<input autocomplete="off" type="text" placeholder="验证码" class="input" id="Verification_code" name="code" value="{{ code }}"/>
<button class="button" name="submit" value="get_code">点此获取验证码</button>
<button class="btn" id="signIn" name="submit" value="confirm">提交信息</button>
<a class="button_x" href="{% url 'login' %}" >返回</a>
</form>
</div>
</main>
</body>
</html>
\ No newline at end of file
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="{% static 'css/per_center.css' %}"/>
<title>个人中心</title>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="" class="before">失物招领</a>
<a href="{% url 'publish' %}" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
<a href="{% url 'per_center' %}" class="last">个人中心</a>
</div>
<div class="per_center">
<img src="{% static 'img/1_1645788470.jpg' %}" alt="头像">
<div class="content">
<p>昵称:{{ user.user_name }}</p>
<p>id:{{ user.user_id }}</p>
</div>
</div>
<div class="release public_container">
<h2 class="typ">寻物启示:</h2>
{% for o_object in o_objects %}
<div class="box" onclick="window.open('start_views_details?id={{ o_object.id }}','_self')">
<img src="img/img-1.jpg" alt="图片" class="pictures">
<ul>
<li>物品名称:{{ o_object.o_name }}</li>
<li>物品详情:{{ o_object.o_detail }}</li>
</ul>
</div>
{% endfor %}
<h2 class="typ">失物招领:</h2>
{% for r_object in r_objects %}
<div class="box" onclick="window.open('second_views_details?id={{ r_object.id }}','_self')">
<img src="img/img-1.jpg" alt="图片" class="pictures">
<ul>
<li>物品名称:{{ r_object.r_name }}</li>
<li>物品详情:{{ r_object.r_detail }}</li>
</ul>
</div>
{% endfor %}
<form action="/per_center/login_out/" method="post">
{% csrf_token %}
<button class="out_load" name="sumbit">退出登录</button>
</form>>
</div>
</body>
</html>
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="{% static 'css/publish.css' %}"/>
<title></title>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo" alt="logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="{% url 'second_views/' %}" class="before">失物招领</a>
<a href="" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
<a href="{% url 'per_center' %}" class="last">个人中心</a>
</div>
<form action="{% url 'publish' %}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="first">
<div class="box">
<div class="box1">
<h2 class="must">●必选</h2>
<select name="release_type">
<option >发布类型</option>
<option value="寻物">寻物</option>
<option value="招领">招领</option>
</select>
</div>
<div class="box2">
<h2 class="must">●必填信息</h2><br>
<p>物品分类:</p>
<select name="classification">
<option value="other">物品分类</option>
<option value ="live">生活用品</option>
<option value="ele">电子产品</option>
<option value ="study">学习用品</option>
<option value ="bag">包具</option>
<option value ="one_card">一卡通</option>
<option value ="card">证件</option>
<option value ="makeup">化妆用品</option>
<option value ="other">其它</option>
</select>
<div class="name">
<span>物品名称:</span>
<input type="text" name="name" class="input" maxlength="15" placeholder="例:水杯" />
</div>
<div>
<span>物品详情:</span><br>
<textarea rows="" cols="" maxlength="100" name="detail" placeholder="为了保护您的隐私安全,请勿在此栏填写联系方式!"></textarea>
</div>
</div>
<div class="box3">
<h2 class="must">●选填信息</h2>
<div>
<span>丢失/拾取时间:</span>
<input type="date" name="date">
<input type="radio" id="one" name="detail" checked>
<label for="one">上午</label>
<input type="radio" id="two" name="detail" >
<label for="two">下午</label>
</div>
<div>
<span>丢失/拾取地点:</span>
<input type="text" name="place" class="input1" maxlength="60" placeholder="详细地址(例):太理明向校区东餐二楼" />
</div>
<div>
<span>联系方式:</span>
<select name="contact_type">
<option value ="qq">QQ</option>
<option value ="vx">VX</option>
<option value="tel">Tel</option>
</select>
<input type="text" name="contact" class="input2" maxlength="20" />
</div>
</div>
<div class="box4">
<p>添加图片:</p>
<div>
<label for="img1"><img src="{% static 'img/添加图片.png' %}" ></label>
<input type="file" name="img1" id="img1" hidden/>
</div>
<div>
<label for="img2"><img src="{% static 'img/添加图片.png' %}" ></label>
<input type="file" name="img2" id="img2" hidden/>
</div>
<div>
<label for="img3"><img src="{% static 'img/添加图片.png' %}" ></label>
<input type="file" name="img3" id="img3" hidden/>
</div>
</div>
<div class="box5">
<button name="submit" class="btn btn-info">发布</button>
</div>
</div>
</div>
</form>
</body>
</html>
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="{% static 'css/start_views.css' %}"/>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
<title></title>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="{% url 'second_views/' %}" class="before">失物招领</a>
<a href="{% url 'publish' %}" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
{% if requests.session.is_login == True %}
<a href="{% url 'per_center' %}" class="last">个人中心</a>
{% else %}
<a href="{% url 'login' %}" class="last">登录 . 注册</a>
{% endif %}
</div>
<div class="search-box">
<div class="shadow"></div>
<input type="text" placeholder="请输入遗失物品名称:水杯">
<ion-icon name="search"></ion-icon>
</div>
<script src="https://unpkg.com/ionicons@4.5.10-0/dist/ionicons.js"></script>
<div class="picture">
<div class="banner" >
<div class="img-wrap">
<ul>
<li class="item" style="display: block">
<a href="#"><img src="{% static 'img/海报.jpg' %}" alt="" class="lunbo"></a>
</li>
<li class="item">
<a href="#"><img src="{% static 'img/海报2.jpg' %}" alt="" class="lunbo"></a>
</li>
<li class="item">
<a href="#"><img src="{% static 'img/HAIBAO1.jpg' %}" alt=""class="lunbo"></a>
</li>
</ul>
</div>
<div class="lr-tab">
<div class="left btn"></div>
<div class="right btn"></div>
</div>
<div class="tab-btn">
<ul>
<li class="btn"></li>
<li class="btn"></li>
<li class="btn"></li>
</ul>
</div>
</div>
</div>
<div class="navbar">
<div>
<ul>
<li><a href="#">物品分类</a>
<ul>
<li><a href="search_classification1?classification=live">生活用品</a></li>
<li><a href="search_classification1?classification=study">学习用品</a></li>
<li><a href="search_classification1?classification=ele">电子设备</a></li>
<li><a href="search_classification1?classification=makeup">化妆用品</a></li>
<li><a href="search_classification1?classification=bag">包具</a></li>
<li><a href="search_classification1?classification=one_card">一卡通</a></li>
<li><a href="search_classification1?classification=card">证件</a></li>
<li><a href="search_classification1?classification=other">其它</a></li>
</ul>
</li>
</ul>
</div>
<form action="/search_second_time1/" method="post">
{% csrf_token %}
<div class="date">
丢失时间
<label>
<input type="date" name="before_time" class="时间1">
<input type="date" name="late_time" class="时间2">
</label>
</div>
<button class="button_c">提交</button>
</form>
<div>
<form action="/search_keyword1/" method="post">
{% csrf_token %}
<label>
<input type="text" class="key" name="key" placeholder="关键字搜索:红色"/>
</label>
</form>
</div>
</div>
<div class="container">
{% for information in informations %}
<div onclick="window.open('second_views_details?id={{ information.id }}','_self')">
<img src="/media/{{ information.r_picture }}" alt="img">
<p>物品名称:{{ information.r_name }}</p>
<p>拾取地点:{{ information.r_place }}</p>
<p>物品详情:{{ information.r_detail }}</p>
<span>2022/2/25</span>
</div>
{% endfor %}
</div>
</body>
<script type="text/javascript" src="{% static 'js/start_view.js' %}"></script>
</html>
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="{% static 'css/second_views_details.css' %}"/>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo" alt="logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="{% url 'second_views/' %}" class="before">失物招领</a>
<a href="{% url 'publish' %}" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
{% if requests.session.is_login == True %}
<a href="{% url 'per_center' %}" class="last">个人中心</a>
{% else %}
<a href="{% url 'login' %}" class="last">登录 . 注册</a>
{% endif %}
</div>
<div class="first">
<div class="other">
<h1>
<b></b>
</h1>
<img src="img/25xt-711061-AbstractSharpBackgroundsz7.png" >
<p>昵称:<span>{{ data.users.user_name }}</span></p>
<p>ID:<span>{{ data.users.user_id }}</span></p>
</div>
<div class="box">
<div class="picture">
<div class="banner" >
<div class="img-wrap">
<ul>
<li class="item" style="display: block">
<a href="#"><img src="/media/{{ data.r_picture }}" alt="" class="lunbo"></a>
</li>
{# <li class="item">#}
{# <a href="#"><img src="img/R-C(1).jpg" alt="" class="lunbo"></a>#}
{# </li>#}
{# <li class="item">#}
{# <a href="#"><img src="img/R-C.jpg" alt=""class="lunbo"></a>#}
{# </li>#}
</ul>
</div>
<div class="lr-tab">
<div class="left btn"></div>
<div class="right btn"></div>
</div>
<div class="tab-btn">
<ul>
<li class="btn"></li>
<li class="btn"></li>
<li class="btn"></li>
</ul>
</div>
</div>
</div>
<div class="information">
<h1><b>●物品信息</b></h1>
<p>物品名称:
<span >{{ data.r_name }}</span>
</p>
<p>物品分类:
<span >{{ data.r_classification }}</span>
</p>
<p>物品详情:
<span>{{ data.r_detail }}</span>
</p>
</div>
<div class="information">
<h1><b>●相关信息</b></h1>
<p>拾取时间:
<span>{{ data.r_date }}</span>
</p>
<p>拾取地点:
<span>{{ data.r_place }}</span>
</p>
</div>
<div class="information">
<h1><b>●联系方式</b></h1>
<p>Tel/QQ/VX:
<span>{{ data.r_contact_details }}</span>
</p>
</div>
<div class="recevice">
<div class="btn">
<!-- <a href="#">领取</a> -->
<button>领取</button>
</div>
</div>
</div>
<div class="person">
</div>
</div>
</body>
<script type="text/javascript" src="{% static 'js/second_views_details.js' %}"></script>
<!-- <script type="text/javascript">
window.addEventListener("scroll",function (){
let header=document.querySelector("header");
header.classList.toggle("sticky",window.scrollY > 0);
})
</script> -->
</html>
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="{% static 'css/start_views.css' %}"/>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
<title></title>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="{% url 'second_views/' %}" class="before">失物招领</a>
<a href="{% url 'publish' %}" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
{% if requests.session.is_login == True %}
<a href="{% url 'per_center' %}" class="last">个人中心</a>
{% else %}
<a href="{% url 'login' %}" class="last">登录 . 注册</a>
{% endif %}
</div>
<div class="search-box">
<div class="shadow"></div>
<input type="text" placeholder="请输入遗失物品名称:水杯">
<ion-icon name="search"></ion-icon>
</div>
<script src="https://unpkg.com/ionicons@4.5.10-0/dist/ionicons.js"></script>
<div class="picture">
<div class="banner" >
<div class="img-wrap">
<ul>
<li class="item" style="display: block">
<a href="#"><img src="{% static 'img/海报.jpg' %}" alt="" class="lunbo"></a>
</li>
<li class="item">
<a href="#"><img src="{% static 'img/海报2.jpg' %}" alt="" class="lunbo"></a>
</li>
<li class="item">
<a href="#"><img src="{% static 'img/HAIBAO1.jpg' %}" alt=""class="lunbo"></a>
</li>
</ul>
</div>
<div class="lr-tab">
<div class="left btn"></div>
<div class="right btn"></div>
</div>
<div class="tab-btn">
<ul>
<li class="btn"></li>
<li class="btn"></li>
<li class="btn"></li>
</ul>
</div>
</div>
</div>
<div class="navbar">
<div>
<ul>
<li><a href="#">物品分类</a>
<ul>
<li><a href="search_classification?classification=live">生活用品</a></li>
<li><a href="search_classification?classification=study">学习用品</a></li>
<li><a href="search_classification?classification=ele">电子设备</a></li>
<li><a href="search_classification?classification=makeup">化妆用品</a></li>
<li><a href="search_classification?classification=bag">包具</a></li>
<li><a href="search_classification?classification=one_card">一卡通</a></li>
<li><a href="search_classification?classification=card">证件</a></li>
<li><a href="search_classification?classification=other">其它</a></li>
</ul>
</li>
</ul>
</div>
<form action="/search_start_time/" method="post">
{% csrf_token %}
<div class="date">
丢失时间
<label>
<input type="date" name="before_time" class="时间1">
<input type="date" name="late_time" class="时间2">
</label>
</div>
<button class="button_c">提交</button>
</form>
<div>
<form action="/search_keyword/" method="post">
{% csrf_token %}
<label>
<input type="text" class="key" name="key" placeholder="关键字搜索:红色"/>
</label>
</form>
</div>
</div>
<div class="container">
{% for information in informations %}
<div onclick="window.open('start_views_details?id={{ information.id }}','_self')">
<img src="/media/{{ information.o_picture }}" alt="img">
<p>物品名称:{{ information.o_name }}</p>
<p>丢失地点:{{ information.o_place }}</p>
<p>物品详情:{{ information.o_detail }}</p>
<span>{{ information.o_date }}</span>
</div>
{% endfor %}
</div>
</body>
<script type="text/javascript" src="{% static 'js/start_view.js' %}"></script>
</html>
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="{% static 'css/second_views_details.css' %}"/>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
</head>
<body>
<div class="navigation">
<img src="{% static 'img/LOGOOOO.png' %}" class="Logo" alt="logo">
<a href="{% url 'start_views' %}" class="before">寻物启事</a>
<a href="{% url 'second_views/' %}" class="before">失物招领</a>
<a href="{% url 'publish' %}" class="before">发布帖子</a>
<a href="{% url 'about' %}" class="last">关于</a>
{% if requests.session.is_login == True %}
<a href="{% url 'per_center' %}" class="last">个人中心</a>
{% else %}
<a href="{% url 'login' %}" class="last">登录 . 注册</a>
{% endif %}
</div>
<div class="first">
<div class="other">
<h1>
<b></b>
</h1>
<img src="img/25xt-711061-AbstractSharpBackgroundsz7.png" >
<p>昵称:<span>{{ data.users.user_name }}</span></p>
<p>ID:<span>{{ data.users.user_id }}</span></p>
</div>
<div class="box">
<div class="picture">
<div class="banner" >
<div class="img-wrap">
<ul>
<li class="item" style="display: block">
<a href="#"><img src="/media/{{ data.o_picture }}" alt="" class="lunbo"></a>
</li>
{# <li class="item">#}
{# <a href="#"><img src="img/R-C(1).jpg" alt="" class="lunbo"></a>#}
{# </li>#}
{# <li class="item">#}
{# <a href="#"><img src="img/R-C.jpg" alt=""class="lunbo"></a>#}
{# </li>#}
</ul>
</div>
<div class="lr-tab">
<div class="left btn"></div>
<div class="right btn"></div>
</div>
<div class="tab-btn">
<ul>
<li class="btn"></li>
<li class="btn"></li>
<li class="btn"></li>
</ul>
</div>
</div>
</div>
<div class="information">
<h1><b>●物品信息</b></h1>
<p>物品名称:
<span >{{ data.o_name }}</span>
</p>
<p>物品分类:
<span >{{ data.o_classification }}</span>
</p>
<p>物品详情:
<span>{{ data.o_detail }}</span>
</p>
</div>
<div class="information">
<h1><b>●相关信息</b></h1>
<p>丢失时间:
<span>{{ data.o_date }}</span>
</p>
<p>丢失地点:
<span>{{ data.o_place }}</span>
</p>
</div>
<div class="information">
<h1><b>●联系方式</b></h1>
<p>Tel/QQ/VX:
<span>{{ data.o_contact_details }}</span>
</p>
</div>
<div class="recevice">
<div class="btn">
<!-- <a href="#">领取</a> -->
<button>领取</button>
</div>
</div>
</div>
<div class="person">
</div>
</div>
</body>
<script type="text/javascript" src="{% static 'js/second_views_details.js' %}"></script>
<!-- <script type="text/javascript">
window.addEventListener("scroll",function (){
let header=document.querySelector("header");
header.classList.toggle("sticky",window.scrollY > 0);
})
</script> -->
</html>
from django.test import TestCase
# Create your tests here.
"""
ASGI config for TYUT_Lost_Found project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'TYUT_Lost_Found.settings')
application = get_asgi_application()
"""
Django settings for TYUT_Lost_Found project.
Generated by 'django-admin startproject' using Django 4.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
import os
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-)6r$hunze49q=92+-yxk^l6i=^8n1k!4zq3x^*8dzysejcmrh6'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ["*"]
# Application definition
INSTALLED_APPS = [
'Lost_Found.apps.LostFoundConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'TYUT_Lost_Found.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'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 = 'TYUT_Lost_Found.wsgi.application'
# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'yunxiao',
'USER': 'root',
'PASSWORD': 'yzc200212*+-.',
'HOST': 'localhost',
'POST': '3306',
}
}
# Password validation
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/4.0/topics/i18n/
LANGUAGE_CODE = 'zh-Hans'
TIME_ZONE = 'Asia/Shanghai'
USE_I18N = True
USE_TZ = False
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.0/howto/static-files/
STATIC_URL = 'static/'
# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
#配置发送邮件
# EMAIL_HOST = 'smtp.qq.com'
# EMAIL_PORT = 25 #发件箱的smtp服务器端口
# EMAIL_HOST_USER = '2910711781@qq.com' # 你的 QQ 账号
# EMAIL_HOST_PASSWORD = 'eoxzhkscnfqgdfea'
# EMAIL_USE_TLS = True # 这里必须是 True,否则发送不成功
MEDIA_ROOT=os.path.join(BASE_DIR,'media').replace("\\","/")
MEDIA_URL='/media/'
"""TYUT_Lost_Found URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.urls import path, re_path
from django.conf import settings
from django.conf.urls.static import static
app_name = 'Lost_Found'
from Lost_Found import views
urlpatterns = [
#注册
path('registers/', views.registers, name='registers'),
#登录.注册
path('login/', views.login, name='login'),
#找回密码
path('lose_password/',views.lose_password,name='lose_password'),
#招领详情页面
re_path(r'^second_views/second_views_details',views.second_views_details,name="second_views_details"),
#寻物详情页面
re_path(r'^start_views/start_views_details',views.start_views_details,name="start_views_details"),
#个人中心招领详情页面
re_path(r'^per_center/second_views_details/', views.second_views_details, name="second_views_details"),
#个人中心寻物详情页面
re_path(r'^per_center/start_views_details', views.start_views_details, name="start_views_details"),
#寻物
path('start_views/',views.start_views,name='start_views'),
path('search_start_time/start_views_details/',views.start_views),
path('search_keyword/start_views_details/',views.start_views),
path('search_second_time1/second_views_details/', views.second_views_details),
path('search_keyword1/second_views_details/', views.second_views_details),
#招领
path('second_views/',views.second_views,name='second_views/'),
#发布
path('publish/',views.publish,name='publish'),
#注销
path('per_center/login_out/',views.login_out),
#个人中心
path('per_center/',views.per_center,name='per_center'),
#其它
path('about/',views.about,name="about"),
#物品分类筛选
re_path(r'^start_views/search_classification',views.search_classification),
#时间筛选
path('search_start_time/',views.search_start_time),
#关键字筛选
path('search_keyword/',views.search_keyword),
#
re_path(r'^second_views/search_classification1', views.search_classification1),
#时间筛选
path('search_second_time1/',views.search_second_time1),
#关键字筛选
path('search_keyword1/',views.search_keyword1),
]+static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
"""
WSGI config for TYUT_Lost_Found project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'TYUT_Lost_Found.settings')
application = get_wsgi_application()
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'TYUT_Lost_Found.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment