├── comm ├── __init__.py ├── Arial.ttf ├── __pycache__ │ ├── env.cpython-35.pyc │ ├── env.cpython-36.pyc │ ├── __init__.cpython-35.pyc │ ├── __init__.cpython-36.pyc │ ├── backends.cpython-35.pyc │ ├── backends.cpython-36.pyc │ ├── comm_method.cpython-35.pyc │ └── comm_method.cpython-36.pyc ├── env.py ├── backends.py └── comm_method.py ├── FlyCold ├── __init__.py ├── __init__.pyc ├── settings.pyc ├── __pycache__ │ ├── urls.cpython-35.pyc │ ├── urls.cpython-36.pyc │ ├── wsgi.cpython-35.pyc │ ├── wsgi.cpython-36.pyc │ ├── __init__.cpython-35.pyc │ ├── __init__.cpython-36.pyc │ ├── settings.cpython-35.pyc │ └── settings.cpython-36.pyc ├── wsgi.py ├── urls.py └── settings.py ├── SchoolBuy ├── __init__.py ├── migrations │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-35.pyc │ │ ├── __init__.cpython-36.pyc │ │ ├── 0001_initial.cpython-35.pyc │ │ └── 0001_initial.cpython-36.pyc │ └── 0001_initial.py ├── static │ └── SchoolBuy │ │ ├── js │ │ ├── bk.js │ │ ├── index.js │ │ ├── test_kendo_grid.js │ │ ├── jquery.onoff.min.js │ │ ├── settings.js │ │ ├── analysis.js │ │ ├── jquery.swipebox.min.js │ │ └── bootstrap3.1.1_extend.js │ │ ├── images │ │ ├── pet.jpg │ │ ├── pet.png │ │ ├── qq.png │ │ ├── toy.jpg │ │ ├── toy.png │ │ ├── PayPal.jpg │ │ ├── book.jpg │ │ ├── book.png │ │ ├── delete.png │ │ ├── edit.png │ │ ├── logo.png │ │ ├── logogo.png │ │ ├── phone.jpg │ │ ├── phone.png │ │ ├── reply.png │ │ ├── snacks.jpg │ │ ├── snacks.png │ │ ├── bg_back.png │ │ ├── favicon.ico │ │ ├── no_image.png │ │ ├── product.jpg │ │ ├── product.png │ │ ├── bg_back_on.png │ │ ├── wechatpay.png │ │ └── uploadify-cancel.png │ │ ├── img │ │ ├── icons.png │ │ ├── loader.gif │ │ └── icons.svg │ │ ├── css │ │ ├── gb_tip_layer.png │ │ ├── gb_tip_loading.gif │ │ ├── bootstrap3.1.1_extend.css │ │ ├── index.css │ │ ├── jquery.onoff.css │ │ ├── slide.css │ │ ├── uploadify.css │ │ ├── hooraylibs.css │ │ ├── swipebox.min.css │ │ ├── demo.css │ │ ├── login.css │ │ └── extend.css │ │ └── README.html ├── __init__.pyc ├── apps.py ├── __pycache__ │ ├── urls.cpython-35.pyc │ ├── urls.cpython-36.pyc │ ├── admin.cpython-35.pyc │ ├── admin.cpython-36.pyc │ ├── forms.cpython-35.pyc │ ├── forms.cpython-36.pyc │ ├── models.cpython-35.pyc │ ├── models.cpython-36.pyc │ ├── shuju.cpython-35.pyc │ ├── shuju.cpython-36.pyc │ ├── views.cpython-35.pyc │ ├── views.cpython-36.pyc │ ├── __init__.cpython-35.pyc │ ├── __init__.cpython-36.pyc │ ├── jinja2_env.cpython-35.pyc │ └── jinja2_env.cpython-36.pyc ├── shuju.py ├── admin.py ├── urls.py ├── models.py └── forms.py ├── db.sqlite3 ├── requirements.txt ├── .idea ├── vcs.xml ├── inspectionProfiles │ └── profiles_settings.xml ├── modules.xml ├── misc.xml ├── SchoolBuy.iml └── workspace.xml ├── templates └── SchoolBuy │ ├── No_Goods.html │ ├── UserMessage.html │ ├── doing_success.html │ ├── Login.html │ ├── ForgetPasswd.html │ ├── ResetPasswd.html │ ├── MyLog.html │ ├── MyMessage.html │ ├── Edit.html │ ├── Register.html │ ├── GoodsList.html │ ├── index.html │ ├── PushGoods.html │ ├── ChangeMyself.html │ ├── base.html │ └── GoodsMessage.html ├── myweb_uwsgi.ini ├── manage.py └── README.md /comm/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /FlyCold/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SchoolBuy/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SchoolBuy/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/js/bk.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/db.sqlite3 -------------------------------------------------------------------------------- /comm/Arial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/comm/Arial.ttf -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==1.11.4 2 | django_mptt==0.8.7 3 | Pillow==4.2.1 4 | Jinja2==2.9.6 -------------------------------------------------------------------------------- /FlyCold/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/FlyCold/__init__.pyc -------------------------------------------------------------------------------- /FlyCold/settings.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/FlyCold/settings.pyc -------------------------------------------------------------------------------- /SchoolBuy/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__init__.pyc -------------------------------------------------------------------------------- /comm/__pycache__/env.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/comm/__pycache__/env.cpython-35.pyc -------------------------------------------------------------------------------- /comm/__pycache__/env.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/comm/__pycache__/env.cpython-36.pyc -------------------------------------------------------------------------------- /FlyCold/__pycache__/urls.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/FlyCold/__pycache__/urls.cpython-35.pyc -------------------------------------------------------------------------------- /FlyCold/__pycache__/urls.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/FlyCold/__pycache__/urls.cpython-36.pyc -------------------------------------------------------------------------------- /FlyCold/__pycache__/wsgi.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/FlyCold/__pycache__/wsgi.cpython-35.pyc -------------------------------------------------------------------------------- /FlyCold/__pycache__/wsgi.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/FlyCold/__pycache__/wsgi.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class SchoolbuyConfig(AppConfig): 5 | name = 'SchoolBuy' 6 | -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/urls.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/urls.cpython-35.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/urls.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/urls.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/pet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/pet.jpg -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/pet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/pet.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/qq.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/toy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/toy.jpg -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/toy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/toy.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/img/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/img/icons.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/img/loader.gif -------------------------------------------------------------------------------- /comm/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/comm/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /comm/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/comm/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /comm/__pycache__/backends.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/comm/__pycache__/backends.cpython-35.pyc -------------------------------------------------------------------------------- /comm/__pycache__/backends.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/comm/__pycache__/backends.cpython-36.pyc -------------------------------------------------------------------------------- /FlyCold/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/FlyCold/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /FlyCold/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/FlyCold/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /FlyCold/__pycache__/settings.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/FlyCold/__pycache__/settings.cpython-35.pyc -------------------------------------------------------------------------------- /FlyCold/__pycache__/settings.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/FlyCold/__pycache__/settings.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/admin.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/admin.cpython-35.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/admin.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/admin.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/forms.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/forms.cpython-35.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/forms.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/forms.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/models.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/models.cpython-35.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/models.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/models.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/shuju.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/shuju.cpython-35.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/shuju.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/shuju.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/views.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/views.cpython-35.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/views.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/views.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/PayPal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/PayPal.jpg -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/book.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/book.jpg -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/book.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/delete.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/edit.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/logo.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/logogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/logogo.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/phone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/phone.jpg -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/phone.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/reply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/reply.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/snacks.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/snacks.jpg -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/snacks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/snacks.png -------------------------------------------------------------------------------- /comm/__pycache__/comm_method.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/comm/__pycache__/comm_method.cpython-35.pyc -------------------------------------------------------------------------------- /comm/__pycache__/comm_method.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/comm/__pycache__/comm_method.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/bg_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/bg_back.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/favicon.ico -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/no_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/no_image.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/product.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/product.jpg -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/product.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/product.png -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/jinja2_env.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/jinja2_env.cpython-35.pyc -------------------------------------------------------------------------------- /SchoolBuy/__pycache__/jinja2_env.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/__pycache__/jinja2_env.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/css/gb_tip_layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/css/gb_tip_layer.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/css/gb_tip_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/css/gb_tip_loading.gif -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/bg_back_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/bg_back_on.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/wechatpay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/wechatpay.png -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/images/uploadify-cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/static/SchoolBuy/images/uploadify-cancel.png -------------------------------------------------------------------------------- /SchoolBuy/migrations/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/migrations/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /SchoolBuy/migrations/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/migrations/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/migrations/__pycache__/0001_initial.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/migrations/__pycache__/0001_initial.cpython-35.pyc -------------------------------------------------------------------------------- /SchoolBuy/migrations/__pycache__/0001_initial.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/City-Zero/SchoolBuy/HEAD/SchoolBuy/migrations/__pycache__/0001_initial.cpython-36.pyc -------------------------------------------------------------------------------- /SchoolBuy/shuju.py: -------------------------------------------------------------------------------- 1 | # Create your tests here. 2 | 3 | class pagiton(): 4 | hasHead = True 5 | hasEnd = True 6 | list = [] 7 | now = 0 8 | end = 0 9 | canshu = '' 10 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /templates/SchoolBuy/No_Goods.html: -------------------------------------------------------------------------------- 1 | {% extends "SchoolBuy/base.html" %} 2 | {% block title %}什么也没找到{% endblock %} 3 | {% block detial %} 4 |
5 |

这里没有宝贝,去别处转转吧

6 | 7 |
8 | {% endblock %} -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SchoolBuy/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | 5 | from mptt.admin import MPTTModelAdmin 6 | from SchoolBuy.models import * 7 | 8 | admin.site.register(GoodsType, MPTTModelAdmin) 9 | admin.site.register(UserProfile) 10 | admin.site.register(GoodsMessage) 11 | admin.site.register(GoodsWords) 12 | -------------------------------------------------------------------------------- /templates/SchoolBuy/UserMessage.html: -------------------------------------------------------------------------------- 1 | {% extends "SchoolBuy/GoodsList.html" %} 2 | {% block title %}{{ profile.Nick }}{% endblock %} 3 | 4 | {% block head %} 5 |
6 | {{ profile.Nick }} 7 | 8 |
9 | 10 | {% endblock %} 11 | 12 | {% block delpagination %}{% endblock %} 13 | -------------------------------------------------------------------------------- /comm/env.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from django.contrib.staticfiles.storage import staticfiles_storage 4 | from django.core.urlresolvers import reverse 5 | 6 | from jinja2 import Environment 7 | 8 | 9 | def environment(**options): 10 | env = Environment(**options) 11 | env.globals.update({ 12 | 'static': staticfiles_storage.url, 13 | 'url': reverse, 14 | }) 15 | return env -------------------------------------------------------------------------------- /FlyCold/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for FlyCold project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "FlyCold.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /myweb_uwsgi.ini: -------------------------------------------------------------------------------- 1 | # myweb_uwsgi.ini file 2 | [uwsgi] 3 | 4 | # Django-related settings 5 | 6 | socket = :8080 7 | 8 | # the base directory (full path) 9 | chdir = /home/lyt/FlyCold 10 | 11 | # Django s wsgi file 12 | module = FlyCold.wsgi 13 | 14 | # process-related settings 15 | # master 16 | master = true 17 | 18 | # maximum number of worker processes 19 | processes = 4 20 | 21 | # ... with appropriate permissions - may be needed 22 | # chmod-socket = 664 23 | # clear environment on exit 24 | vacuum = true 25 | -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/css/bootstrap3.1.1_extend.css: -------------------------------------------------------------------------------- 1 | /* IE和Firefox中div定位样式 */ 2 | .top_left {max-width:400px; top:0; left:0; position:fixed; z-index:9999} 3 | .top_right {max-width:400px; top:0; right:0; position:fixed; z-index:9999} 4 | .bottom_left {max-width:400px; bottom:0; left:0; position:fixed; z-index:9999} 5 | .bottom_right {max-width:400px; bottom:0; right:0; position:fixed; z-index:9999} 6 | .top_center {max-width:400px; top:0; left:50%; position:fixed; margin-left:-150px; z-index:9999} 7 | .bottom_center {max-width:400px; bottom:0; left:50%; position:fixed; margin-left:-150px; z-index:9999} -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 校园买 网站协议 6 | 7 | 8 |

9 | 网站性质 10 |

11 |

12 | 校园买是一个非营利网站,旨在帮助大学生将闲置物品出售给其他人以使得它们发挥余热。 13 |

14 |

15 | 虽然我们是非盈利网站,但由于服务器租用及域名租用需要金额,所以不排除以后会在网站中加入广告的可能,请您理解。另外,您也可以去首页给我们进行捐赠。 16 |

17 |

18 | 我们的义务 19 |

20 |

21 | 您作为我们的用户,我们会尽最大努力保障您的利益,保护您的隐私,但如若发生黑客入侵造成您的信息泄漏,我们深表不安,但我们也无能为力。 22 |

23 |

24 | 您的义务 25 |

26 |

27 | 无论您是我们的注册用户还是匿名用户,您都需要遵守当地法律,不发布不良信息,否则我们有权在不通知您的情况下对信息进行处理!
28 | 此外,如果您以任何形式对我们的服务器或域名发动攻击,我们有权删除您的帐号,公开您的信息,并且会追究您的法律责任。 29 |

30 | 31 | 32 | -------------------------------------------------------------------------------- /templates/SchoolBuy/doing_success.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ mes }}成功 6 | 7 | 8 |

9 | {{ mes }}成功!系统将在 3 秒钟后自动跳转到首页,如果未能跳转,请点击

10 | 24 | 25 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "FlyCold.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError: 10 | # The above import may fail for some other reason. Ensure that the 11 | # issue is really that Django is missing to avoid masking other 12 | # exceptions on Python 2. 13 | try: 14 | import django 15 | except ImportError: 16 | raise ImportError( 17 | "Couldn't import Django. Are you sure it's installed and " 18 | "available on your PYTHONPATH environment variable? Did you " 19 | "forget to activate a virtual environment?" 20 | ) 21 | raise 22 | execute_from_command_line(sys.argv) 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 项目介绍 2 | ====== 3 | 本项目是我在暑假期间学习Django后制作的一个校园二手交易平台,旨在帮助同学们将自己无用的东西交易给他人。 4 | 信心满满的以为大家都会使用,然而学校里没人鸟我,桑心~~ 5 | 但是本项目当作一个学习项目应该还是很棒的!! 6 | 7 | 背景介绍 8 | ======= 9 | 本项目基于python3.5开发,所需的库以记录在requirements.txt中。 10 | 11 | 前置信息 12 | ======= 13 | 提前预览 http://flycold.cn 14 | 直接克隆仓库,`python3 manage.py runserver` 即可启动。 15 | 后台管理地址:127.0.0.1:8000/admin/ 16 | 后台管理密码:root 17 | rootisgad 18 | 19 | 我的邮箱:1041984720@qq.com,欢迎大家学习交流~~ 20 | 21 | 具体功能 22 | ======= 23 | ###用户注册 24 | 提供用户注册功能,并将注册的帐号密码发给管理员的邮箱(settings.ADMIN_EMAIL)。 25 | ###用户登陆 26 | 对已注册的用户提供登陆功能。 27 | ###浏览商品 28 | 浏览当前发布的商品,并且可以进行一些简单的条件搜索。 29 | ###发布商品 30 | 对于已登陆的用户,提供发布商品功能。默认的商品类型为空,需要使用管理员帐号进入后台添加。 31 | ###绑定/解绑邮箱 32 | 绑定邮箱,忘记密码可以根据邮箱找回。 33 | ###发布留言 34 | 给商品发布留言,可以收到系统的提示。 35 | ###重置密码 36 | 基于邮箱来重置。 37 | ###修改个人信息 38 | 对用户的头像,用户名之类进行修改。 39 | 40 | ###更多细节,自己体验哦。 41 | 42 | 设置内容介绍 43 | ======== 44 | 正常来说,以下内容您可以根据自己的需要进行修改: 45 | - settings中的ADMIN_EMAIL,它决定了用户注册的信息发向谁。 46 | - settings中的邮箱信息。您可以修改为自己的邮箱。 47 | -------------------------------------------------------------------------------- /FlyCold/urls.py: -------------------------------------------------------------------------------- 1 | """FlyCold URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.11/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url 17 | from django.contrib import admin 18 | from django.conf import settings 19 | from django.conf.urls.static import static 20 | 21 | from SchoolBuy import urls 22 | 23 | urlpatterns = [ 24 | url(r'^admin/', admin.site.urls), 25 | ] 26 | if settings.DEBUG: 27 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 28 | urlpatterns += urls.urlpatterns -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /.idea/SchoolBuy.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | 30 | -------------------------------------------------------------------------------- /templates/SchoolBuy/Login.html: -------------------------------------------------------------------------------- 1 | {% extends "SchoolBuy/base.html" %} 2 | {% block title %}登录{% endblock %} 3 | {% block detial %} 4 | 5 | 6 |
7 |
8 |
9 | 29 | 30 |
31 |
32 |
33 |
34 | {% endblock %} -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/img/icons.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/SchoolBuy/ForgetPasswd.html: -------------------------------------------------------------------------------- 1 | {% extends "SchoolBuy/base.html" %} 2 | 3 | {% block title %}忘记密码{% endblock %} 4 | 5 | {% block detial %} 6 |
7 | 8 |
9 | 10 |
11 | 12 |
13 | 14 |

重置密码

15 | 16 |
17 | 18 |
19 | 20 |
21 | 22 | {{ csrf_input }} 23 | 24 |
25 | 26 | 27 | 28 |
29 | {{ form.email }} 30 | 31 |

{{ form.email.errors.as_text() }}

32 | 33 |
34 | 35 | * 36 | 37 |
38 | 39 | 40 |
41 | 42 |
43 | 44 | 45 | 46 | 47 |
48 | 49 |
50 | 51 |
52 | 53 |
54 | 55 |
56 | 57 |
58 | 59 |
60 | 61 | {% endblock %} -------------------------------------------------------------------------------- /SchoolBuy/urls.py: -------------------------------------------------------------------------------- 1 | #coding=utf8 2 | 3 | from django.conf.urls import url 4 | from SchoolBuy.views import * 5 | 6 | urlpatterns = (url(r'^create_code/$',create_code_img), # 生成验证码 7 | url(r'^$', home), 8 | url(r'^register/$', register), # 注册 9 | url(r'^login/$', login), # 登录 10 | url(r'^logout/$', logout), # 登出 11 | url(r'^push_goods/$', push_goods), #发布商品 12 | url(r'^goods/(?P\d+)/$',look_goods), # 浏览id商品 13 | url(r'^all/$',goods_list), # 浏览所有商品 14 | url(r'^goods/reply/$', goods_reply), # 发布商品回复 15 | url(r'^user/(?P\d+)/$', look_user), # 用户主页 16 | url(r'^me/$', user_message), # 我的主页 17 | url(r'^edit/(?P\d+)/$', edit_goods), # 编辑物品 18 | url(r'^add/pic/$', add_pic), # 添加图片 19 | url(r'^del/pic/$', del_pic), # 删除图片 20 | url(r'^del/good/(?P\d+)/$', del_good), # 删除物品 21 | url(r'^del/word/$', del_good_words), # 删除留言 22 | url(r'^me/log/$', show_log), # 查看我的提醒 23 | url(r'^log/read/$', read_log), # 读取提醒中转页面 24 | url(r'^log/manager/$', log_manager), # 提醒操作 25 | url(r'^me/edit/$', change_myself), # 修改用户信息 26 | url(r'^me/edit/passwd/$',change_passwd), # 修改密码 27 | url(r'^me/edit/email/$',bind_email), # 请求绑定邮箱 28 | url(r'^comm/email/$',verifi_email), # 验证邮箱 29 | url(r'^me/del/email/$',del_email), # 邮箱解绑 30 | url(r'^comm/forgetpasswd/$',find_passwd), # 忘记密码 31 | url(r'^comm/passwd/$',reset_passwd), # 点击邮件链接重置密码 32 | ) -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/css/index.css: -------------------------------------------------------------------------------- 1 | header .banner { 2 | width: 1200px; 3 | height: 400px; 4 | margin: 50px auto 0; 5 | } 6 | header .banner .slide-carousel { 7 | margin-bottom: 20px; 8 | } 9 | header .banner .slide-3d .desc { 10 | display: none; 11 | } 12 | header .banner .slide-3d .item-list li { 13 | width: 750px; 14 | height: 300px; 15 | transition: all 0.5s ease-out; 16 | opacity: 0; 17 | position: absolute; 18 | top: 0; 19 | left: 0; 20 | } 21 | header .banner .slide-3d .item-list li.item0 { 22 | transform: translate3d(-225px, 0, 0) scale(0.8); 23 | } 24 | header .banner .slide-3d .item-list li.item1 { 25 | transform: translate3d(0, 0, 0) scale(0.8); 26 | transform-origin: 0 50%; 27 | opacity: 1; 28 | z-index: 2; 29 | } 30 | header .banner .slide-3d .item-list li.item2 { 31 | transform: translate3d(225px, 0, 0) scale(1); 32 | transform-origin: 0 50%; 33 | opacity: 1; 34 | z-index: 3; 35 | } 36 | header .banner .slide-3d .item-list li.item3 { 37 | transform: translate3d(450px, 0, 0) scale(0.8); 38 | transform-origin: 100% 50%; 39 | opacity: 1; 40 | z-index: 2; 41 | } 42 | header .banner .slide-3d .item-list li.item4 { 43 | transform: translate3d(675px, 0, 0) scale(0.8); 44 | } 45 | header .banner .slide-3d .item-list li.item5 { 46 | transform: translate3d(900px, 0, 0) scale(0.8); 47 | } 48 | header .banner .slide-3d .item-list li.item6 { 49 | transform: translate3d(1125px, 0, 0) scale(0.8); 50 | } 51 | header .banner .slide-3d .item-list li.item7 { 52 | transform: translate3d(1350px, 0, 0) scale(0.8); 53 | } 54 | header .banner .slide-3d .item-list li.item8 { 55 | transform: translate3d(1575px, 0, 0) scale(0.8); 56 | } 57 | header .banner .slide-3d .item-list li.item9 { 58 | transform: translate3d(1800px, 0, 0) scale(0.8); 59 | } 60 | -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/css/jquery.onoff.css: -------------------------------------------------------------------------------- 1 | .onoffswitch{ 2 | position:relative;width:50px; 3 | -webkit-user-select:none; 4 | -moz-user-select:none; 5 | -ms-user-select:none 6 | } 7 | .onoffswitch-checkbox{display:none} 8 | .onoffswitch-label{ 9 | display:block; 10 | overflow:hidden; 11 | cursor:pointer; 12 | border:0; 13 | border-radius:50px 14 | } 15 | .onoffswitch-inner{ 16 | width:200%; 17 | margin-left:-100%; 18 | -moz-transition:margin .3s ease-in 0s; 19 | -webkit-transition:margin .3s ease-in 0s; 20 | -o-transition:margin .3s ease-in 0s; 21 | transition:margin .3s ease-in 0s 22 | } 23 | .onoffswitch-inner:before, .onoffswitch-inner:after{ 24 | float:left; 25 | width:50%; 26 | height:25px; 27 | padding:0; 28 | line-height:25px; 29 | font-size:10px; 30 | color:white; 31 | font-family:Trebuchet,Arial,sans-serif; 32 | font-weight:bold; 33 | -moz-box-sizing:border-box; 34 | -webkit-box-sizing:border-box;box-sizing:border-box 35 | } 36 | .onoffswitch-inner:before{ 37 | content:"ON"; 38 | padding-left:6px; 39 | color:#fff; 40 | background-color:#32c8de 41 | } 42 | .onoffswitch-inner:after{ 43 | content:"OFF"; 44 | padding-right:4px; 45 | background-color:#9BC53F; 46 | color:#fff; 47 | text-align:right 48 | } 49 | .onoffswitch-switch{ 50 | width:18px; 51 | margin:4px; 52 | background:#fcf7f7; 53 | border:0; 54 | border-radius:50px; 55 | position:absolute; 56 | top:0; 57 | bottom:0; 58 | right:24px; 59 | -moz-transition:all .3s ease-in 0s; 60 | -webkit-transition:all .3s ease-in 0s; 61 | -o-transition:all .3s ease-in 0s; 62 | transition:all .3s ease-in 0s 63 | } 64 | .onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner{margin-left:0} 65 | .onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{right:0} -------------------------------------------------------------------------------- /templates/SchoolBuy/ResetPasswd.html: -------------------------------------------------------------------------------- 1 | {% extends "SchoolBuy/base.html" %} 2 | {% block title %}重置密码{% endblock %} 3 | 4 | {% block detial %} 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 | 13 |

重置密码

14 | 15 |
16 | 17 |
18 | 19 |
20 | 21 | {{ csrf_input }} 22 | 23 |
24 | 25 | 26 | 27 | 28 |
29 | {{ form.code }} 30 | 31 | {{ form.new_passwd }} 32 |

{{ form.new_passwd.errors.as_text() }}

33 | 34 |
35 | 36 | 37 | * 38 | 39 | 40 | 41 |
42 | 43 | {{ form.re_passwd }} 44 |

{{ form.re_passwd.errors.as_text() }}

45 |
46 | 47 | 48 | * 49 | 50 |
51 | 52 |
53 | 54 |
55 | 56 |
57 | 58 |
59 | 60 |
61 | 62 |
63 | 64 |
65 | 66 | {% endblock %} -------------------------------------------------------------------------------- /templates/SchoolBuy/MyLog.html: -------------------------------------------------------------------------------- 1 | {% extends "SchoolBuy/base.html" %} 2 | {% block title %}消息提醒{% endblock %} 3 | {% block detial %} 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 | 13 |

未读消息 标为已读

14 | 15 |
16 | 17 |
18 | 19 | {% for i in Newlog %} 20 |
21 | 22 | {{ i.From.Nick }}在{{ i.Owner.Title }}中给你回复了:{{ i.Mess.Words }} 23 | 24 | 25 |
26 | {% endfor %} 27 |
28 |
29 | 30 |

已读消息 删除已读

31 | 32 |
33 | 34 |
35 | 36 | {% for i in Oldlog %} 37 |
38 | 39 | {{ i.From.Nick }}在{{ i.Owner.Title }}中给你回复了:{{ i.Mess.Words }} 40 | 41 | 42 |
43 | 44 | {% endfor %} 45 |
46 |
47 | 48 |

。。。删除所有

49 | 50 |
51 | 52 |
53 | 54 |
55 |
56 |
57 |
58 | 59 | {% endblock %} -------------------------------------------------------------------------------- /templates/SchoolBuy/MyMessage.html: -------------------------------------------------------------------------------- 1 | {% extends "SchoolBuy/base.html" %} 2 | {% block title %}我的信息{% endblock %} 3 | {% block detial %} 4 | 9 | 10 |
11 | {{ profile.Nick }} 12 | 13 | 14 | 15 | 16 |
17 |
18 | {{ log }}条未读消息 19 |
20 |

我的物品

21 |
22 |
23 | {% for i in goods %} 24 | 25 |
26 |
27 |
28 | {{ i.Title }} 29 |
30 |
31 | {% if i.First_pic %} 32 | 33 | 34 | {% else %} 35 | 36 | {% endif %} 37 |     38 | 39 | 40 | 41 |     42 | 43 | 44 | 45 | 46 |
47 |
48 |
49 | 50 | {% endfor %} 51 | 52 |
53 |
54 | {% endblock %} -------------------------------------------------------------------------------- /templates/SchoolBuy/Edit.html: -------------------------------------------------------------------------------- 1 | {% extends "SchoolBuy/PushGoods.html" %} 2 | {% block title %}编辑商品{% endblock %} 3 | {% block h1 %}编辑基本信息{% endblock %} 4 | 5 | {% block delpicture %}{% endblock %} 6 | 7 | {% block addend %} 8 | 9 | {% if image %} 10 | 11 |
12 | 13 |
14 | 15 |
16 | 17 |
18 | 19 |

删除图片

20 | 21 |
22 | 23 |
24 | 25 | {% for i in image %} 26 | 删除 27 | {% endfor %} 28 | 29 |
30 |
31 |
32 |
33 |
34 | {% endif %} 35 | 36 |
37 | 38 |
39 | 40 |
41 | 42 |
43 | 44 |

添加新图片

45 | 46 |
47 | 48 |
49 | 50 |
51 | 52 | {{ csrf_input }} 53 |
54 | 55 |
56 | 57 |
58 | {# id为商品id #} 59 | 60 | 61 |

注意,我们只会接收.jpg和.png图片

62 | 63 | 64 |
65 | 66 | 67 | 68 | 69 |
70 | 71 |
72 |
73 |
74 |
75 |
76 |
77 | 78 | {% endblock %} -------------------------------------------------------------------------------- /templates/SchoolBuy/Register.html: -------------------------------------------------------------------------------- 1 | {% extends "SchoolBuy/base.html" %} 2 | {% block title %}注册{% endblock %} 3 | {% block detial %} 4 | 5 |
6 |
7 |
8 | 54 | 55 |
56 |
57 |
58 |
59 | {% endblock %} 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/css/slide.css: -------------------------------------------------------------------------------- 1 | .slide-carousel { 2 | width: 100%; 3 | height: 100%; 4 | position: relative; 5 | /*overflow: hidden;*/ 6 | } 7 | .slide-carousel .item-list { 8 | position: relative; 9 | height: 100%; 10 | width: 100%; 11 | overflow: hidden; 12 | } 13 | .slide-carousel .item-list li .item-content { 14 | width: 100%; 15 | height: 100%; 16 | } 17 | .slide-carousel .item-list li .item-content a { 18 | display: block; 19 | width: 100%; 20 | height: 100%; 21 | } 22 | .slide-carousel .item-list li .item-content a .cover-img { 23 | width: 100%; 24 | height: 100%; 25 | } 26 | .slide-carousel .indicator-list { 27 | position: absolute; 28 | bottom: 2px; 29 | left: 50%; 30 | margin-left: -63px; 31 | z-index: 100; 32 | } 33 | .slide-carousel .indicator-list a img{ 34 | display: inline-block; 35 | width: 30px; 36 | height: 30px; 37 | border: 2px solid #fff; 38 | border-radius: 50%; 39 | overflow: hidden; 40 | background-color: #ccc; 41 | margin-left: 5px; 42 | } 43 | .slide-carousel .indicator-list a.selected { 44 | border-color: #ff6700; 45 | background-color: #1b252e; 46 | } 47 | .slide-carousel .controls { 48 | opacity: 0; 49 | } 50 | .slide-carousel .controls a { 51 | cursor: pointer; 52 | text-decoration: none; 53 | width: 40px; 54 | height: 60px; 55 | position: absolute; 56 | background-color: rgba(0, 0, 0, 0.2); 57 | color: #fff; 58 | font-size: 35px; 59 | padding-top: 25px; 60 | z-index: 2; 61 | } 62 | .slide-carousel .controls a:hover { 63 | background-color: rgba(0, 0, 0, 0.5); 64 | } 65 | .slide-carousel .controls .item-prev { 66 | top: 50%; 67 | left: 0; 68 | margin-top: -42px; 69 | } 70 | .slide-carousel .controls .item-next { 71 | top: 50%; 72 | right: 0; 73 | margin-top: -42px; 74 | } 75 | .slide-carousel .desc { 76 | height: 72px; 77 | width: 100%; 78 | position: absolute; 79 | bottom: 0; 80 | left: 0; 81 | background-color: rgba(0, 0, 0, 0.6); 82 | z-index: 99; 83 | } 84 | .slide-carousel .desc strong { 85 | color: #fff; 86 | font-size: 20px; 87 | line-height: 72px; 88 | margin-left: 20px; 89 | overflow: hidden; 90 | white-space: nowrap; 91 | text-overflow: ellipsis; 92 | } 93 | .slide-carousel:hover .controls { 94 | opacity: 1; 95 | transition: opacity 0.5s ease; 96 | } 97 | -------------------------------------------------------------------------------- /comm/backends.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | from django.template.backends import jinja2 as jinja2backend 4 | from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy 5 | from django.template import TemplateDoesNotExist, TemplateSyntaxError 6 | from django.utils.module_loading import import_string 7 | import jinja2 8 | import six 9 | 10 | 11 | # Original link: 12 | # https://code.djangoproject.com/attachment/ticket/24694/24694.py 13 | __author__ = 'carljm' 14 | 15 | 16 | class Jinja2Backend(jinja2backend.Jinja2): 17 | def __init__(self, params): 18 | self.context_processors = [ 19 | import_string(p) 20 | for p in params['OPTIONS'].pop('context_processors', []) 21 | ] 22 | super(Jinja2Backend, self).__init__(params) 23 | 24 | def from_string(self, template_code): 25 | return Template( 26 | self.env.from_string(template_code), self.context_processors) 27 | 28 | def get_template(self, template_name): 29 | try: 30 | return Template( 31 | self.env.get_template(template_name), self.context_processors) 32 | except jinja2.TemplateNotFound as exc: 33 | six.reraise(TemplateDoesNotExist, TemplateDoesNotExist(exc.args), 34 | sys.exc_info()[2]) 35 | except jinja2.TemplateSyntaxError as exc: 36 | six.reraise(TemplateSyntaxError, TemplateSyntaxError(exc.args), 37 | sys.exc_info()[2]) 38 | 39 | 40 | class Template(jinja2backend.Template): 41 | 42 | def __init__(self, template, context_processors): 43 | self.template = template 44 | self.context_processors = context_processors 45 | 46 | def render(self, context=None, request=None): 47 | if context is None: 48 | context = {} 49 | if request is not None: 50 | context['request'] = request 51 | lazy_csrf_input = csrf_input_lazy(request) 52 | context['csrf'] = lambda: lazy_csrf_input 53 | context['csrf_input'] = lazy_csrf_input 54 | context['csrf_token'] = csrf_token_lazy(request) 55 | for cp in self.context_processors: 56 | context.update(cp(request)) 57 | #print(context) 58 | return self.template.render(context) 59 | 60 | -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/js/index.js: -------------------------------------------------------------------------------- 1 | !function(e){e.fn.slideCarsousel=function(t){t=e.extend({},e.fn.slideCarsousel.defaultSetting,t);var i=e(this),n=i.children("ul.item-list"),r=n.children(),s={slideCarousel:i,count:r.length,ul:n,liList:r,currentIndex:0,indicatorList:i.children(".indicator-list").children("a"),itemPrev:i.children(".controls").children(".item-prev"),itemNext:i.children(".controls").children(".item-next"),itemClassArr:[],init:function(){for(var e=0,t=s.count;e=s.count?0:s.currentIndex,s.resetItemClass()},toPrev:function(){s.itemClassArr.push(s.itemClassArr[0]),s.itemClassArr.shift(),s.currentIndex--,s.currentIndex=s.currentIndex<0?s.count-1:s.currentIndex,s.resetItemClass()},processIndicatorEvent:function(t){var i=t-s.currentIndex;if(0!=i){if(s.currentIndex=t,i>0){n=s.itemClassArr.splice(s.itemClassArr.length-i);return s.itemClassArr=e.merge(n,s.itemClassArr),void s.resetItemClass()}if(i<0){var n=s.itemClassArr.splice(0,-i);return s.itemClassArr=e.merge(s.itemClassArr,n),void s.resetItemClass()}}},resetItemClass:function(){e.each(s.liList,function(t,i){e(i).removeClass().addClass(s.itemClassArr[t])}),s.indicatorList.removeClass("selected").eq(s.currentIndex).addClass("selected"),s.processCallbackFunc(s.currentIndex)},processCallbackFunc:function(e){null!=t.callbackFunc&&void 0!=t.callbackFunc&&t.callbackFunc(e)}};switch(s.init(),s.itemNext.click(function(){s.toNext()}),s.itemPrev.click(function(){s.toPrev()}),t.indicatorEvent){case"click":s.indicatorList.click(function(){s.processIndicatorEvent(e(this).attr("data-slide-index"))});break;case"mouseover":s.indicatorList.mouseover(function(){s.processIndicatorEvent(e(this).attr("data-slide-index"))})}switch(t.slideType){case"2d":break;case"3d":s.ul.on("click",".item1 img",function(){s.toPrev()}),s.ul.on("click",".item3 img",function(){s.toNext()})}s.slideCarousel.mouseover(function(){clearInterval(t.slideInterval)}).mouseleave(function(){s.slideAutoChange()})},e.fn.slideCarsousel.defaultSetting={slideInterval:"slideInterval",isAutoChange:!0,direction:5e3,callbackFunc:null,indicatorEvent:"click",slideType:"2d"}}(jQuery); -------------------------------------------------------------------------------- /templates/SchoolBuy/GoodsList.html: -------------------------------------------------------------------------------- 1 | {% extends "SchoolBuy/base.html" %} 2 | {% block title %}所有商品{% endblock %} 3 | {% block detial %} 4 | 5 | {% block head %} 6 |
7 |
8 |
9 | 10 | 11 |
12 | 13 |
14 | 15 | {{ form.type }} 16 |
17 | 清空 18 | 19 |
20 |
21 | 29 | {% endblock %} 30 | 31 |
32 | 33 | 34 | 35 |
36 |
37 | {% for i in goods %} 38 | 39 |
40 |
41 |
42 | {{ i.Title }} 43 |
44 |
45 | {% if i.First_pic %} 46 | 47 | 48 | {% else %} 49 | 50 | {% endif %} 51 |
52 |
53 |
54 | 55 | {% endfor %} 56 | 57 |
58 |
59 | 60 | {% block delpagination %} 61 | 84 | {% endblock %} 85 | {% endblock %} 86 | -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/js/test_kendo_grid.js: -------------------------------------------------------------------------------- 1 | //全局变量 2 | var person_model = kendo.data.Model.define({ 3 | id: "id", 4 | fields: { 5 | //data type of the field {Number|String|Boolean|Date} default is String 6 | id:{type:"number",editable: false, nullable: true }, 7 | english_name: { type: "string",validation: {required: true }}, 8 | chinese_name: { type: "string",validation: {required: true }}, 9 | city: { type: "string",validation: {required: true }}, 10 | birthday: { type: "date",validation: {required: true }}, 11 | age:{type:"number",validation: {required: true, min: 1 }}, 12 | email :{type:"string",nullable:true, validation:{email: true}},//添加验证 13 | tel : {type:"string",nullable:true, validation:{pattern: "\\d{11}"}},//自定义验证(斜杠'\'需要转义) 14 | } 15 | }) 16 | 17 | var book_model = kendo.data.Model.define({ 18 | id: "id", 19 | fields:{ 20 | id: {type:"number",editable: false, nullable: true }, 21 | author: {type: "string",validation: {required: true }}, 22 | publication_date: {type: "date",validation: {required: true }}, 23 | price: {type: "number",validation: {required: true }} 24 | } 25 | }) 26 | 27 | function get_part_by_name(part_name){ 28 | var url = site_url+'kendo_crud/get_part_by_name/'; 29 | var param = {'part_name':part_name}; 30 | $.get(url,param,function(res){ 31 | if(res.result) 32 | { 33 | $('#test').html(res.res); 34 | } 35 | },'json') 36 | } 37 | 38 | function get_from_sample_part(){ 39 | var url = site_url+'kendo_crud/form_sample/'; 40 | $.get(url,function(res){ 41 | $('#test').html(res); 42 | }) 43 | } 44 | 45 | /** 46 | * 时间格式化 47 | * @param x 时间。如new Date() 48 | * @param y 格式:如:"yyyy-MM-dd hh:mm:ss" 49 | * @returns 格式化后的时间字符串 50 | */ 51 | function date2str(x,y) { 52 | var z = {M:x.getMonth()+1,d:x.getDate(),h:x.getHours(),m:x.getMinutes(),s:x.getSeconds()}; 53 | y = y.replace(/(M+|d+|h+|m+|s+)/g,function(v) {return ((v.length>1?"0":"")+eval('z.'+v.slice(-1))).slice(-2)}); 54 | return y.replace(/(y+)/g,function(v) {return x.getFullYear().toString().slice(-v.length)}); 55 | } -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/css/uploadify.css: -------------------------------------------------------------------------------- 1 | /* 2 | Uploadify 3 | Copyright (c) 2012 Reactive Apps, Ronnie Garcia 4 | Released under the MIT License 5 | */ 6 | 7 | .uploadify { 8 | position: relative; 9 | margin-bottom: 1em; 10 | } 11 | .uploadify-button { 12 | background-color: #505050; 13 | background-image: linear-gradient(bottom, #505050 0%, #707070 100%); 14 | background-image: -o-linear-gradient(bottom, #505050 0%, #707070 100%); 15 | background-image: -moz-linear-gradient(bottom, #505050 0%, #707070 100%); 16 | background-image: -webkit-linear-gradient(bottom, #505050 0%, #707070 100%); 17 | background-image: -ms-linear-gradient(bottom, #505050 0%, #707070 100%); 18 | background-image: -webkit-gradient( 19 | linear, 20 | left bottom, 21 | left top, 22 | color-stop(0, #505050), 23 | color-stop(1, #707070) 24 | ); 25 | background-position: center top; 26 | background-repeat: no-repeat; 27 | -webkit-border-radius: 30px; 28 | -moz-border-radius: 30px; 29 | border-radius: 30px; 30 | border: 2px solid #808080; 31 | color: #FFF; 32 | font: bold 12px Arial, Helvetica, sans-serif; 33 | text-align: center; 34 | text-shadow: 0 -1px 0 rgba(0,0,0,0.25); 35 | width: 100%; 36 | } 37 | .uploadify:hover .uploadify-button { 38 | background-color: #606060; 39 | background-image: linear-gradient(top, #606060 0%, #808080 100%); 40 | background-image: -o-linear-gradient(top, #606060 0%, #808080 100%); 41 | background-image: -moz-linear-gradient(top, #606060 0%, #808080 100%); 42 | background-image: -webkit-linear-gradient(top, #606060 0%, #808080 100%); 43 | background-image: -ms-linear-gradient(top, #606060 0%, #808080 100%); 44 | background-image: -webkit-gradient( 45 | linear, 46 | left bottom, 47 | left top, 48 | color-stop(0, #606060), 49 | color-stop(1, #808080) 50 | ); 51 | background-position: center bottom; 52 | } 53 | .uploadify-button.disabled { 54 | background-color: #D0D0D0; 55 | color: #808080; 56 | } 57 | .uploadify-queue { 58 | margin-bottom: 1em; 59 | } 60 | .uploadify-queue-item { 61 | background-color: #F5F5F5; 62 | -webkit-border-radius: 3px; 63 | -moz-border-radius: 3px; 64 | border-radius: 3px; 65 | font: 11px Verdana, Geneva, sans-serif; 66 | margin-top: 5px; 67 | max-width: 350px; 68 | padding: 10px; 69 | } 70 | .uploadify-error { 71 | background-color: #FDE5DD !important; 72 | } 73 | .uploadify-queue-item .cancel a { 74 | background: url('../img/uploadify-cancel.png') 0 0 no-repeat; 75 | float: right; 76 | height: 16px; 77 | text-indent: -9999px; 78 | width: 16px; 79 | } 80 | .uploadify-queue-item.completed { 81 | background-color: #E5E5E5; 82 | } 83 | .uploadify-progress { 84 | background-color: #E5E5E5; 85 | margin-top: 10px; 86 | width: 100%; 87 | } 88 | .uploadify-progress-bar { 89 | background-color: #0099FF; 90 | height: 3px; 91 | width: 1px; 92 | } -------------------------------------------------------------------------------- /SchoolBuy/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | #coding=utf8 3 | # Create your models here. 4 | from django.contrib.auth.admin import User 5 | from django.db import models 6 | #from easy_thumbnails.fields import ThumbnailerImageField 7 | from mptt.models import MPTTModel 8 | from django import forms 9 | 10 | #用户基本信息 11 | class UserProfile(models.Model): 12 | User = models.OneToOneField(User) 13 | Nick = models.CharField(max_length=255) 14 | Avatar = models.CharField(max_length=200,default='/static/SchoolBuy/images/logo.png',blank=True,null=True) 15 | EmailCode = models.CharField(max_length=500,blank=True,null=True) # 邮箱验证码 16 | EmailCodeTime = models.DateTimeField(blank=True,null=True) # 发送验证邮箱的时间(控制用户刷邮件) 17 | PasswdCode = models.CharField(max_length=500,blank=True,null=True) # 找回密码验证码 18 | PasswdCodeTime = models.DateTimeField(blank=True,null=True) # 发送验证邮箱的时间(控制用户刷邮件) 19 | 20 | 21 | def __str__(self): 22 | return self.User.username 23 | 24 | 25 | #商品类型 26 | class GoodsType(MPTTModel): 27 | name = models.CharField(max_length=50) 28 | parent = models.ForeignKey("self", blank=True, null=True, related_name="children") 29 | 30 | class MPTTMeta: 31 | parent_attr = 'parent' 32 | 33 | def __str__(self): 34 | return self.name 35 | 36 | class GoodsImage(models.Model): 37 | ImgBig = models.ImageField(upload_to='images/',blank=True) 38 | ImgSma = models.ImageField(upload_to='images/',blank=True) 39 | 40 | class GoodsMessage(models.Model): 41 | Title = models.CharField(max_length=20) # 商品标题 42 | Category = models.ForeignKey(GoodsType,null=True,blank=True) # 商品标签 43 | Details = models.TextField() # 商品详细描述 44 | Ctime = models.DateTimeField() # 发布日期 45 | Mtime = models.DateTimeField() # 上次编辑时间 46 | PV = models.IntegerField(default=0) # 访问量 47 | Owner = models.ForeignKey(User) # 发布者 48 | Images = models.ManyToManyField(GoodsImage) # 商品图片 49 | Is_alive = models.BooleanField(default=True) # 商品是否上架 50 | First_pic = models.ForeignKey(GoodsImage,related_name='first_pic',null=True,blank=True,default=None) # 商品第一张图片,便于使用分页模块查找 51 | 52 | def __str__(self): 53 | return self.Title + self.Category.name 54 | 55 | #留言功能 56 | class GoodsWords(models.Model): 57 | Owner = models.ForeignKey(GoodsMessage) 58 | From = models.ForeignKey(UserProfile) # 来自 59 | To = models.ForeignKey('self',null=True,blank=True) #回复给哪条 60 | Words = models.TextField() 61 | Display = models.BooleanField(default=True) # 是否显示 62 | Time = models.DateTimeField(null=True) 63 | 64 | 65 | def __str__(self): 66 | return self.From.User.username+'->'+self.Words 67 | 68 | #通知某人回复了留言 69 | class GoodsLog(models.Model): 70 | Owner = models.ForeignKey(GoodsMessage) # 所属商品 71 | From = models.ForeignKey(UserProfile) # 来自 72 | To = models.ForeignKey(User) # 推送给谁 73 | Mess = models.ForeignKey(GoodsWords) #消息内容 74 | Readed = models.BooleanField(default=False) #是否已读 75 | -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/css/hooraylibs.css: -------------------------------------------------------------------------------- 1 | #topcontrol{z-index:999} 2 | #topcontrol a{display:block;width:54px;height:41px;background:url(scrolltotop.gif) no-repeat 0 0} 3 | #topcontrol a:hover{display:block;width:54px;height:41px;background:url(scrolltotop.gif) no-repeat -54px 0} 4 | 5 | .zeng_msgbox_layer, 6 | .zeng_msgbox_layer .gtl_ico_succ, 7 | .zeng_msgbox_layer .gtl_ico_fail, 8 | .zeng_msgbox_layer .gtl_ico_hits, 9 | .zeng_msgbox_layer .gtl_ico_clear, 10 | .zeng_msgbox_layer .gtl_end{display:inline-block;height:54px;line-height:54px;font-weight:bold;font-size:14px;color:#606060;background-image:url(gb_tip_layer.png);_background-image:url(gb_tip_layer_ie6.png);background-repeat:no-repeat} 11 | .zeng_msgbox_layer_wrap{width:100%;position:fixed;_position:absolute;top:46%;left:0;text-align:center;z-index:65533} 12 | .zeng_msgbox_layer{background-position:0 -161px;background-repeat:repeat-x;padding:0 18px 0 9px;margin:0 auto;position:relative} 13 | .zeng_msgbox_layer .gtl_ico_succ{background-position:-6px 0;left:-45px;top:0;width:45px;position:absolute} 14 | .zeng_msgbox_layer .gtl_end{background-position:0 0;position:absolute;right:-6px;top:0;width:6px} 15 | .zeng_msgbox_layer .gtl_ico_fail{background-position:-6px -108px;position:absolute;left:-45px;top:0;width:45px} 16 | .zeng_msgbox_layer .gtl_ico_hits{background-position:-6px -54px;position:absolute;left:-45px;top:0;width:45px} 17 | .zeng_msgbox_layer .gtl_ico_clear{background-position:-6px 0;left:-5px;width:5px;position:absolute;top:0} 18 | .zeng_msgbox_layer .gtl_ico_loading{width:16px;height:16px;border:0;background-image:url(gb_tip_loading.gif);float:left;margin:19px 10px 0 5px} 19 | 20 | .colorTip{display:none;position:absolute;left:50%;top:-30px;padding:6px;background-color:white;font-family:Arial,Helvetica,sans-serif;font-size:11px;font-style:normal;line-height:1;text-decoration:none;text-align:center;text-shadow:0 0 1px white;white-space:nowrap;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px} 21 | .pointyTip,.pointyTipShadow{border:6px solid transparent;bottom:-12px;height:0;left:50%;margin-left:-6px;position:absolute;width:0} 22 | .pointyTipShadow{border-width:7px;bottom:-14px;margin-left:-7px} 23 | .colorTipContainer{position:relative;text-decoration:none!important} 24 | .white .pointyTip{border-top-color:white} 25 | .white .pointyTipShadow{border-top-color:#ddd} 26 | .white .colorTip{background-color:white;border:1px solid #ddd;color:#555} 27 | .yellow .pointyTip{border-top-color:#f9f2ba} 28 | .yellow .pointyTipShadow{border-top-color:#e9d315} 29 | .yellow .colorTip{background-color:#f9f2ba;border:1px solid #e9d315;color:#5b5316} 30 | .blue .pointyTip{border-top-color:#d9f1fb} 31 | .blue .pointyTipShadow{border-top-color:#7fcdee} 32 | .blue .colorTip{background-color:#d9f1fb;border:1px solid #7fcdee;color:#1b475a} 33 | .green .pointyTip{border-top-color:#f2fdf1} 34 | .green .pointyTipShadow{border-top-color:#b6e184} 35 | .green .colorTip{background-color:#f2fdf1;border:1px solid #b6e184;color:#558221} 36 | .red .pointyTip{border-top-color:#bb3b1d} 37 | .red .pointyTipShadow{border-top-color:#8f2a0f} 38 | .red .colorTip{background-color:#bb3b1d;border:1px solid #8f2a0f;color:#fcfcfc;text-shadow:none} 39 | .black .pointyTip{border-top-color:#333} 40 | .black .pointyTipShadow{border-top-color:#111} 41 | .black .colorTip{background-color:#333;border:1px solid #111;color:#fcfcfc;text-shadow:none} 42 | 43 | /*自定义样式*/ 44 | .color_gray {color:#A0A0A0;} 45 | .color_red {color:red;} 46 | 47 | -------------------------------------------------------------------------------- /SchoolBuy/static/SchoolBuy/js/jquery.onoff.min.js: -------------------------------------------------------------------------------- 1 | /** onoff - v0.1.0 - 2014-01-15 2 | * https://github.com/timmywil/jquery.onoff 3 | * Copyright (c) 2014 Timmy Willison; Licensed MIT */ 4 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?b(require("jquery")):b(a.jQuery)}(this,function(a){"use strict";function b(c,e){if(!(this instanceof b))return new b(c,e);if("input"!==c.nodeName.toLowerCase()||"checkbox"!==c.type)return a.error("OnOff should be called on checkboxes");var f=a.data(c,b.datakey);return f?f:(this.options=e=a.extend({},b.defaults,e),this.elem=c,this.$elem=a(c).addClass(e.className),this.$doc=a(c.ownerDocument||document),e.namespace+=a.guid++,c.id||(c.id="onoffswitch"+d++),this.enable(),a.data(c,b.datakey,this),void 0)}var c={props:["clientX","clientY"],filter:function(a,b){var c;return!b.clientX&&b.touches&&(c=b.touches[0])&&(a.clientX=c.clientX,a.clientY=c.clientY),a}};a.each(["touchstart","touchmove","touchend"],function(b,d){a.event.fixHooks[d]=c});var d=1,e=Array.prototype.slice,f=!!window.PointerEvent;return b.datakey="_onoff",b.defaults={namespace:".onoff",className:"onoffswitch-checkbox"},b.prototype={constructor:b,instance:function(){return this},wrap:function(){var b=this.elem,c=this.$elem,d=c.parent(".onoffswitch");d.length||(c.wrap('
'),d=c.parent()),this.$con=d;var e=c.next('label[for="'+b.id+'"]');e.length||(e=a("