├── .idea ├── School_BBS.iml ├── dataSources.xml ├── dataSources │ ├── 1e557acd-5d06-4623-b0bf-2ed13cb35d2c.xml │ └── 1e557acd-5d06-4623-b0bf-2ed13cb35d2c │ │ └── storage_v2 │ │ └── _src_ │ │ └── schema │ │ └── main.uQUzAA.meta ├── misc.xml └── modules.xml ├── DjangoUeditor ├── __init__.py ├── adminx.py ├── commands.py ├── forms.py ├── models.py ├── readme.txt ├── settings.py ├── static │ └── ueditor │ │ ├── UEditorSnapscreen.exe │ │ ├── _examples │ │ ├── addCustomizeButton.js │ │ ├── addCustomizeCombox.js │ │ ├── addCustomizeDialog.js │ │ ├── charts.html │ │ ├── completeDemo.html │ │ ├── customPluginDemo.html │ │ ├── customToolbarDemo.html │ │ ├── customizeDialogPage.html │ │ ├── customizeToolbarUIDemo.html │ │ ├── editor_api.js │ │ ├── filterRuleDemo.html │ │ ├── highlightDemo.html │ │ ├── index.html │ │ ├── jqueryCompleteDemo.html │ │ ├── jqueryValidation.html │ │ ├── multiDemo.html │ │ ├── multiEditorWithOneInstance.html │ │ ├── renderInTable.html │ │ ├── resetDemo.html │ │ ├── sectiondemo.html │ │ ├── server │ │ │ ├── getContent.ashx │ │ │ ├── getContent.asp │ │ │ ├── getContent.jsp │ │ │ └── getContent.php │ │ ├── setWidthHeightDemo.html │ │ ├── simpleDemo.html │ │ ├── sortableDemo.html │ │ ├── submitFormDemo.html │ │ ├── textareaDemo.html │ │ └── uparsedemo.html │ │ ├── dialogs │ │ ├── anchor │ │ │ └── anchor.html │ │ ├── attachment │ │ │ ├── attachment.css │ │ │ ├── attachment.html │ │ │ ├── attachment.js │ │ │ ├── fileTypeImages │ │ │ │ ├── icon_chm.gif │ │ │ │ ├── icon_default.png │ │ │ │ ├── icon_doc.gif │ │ │ │ ├── icon_exe.gif │ │ │ │ ├── icon_jpg.gif │ │ │ │ ├── icon_mp3.gif │ │ │ │ ├── icon_mv.gif │ │ │ │ ├── icon_pdf.gif │ │ │ │ ├── icon_ppt.gif │ │ │ │ ├── icon_psd.gif │ │ │ │ ├── icon_rar.gif │ │ │ │ ├── icon_txt.gif │ │ │ │ └── icon_xls.gif │ │ │ └── images │ │ │ │ ├── alignicon.gif │ │ │ │ ├── alignicon.png │ │ │ │ ├── bg.png │ │ │ │ ├── file-icons.gif │ │ │ │ ├── file-icons.png │ │ │ │ ├── icons.gif │ │ │ │ ├── icons.png │ │ │ │ ├── image.png │ │ │ │ ├── progress.png │ │ │ │ ├── success.gif │ │ │ │ └── success.png │ │ ├── background │ │ │ ├── background.css │ │ │ ├── background.html │ │ │ ├── background.js │ │ │ └── images │ │ │ │ ├── bg.png │ │ │ │ └── success.png │ │ ├── charts │ │ │ ├── chart.config.js │ │ │ ├── charts.css │ │ │ ├── charts.html │ │ │ ├── charts.js │ │ │ └── images │ │ │ │ ├── charts0.png │ │ │ │ ├── charts1.png │ │ │ │ ├── charts2.png │ │ │ │ ├── charts3.png │ │ │ │ ├── charts4.png │ │ │ │ └── charts5.png │ │ ├── emotion │ │ │ ├── emotion.css │ │ │ ├── emotion.html │ │ │ ├── emotion.js │ │ │ └── images │ │ │ │ ├── 0.gif │ │ │ │ ├── bface.gif │ │ │ │ ├── cface.gif │ │ │ │ ├── fface.gif │ │ │ │ ├── jxface2.gif │ │ │ │ ├── neweditor-tab-bg.png │ │ │ │ ├── tface.gif │ │ │ │ ├── wface.gif │ │ │ │ └── yface.gif │ │ ├── gmap │ │ │ └── gmap.html │ │ ├── help │ │ │ ├── help.css │ │ │ ├── help.html │ │ │ └── help.js │ │ ├── image │ │ │ ├── image.css │ │ │ ├── image.html │ │ │ ├── image.js │ │ │ └── images │ │ │ │ ├── alignicon.jpg │ │ │ │ ├── bg.png │ │ │ │ ├── icons.gif │ │ │ │ ├── icons.png │ │ │ │ ├── image.png │ │ │ │ ├── progress.png │ │ │ │ ├── success.gif │ │ │ │ └── success.png │ │ ├── insertframe │ │ │ └── insertframe.html │ │ ├── internal.js │ │ ├── link │ │ │ └── link.html │ │ ├── map │ │ │ ├── map.html │ │ │ └── show.html │ │ ├── music │ │ │ ├── music.css │ │ │ ├── music.html │ │ │ └── music.js │ │ ├── preview │ │ │ └── preview.html │ │ ├── scrawl │ │ │ ├── images │ │ │ │ ├── addimg.png │ │ │ │ ├── brush.png │ │ │ │ ├── delimg.png │ │ │ │ ├── delimgH.png │ │ │ │ ├── empty.png │ │ │ │ ├── emptyH.png │ │ │ │ ├── eraser.png │ │ │ │ ├── redo.png │ │ │ │ ├── redoH.png │ │ │ │ ├── scale.png │ │ │ │ ├── scaleH.png │ │ │ │ ├── size.png │ │ │ │ ├── undo.png │ │ │ │ └── undoH.png │ │ │ ├── scrawl.css │ │ │ ├── scrawl.html │ │ │ └── scrawl.js │ │ ├── searchreplace │ │ │ ├── searchreplace.html │ │ │ └── searchreplace.js │ │ ├── snapscreen │ │ │ └── snapscreen.html │ │ ├── spechars │ │ │ ├── spechars.html │ │ │ └── spechars.js │ │ ├── table │ │ │ ├── dragicon.png │ │ │ ├── edittable.css │ │ │ ├── edittable.html │ │ │ ├── edittable.js │ │ │ ├── edittd.html │ │ │ └── edittip.html │ │ ├── template │ │ │ ├── config.js │ │ │ ├── images │ │ │ │ ├── bg.gif │ │ │ │ ├── pre0.png │ │ │ │ ├── pre1.png │ │ │ │ ├── pre2.png │ │ │ │ ├── pre3.png │ │ │ │ └── pre4.png │ │ │ ├── template.css │ │ │ ├── template.html │ │ │ └── template.js │ │ ├── video │ │ │ ├── images │ │ │ │ ├── bg.png │ │ │ │ ├── center_focus.jpg │ │ │ │ ├── file-icons.gif │ │ │ │ ├── file-icons.png │ │ │ │ ├── icons.gif │ │ │ │ ├── icons.png │ │ │ │ ├── image.png │ │ │ │ ├── left_focus.jpg │ │ │ │ ├── none_focus.jpg │ │ │ │ ├── progress.png │ │ │ │ ├── right_focus.jpg │ │ │ │ ├── success.gif │ │ │ │ └── success.png │ │ │ ├── video.css │ │ │ ├── video.html │ │ │ └── video.js │ │ ├── webapp │ │ │ └── webapp.html │ │ └── wordimage │ │ │ ├── fClipboard_ueditor.swf │ │ │ ├── imageUploader.swf │ │ │ ├── tangram.js │ │ │ ├── wordimage.html │ │ │ └── wordimage.js │ │ ├── index.html │ │ ├── lang │ │ ├── en │ │ │ ├── en.js │ │ │ └── images │ │ │ │ ├── addimage.png │ │ │ │ ├── alldeletebtnhoverskin.png │ │ │ │ ├── alldeletebtnupskin.png │ │ │ │ ├── background.png │ │ │ │ ├── button.png │ │ │ │ ├── copy.png │ │ │ │ ├── deletedisable.png │ │ │ │ ├── deleteenable.png │ │ │ │ ├── listbackground.png │ │ │ │ ├── localimage.png │ │ │ │ ├── music.png │ │ │ │ ├── rotateleftdisable.png │ │ │ │ ├── rotateleftenable.png │ │ │ │ ├── rotaterightdisable.png │ │ │ │ ├── rotaterightenable.png │ │ │ │ └── upload.png │ │ └── zh-cn │ │ │ ├── images │ │ │ ├── copy.png │ │ │ ├── localimage.png │ │ │ ├── music.png │ │ │ └── upload.png │ │ │ └── zh-cn.js │ │ ├── php │ │ ├── Uploader.class.php │ │ ├── action_crawler.php │ │ ├── action_list.php │ │ ├── action_upload.php │ │ ├── config.json │ │ └── controller.php │ │ ├── themes │ │ ├── default │ │ │ ├── css │ │ │ │ ├── ueditor.css │ │ │ │ └── ueditor.min.css │ │ │ ├── dialogbase.css │ │ │ └── images │ │ │ │ ├── anchor.gif │ │ │ │ ├── arrow.png │ │ │ │ ├── arrow_down.png │ │ │ │ ├── arrow_up.png │ │ │ │ ├── button-bg.gif │ │ │ │ ├── cancelbutton.gif │ │ │ │ ├── charts.png │ │ │ │ ├── cursor_h.gif │ │ │ │ ├── cursor_h.png │ │ │ │ ├── cursor_v.gif │ │ │ │ ├── cursor_v.png │ │ │ │ ├── dialog-title-bg.png │ │ │ │ ├── fileScan.png │ │ │ │ ├── highlighted.gif │ │ │ │ ├── icons-all.gif │ │ │ │ ├── icons.gif │ │ │ │ ├── icons.png │ │ │ │ ├── loaderror.png │ │ │ │ ├── loading.gif │ │ │ │ ├── lock.gif │ │ │ │ ├── neweditor-tab-bg.png │ │ │ │ ├── pagebreak.gif │ │ │ │ ├── scale.png │ │ │ │ ├── sortable.png │ │ │ │ ├── spacer.gif │ │ │ │ ├── sparator_v.png │ │ │ │ ├── table-cell-align.png │ │ │ │ ├── tangram-colorpicker.png │ │ │ │ ├── toolbar_bg.png │ │ │ │ ├── unhighlighted.gif │ │ │ │ ├── upload.png │ │ │ │ ├── videologo.gif │ │ │ │ ├── word.gif │ │ │ │ └── wordpaste.png │ │ └── iframe.css │ │ ├── third-party │ │ ├── SyntaxHighlighter │ │ │ ├── shCore.js │ │ │ └── shCoreDefault.css │ │ ├── codemirror │ │ │ ├── codemirror.css │ │ │ └── codemirror.js │ │ ├── highcharts │ │ │ ├── adapters │ │ │ │ ├── mootools-adapter.js │ │ │ │ ├── mootools-adapter.src.js │ │ │ │ ├── prototype-adapter.js │ │ │ │ ├── prototype-adapter.src.js │ │ │ │ ├── standalone-framework.js │ │ │ │ └── standalone-framework.src.js │ │ │ ├── highcharts-more.js │ │ │ ├── highcharts-more.src.js │ │ │ ├── highcharts.js │ │ │ ├── highcharts.src.js │ │ │ ├── modules │ │ │ │ ├── annotations.js │ │ │ │ ├── annotations.src.js │ │ │ │ ├── canvas-tools.js │ │ │ │ ├── canvas-tools.src.js │ │ │ │ ├── data.js │ │ │ │ ├── data.src.js │ │ │ │ ├── drilldown.js │ │ │ │ ├── drilldown.src.js │ │ │ │ ├── exporting.js │ │ │ │ ├── exporting.src.js │ │ │ │ ├── funnel.js │ │ │ │ ├── funnel.src.js │ │ │ │ ├── heatmap.js │ │ │ │ ├── heatmap.src.js │ │ │ │ ├── map.js │ │ │ │ ├── map.src.js │ │ │ │ ├── no-data-to-display.js │ │ │ │ └── no-data-to-display.src.js │ │ │ └── themes │ │ │ │ ├── dark-blue.js │ │ │ │ ├── dark-green.js │ │ │ │ ├── gray.js │ │ │ │ ├── grid.js │ │ │ │ └── skies.js │ │ ├── jquery-1.10.2.js │ │ ├── jquery-1.10.2.min.js │ │ ├── jquery-1.10.2.min.map │ │ ├── snapscreen │ │ │ └── UEditorSnapscreen.exe │ │ ├── video-js │ │ │ ├── font │ │ │ │ ├── vjs.eot │ │ │ │ ├── vjs.svg │ │ │ │ ├── vjs.ttf │ │ │ │ └── vjs.woff │ │ │ ├── video-js.css │ │ │ ├── video-js.min.css │ │ │ ├── video-js.swf │ │ │ ├── video.dev.js │ │ │ └── video.js │ │ ├── webuploader │ │ │ ├── Uploader.swf │ │ │ ├── webuploader.css │ │ │ ├── webuploader.custom.js │ │ │ ├── webuploader.custom.min.js │ │ │ ├── webuploader.flashonly.js │ │ │ ├── webuploader.flashonly.min.js │ │ │ ├── webuploader.html5only.js │ │ │ ├── webuploader.html5only.min.js │ │ │ ├── webuploader.js │ │ │ ├── webuploader.min.js │ │ │ ├── webuploader.withoutimage.js │ │ │ └── webuploader.withoutimage.min.js │ │ └── zeroclipboard │ │ │ ├── ZeroClipboard.js │ │ │ ├── ZeroClipboard.min.js │ │ │ └── ZeroClipboard.swf │ │ ├── ueditor.all.js │ │ ├── ueditor.all.min.js │ │ ├── ueditor.config.js │ │ ├── ueditor.parse.js │ │ └── ueditor.parse.min.js ├── templates │ ├── ueditor.html │ └── ueditor_old.html ├── urls.py ├── utils.py ├── views.py └── widgets.py ├── README.md ├── School_BBS ├── __init__.py ├── settings.py ├── urls.py └── wsgi.py ├── bbstest.json ├── comments ├── __init__.py ├── admin.py ├── apps.py ├── forms.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20180410_1802.py │ ├── 0003_commentreply.py │ └── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py ├── db.sqlite3 ├── hotinfo ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ ├── 0001_initial.py │ └── __init__.py ├── models.py ├── tests.py └── views.py ├── manage.py ├── media └── images │ ├── 1.jpg │ ├── 14.jpg │ ├── 1_5QuFmAp.jpg │ ├── 1_KsmfVNw.jpg │ ├── 1_oNfA96G.jpg │ ├── 4.jpg │ ├── 9.jpg │ ├── 9_b0VXlwa.jpg │ └── 微信图片_20180407181140_20180409201105_828.png ├── posts ├── __init__.py ├── admin.py ├── apps.py ├── forms.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_auto_20180409_2004.py │ ├── 0003_transmit.py │ ├── 0004_auto_20180410_1802.py │ ├── 0005_auto_20180411_0939.py │ ├── 0006_post_post_from.py │ ├── 0007_auto_20180412_1928.py │ └── __init__.py ├── models.py ├── static │ ├── csrf.js │ ├── css │ │ ├── Pygments.css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ ├── common.css │ │ ├── custom.css │ │ ├── index.css │ │ └── register.css │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── img │ │ ├── favicon.ico │ │ ├── footer.jpg │ │ ├── hbut1.jpg │ │ ├── link.jpg │ │ ├── link2.png │ │ ├── link3.png │ │ ├── p_bk.jpg │ │ ├── pro_bk.jpg │ │ └── 科技楼.gif │ ├── jquery-2.1.1.js │ ├── jquery-2.1.1.min.js │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ ├── bootstrap.min.js.map │ │ ├── holder.min.js │ │ ├── ie10-viewport-bug-workaround.js │ │ └── jquery-1.11.3.min.js ├── templates │ └── posts │ │ ├── add.html │ │ ├── base.html │ │ ├── base2.html │ │ ├── detail.html │ │ ├── detail3.html │ │ ├── index.html │ │ ├── index2.html │ │ ├── main.html │ │ ├── prof_self.html │ │ └── profile.html ├── templatetags │ ├── __init__.py │ └── blog_tags.py ├── tests.py ├── update.py ├── urls.py └── views.py ├── requirements.txt ├── spider ├── __init__.py ├── bbstest.json ├── hotInfo.py └── info.json ├── templates ├── index.html ├── post_page.html ├── registration │ ├── login.html │ ├── password_change_done.html │ ├── password_change_form.html │ ├── password_reset_complete.html │ ├── password_reset_confirm.html │ ├── password_reset_done.html │ └── password_reset_form.html └── users │ ├── register.html │ └── register2.html └── users ├── __init__.py ├── admin.py ├── apps.py ├── backends.py ├── forms.py ├── migrations ├── 0001_initial.py ├── 0002_auto_20180409_1236.py ├── 0003_user_signature.py └── __init__.py ├── models.py ├── tests.py ├── urls.py └── views.py /.idea/School_BBS.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | 31 | -------------------------------------------------------------------------------- /.idea/dataSources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | sqlite.xerial 6 | true 7 | true 8 | SQLite 9 | org.sqlite.JDBC 10 | jdbc:sqlite:D:\BBS\School_BBS\db.sqlite3 11 | 12 | 13 | 14 | 15 | 16 | file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.16.1/sqlite-jdbc-3.16.1.jar 17 | 18 | 19 | file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.16.1/xerial-sqlite-license.txt 20 | 21 | 22 | file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.16.1/sqlite-jdbc-3.16.1.jar 23 | 24 | 25 | file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.16.1/xerial-sqlite-license.txt 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /.idea/dataSources/1e557acd-5d06-4623-b0bf-2ed13cb35d2c/storage_v2/_src_/schema/main.uQUzAA.meta: -------------------------------------------------------------------------------- 1 | #n:main 2 | ! [0, 0, null, null, -2147483648, -2147483648] 3 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DjangoUeditor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/__init__.py -------------------------------------------------------------------------------- /DjangoUeditor/adminx.py: -------------------------------------------------------------------------------- 1 | #coding:utf-8 2 | #__author__ = 'sai' 3 | #DjangoUeditor Xadmin plugin 4 | 5 | import xadmin 6 | from django.db.models import TextField 7 | from xadmin.views import BaseAdminPlugin, ModelFormAdminView, DetailAdminView 8 | from DjangoUeditor.models import UEditorField 9 | from DjangoUeditor.widgets import UEditorWidget 10 | from django.conf import settings 11 | 12 | class XadminUEditorWidget(UEditorWidget): 13 | def __init__(self,**kwargs): 14 | self.ueditor_settings=kwargs 15 | self.Media.js = None 16 | super(XadminUEditorWidget, self).__init__(kwargs) 17 | 18 | class UeditorPlugin(BaseAdminPlugin): 19 | 20 | def get_field_style(self, attrs, db_field, style, **kwargs): 21 | if style == 'ueditor': 22 | if isinstance(db_field, UEditorField): 23 | return {'widget': XadminUEditorWidget(**db_field.formfield().widget.attrs)} 24 | if isinstance(db_field, TextField): 25 | return {'widget': XadminUEditorWidget} 26 | return attrs 27 | 28 | def block_extrahead(self, context, nodes): 29 | js = '' % (settings.STATIC_URL + "ueditor/ueditor.config.js") 30 | js += '' % (settings.STATIC_URL + "ueditor/ueditor.all.min.js") 31 | nodes.append(js) 32 | 33 | xadmin.site.register_plugin(UeditorPlugin, DetailAdminView) 34 | xadmin.site.register_plugin(UeditorPlugin, ModelFormAdminView) 35 | -------------------------------------------------------------------------------- /DjangoUeditor/forms.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django import forms 3 | from widgets import UEditorWidget 4 | from DjangoUeditor.models import UEditorField as ModelUEditorField 5 | 6 | 7 | class UEditorField(forms.CharField): 8 | def __init__(self, label, width=600, height=300, toolbars="full", 9 | imagePath="", filePath="", upload_settings={}, 10 | settings={}, command=None, event_handler=None, *args, 11 | **kwargs): 12 | uSettings = locals().copy() 13 | del uSettings["self"], uSettings[ 14 | "label"], uSettings["args"], uSettings["kwargs"] 15 | kwargs["widget"] = UEditorWidget(attrs=uSettings) 16 | kwargs["label"] = label 17 | super(UEditorField, self).__init__(*args, **kwargs) 18 | 19 | 20 | def UpdateUploadPath(model_form, model_inst=None): 21 | """ 遍历model字段,如果是UEditorField则需要重新计算路径 """ 22 | if model_inst is not None: 23 | try: 24 | for field in model_inst._meta.fields: 25 | if isinstance(field, ModelUEditorField): 26 | model_form.__getitem__( 27 | field.name).field.widget.recalc_path(model_inst) 28 | except: 29 | pass 30 | 31 | 32 | class UEditorModelForm(forms.ModelForm): 33 | 34 | def __init__(self, *args, **kwargs): 35 | super(UEditorModelForm, self).__init__(*args, **kwargs) 36 | try: 37 | if 'instance' in kwargs: 38 | UpdateUploadPath(self, kwargs["instance"]) 39 | else: 40 | UpdateUploadPath(self, None) 41 | except Exception: 42 | pass 43 | -------------------------------------------------------------------------------- /DjangoUeditor/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.db import models 3 | from django.contrib.admin import widgets as admin_widgets 4 | from .widgets import UEditorWidget, AdminUEditorWidget 5 | 6 | 7 | class UEditorField(models.TextField): 8 | """ 9 | 百度HTML编辑器字段,初始化时,可以提供以下参数 10 | initial:初始内容 11 | toolbars:提供工具按钮列表,取值为列表,如['bold', 'italic'],取值为:mini,normal,full,代表小,一般,全部 12 | imagePath:图片上传的路径,如"images/",实现上传到"{{MEDIA_ROOT}}/images"文件夹 13 | filePath:附件上传的路径,如"files/",实现上传到"{{MEDIA_ROOT}}/files"文件夹 14 | """ 15 | 16 | def __init__(self, verbose_name=None, width=600, height=300, 17 | toolbars="full", imagePath="", filePath="", 18 | upload_settings={}, settings={}, command=None, 19 | event_handler=None, **kwargs): 20 | self.ueditor_settings = locals().copy() 21 | kwargs["verbose_name"] = verbose_name 22 | del self.ueditor_settings["self"], self.ueditor_settings[ 23 | "kwargs"], self.ueditor_settings["verbose_name"] 24 | super(UEditorField, self).__init__(**kwargs) 25 | 26 | def formfield(self, **kwargs): 27 | defaults = {'widget': UEditorWidget(attrs=self.ueditor_settings)} 28 | defaults.update(kwargs) 29 | if defaults['widget'] == admin_widgets.AdminTextareaWidget: 30 | defaults['widget'] = AdminUEditorWidget( 31 | attrs=self.ueditor_settings) 32 | return super(UEditorField, self).formfield(**defaults) 33 | 34 | 35 | # 以下支持south 36 | try: 37 | from south.modelsinspector import add_introspection_rules 38 | add_introspection_rules([], ["^DjangoUeditor\.models\.UEditorField"]) 39 | except: 40 | pass 41 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/UEditorSnapscreen.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/UEditorSnapscreen.exe -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/addCustomizeButton.js: -------------------------------------------------------------------------------- 1 | UE.registerUI('button',function(editor,uiName){ 2 | //注册按钮执行时的command命令,使用命令默认就会带有回退操作 3 | editor.registerCommand(uiName,{ 4 | execCommand:function(){ 5 | alert('execCommand:' + uiName) 6 | } 7 | }); 8 | 9 | //创建一个button 10 | var btn = new UE.ui.Button({ 11 | //按钮的名字 12 | name:uiName, 13 | //提示 14 | title:uiName, 15 | //需要添加的额外样式,指定icon图标,这里默认使用一个重复的icon 16 | cssRules :'background-position: -500px 0;', 17 | //点击时执行的命令 18 | onclick:function () { 19 | //这里可以不用执行命令,做你自己的操作也可 20 | editor.execCommand(uiName); 21 | } 22 | }); 23 | 24 | //当点到编辑内容上时,按钮要做的状态反射 25 | editor.addListener('selectionchange', function () { 26 | var state = editor.queryCommandState(uiName); 27 | if (state == -1) { 28 | btn.setDisabled(true); 29 | btn.setChecked(false); 30 | } else { 31 | btn.setDisabled(false); 32 | btn.setChecked(state); 33 | } 34 | }); 35 | 36 | //因为你是添加button,所以需要返回这个button 37 | return btn; 38 | }/*index 指定添加到工具栏上的那个位置,默认时追加到最后,editorId 指定这个UI是那个编辑器实例上的,默认是页面上所有的编辑器都会添加这个按钮*/); -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/addCustomizeCombox.js: -------------------------------------------------------------------------------- 1 | UE.registerUI('combox',function(editor,uiName){ 2 | //注册按钮执行时的command命令,用uiName作为command名字,使用命令默认就会带有回退操作 3 | editor.registerCommand(uiName,{ 4 | execCommand:function(cmdName,value){ 5 | //这里借用fontsize的命令 6 | this.execCommand('fontsize',value + 'px') 7 | }, 8 | queryCommandValue:function(){ 9 | //这里借用fontsize的查询命令 10 | return this.queryCommandValue('fontsize') 11 | } 12 | }); 13 | 14 | 15 | //创建下拉菜单中的键值对,这里我用字体大小作为例子 16 | var items = []; 17 | for(var i= 0,ci;ci=[10, 11, 12, 14, 16, 18, 20, 24, 36][i++];){ 18 | items.push({ 19 | //显示的条目 20 | label:'字体:' + ci + 'px', 21 | //选中条目后的返回值 22 | value:ci, 23 | //针对每个条目进行特殊的渲染 24 | renderLabelHtml:function () { 25 | //这个是希望每个条目的字体是不同的 26 | return '
' + (this.label || '') + '
'; 28 | } 29 | }); 30 | } 31 | //创建下来框 32 | var combox = new UE.ui.Combox({ 33 | //需要指定当前的编辑器实例 34 | editor:editor, 35 | //添加条目 36 | items:items, 37 | //当选中时要做的事情 38 | onselect:function (t, index) { 39 | //拿到选中条目的值 40 | editor.execCommand(uiName, this.items[index].value); 41 | }, 42 | //提示 43 | title:uiName, 44 | //当编辑器没有焦点时,combox默认显示的内容 45 | initValue:uiName 46 | }); 47 | 48 | editor.addListener('selectionchange', function (type, causeByUi, uiReady) { 49 | if (!uiReady) { 50 | var state = editor.queryCommandState(uiName); 51 | if (state == -1) { 52 | combox.setDisabled(true); 53 | } else { 54 | combox.setDisabled(false); 55 | var value = editor.queryCommandValue(uiName); 56 | if(!value){ 57 | combox.setValue(uiName); 58 | return; 59 | } 60 | //ie下从源码模式切换回来时,字体会带单引号,而且会有逗号 61 | value && (value = value.replace(/['"]/g, '').split(',')[0]); 62 | combox.setValue(value); 63 | 64 | } 65 | } 66 | 67 | }); 68 | return combox; 69 | },2/*index 指定添加到工具栏上的那个位置,默认时追加到最后,editorId 指定这个UI是那个编辑器实例上的,默认是页面上所有的编辑器都会添加这个按钮*/); -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/addCustomizeDialog.js: -------------------------------------------------------------------------------- 1 | UE.registerUI('dialog',function(editor,uiName){ 2 | 3 | //创建dialog 4 | var dialog = new UE.ui.Dialog({ 5 | //指定弹出层中页面的路径,这里只能支持页面,因为跟addCustomizeDialog.js相同目录,所以无需加路径 6 | iframeUrl:'customizeDialogPage.html', 7 | //需要指定当前的编辑器实例 8 | editor:editor, 9 | //指定dialog的名字 10 | name:uiName, 11 | //dialog的标题 12 | title:"这是个测试浮层", 13 | 14 | //指定dialog的外围样式 15 | cssRules:"width:600px;height:300px;", 16 | 17 | //如果给出了buttons就代表dialog有确定和取消 18 | buttons:[ 19 | { 20 | className:'edui-okbutton', 21 | label:'确定', 22 | onclick:function () { 23 | dialog.close(true); 24 | } 25 | }, 26 | { 27 | className:'edui-cancelbutton', 28 | label:'取消', 29 | onclick:function () { 30 | dialog.close(false); 31 | } 32 | } 33 | ]}); 34 | 35 | //参考addCustomizeButton.js 36 | var btn = new UE.ui.Button({ 37 | name:'dialogbutton' + uiName, 38 | title:'dialogbutton' + uiName, 39 | //需要添加的额外样式,指定icon图标,这里默认使用一个重复的icon 40 | cssRules :'background-position: -500px 0;', 41 | onclick:function () { 42 | //渲染dialog 43 | dialog.render(); 44 | dialog.open(); 45 | } 46 | }); 47 | 48 | return btn; 49 | }/*index 指定添加到工具栏上的那个位置,默认时追加到最后,editorId 指定这个UI是那个编辑器实例上的,默认是页面上所有的编辑器都会添加这个按钮*/); -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/charts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 图表demo 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 |
20 | 57 |
58 | 70 | 71 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/customPluginDemo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |

UEditor自定义插件

12 | 13 | 14 | 18 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/customizeDialogPage.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |

测试页面

11 |
12 | 13 | 14 | 15 | 24 | 25 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/customizeToolbarUIDemo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 完整demo 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 26 | 27 | 28 |
29 |

二次开发demo

30 | 31 |
32 | 33 | 43 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/highlightDemo.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

代码高亮演示

16 |

获得编辑器实例

17 |
18 |
19 |         UE.getEditor('myEditor');
20 |     
21 |
22 | 23 | 24 | 30 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/jqueryCompleteDemo.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 使用jquery的完整demo 6 | 7 | 8 | 9 | 10 | 34 | 35 | 36 |
37 | 40 | 41 |
42 | 43 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/jqueryValidation.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | Ueditor在jquery validation下的验证 7 | 8 | 9 | 10 | 11 | 12 | 43 | 44 | 45 | 46 | 47 | 48 |
49 |

Ueditor在jquery validation下的验证

50 | 51 | 52 | 53 | 54 |
55 | 56 | 57 | 58 | 59 |
60 | 61 |
62 | 63 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/multiDemo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |

UEditor多实例

11 | 12 | 13 | 15 | 18 | 20 | 21 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/multiEditorWithOneInstance.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | 14 | 15 |

UEditor多编辑区域一个编辑器实例

16 | 17 | 18 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | 30 | 33 | 34 | 35 |
19 | 编辑区域一 20 |
25 | 编辑区域二 26 | 内容2
31 | 编辑区域三 32 | 内容3
36 | 37 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/renderInTable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 表格内实例化编辑器实例 8 | 9 | 10 | 11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
表格标题
标题内容
中国
21 |
22 | 25 | 26 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/resetDemo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 重置编辑器 7 | 8 | 9 | 16 | 17 | 18 |

重置编辑器和销毁编辑器示例

19 |
20 |

21 |

22 | 51 | 52 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/server/getContent.ashx: -------------------------------------------------------------------------------- 1 | <%@ WebHandler Language="C#" Class="getContent" %> 2 | /** 3 | * Created by visual studio 2010 4 | * User: xuheng 5 | * Date: 12-3-6 6 | * Time: 下午21:23 7 | * To get the value of editor and output the value . 8 | */ 9 | using System; 10 | using System.Web; 11 | 12 | public class getContent : IHttpHandler { 13 | 14 | public void ProcessRequest (HttpContext context) { 15 | context.Response.ContentType = "text/html"; 16 | 17 | //获取数据 18 | string content = context.Server.HtmlEncode(context.Request.Form["myEditor"]); 19 | 20 | 21 | //存入数据库或者其他操作 22 | //------------- 23 | 24 | //显示 25 | context.Response.Write(""); 26 | context.Response.Write( 27 | 28 | ""); 32 | 33 | context.Response.Write("Content of First Editor: "); 34 | context.Response.Write("
" + context.Server.HtmlDecode(content) + "
"); 35 | 36 | } 37 | 38 | public bool IsReusable { 39 | get { 40 | return false; 41 | } 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/server/getContent.asp: -------------------------------------------------------------------------------- 1 | <% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %> 2 | 3 | 4 | 10 | <% 11 | Dim content 12 | content = Request.Form("myEditor") 13 | Response.Write("第1个编辑器的值") 14 | Response.Write("
" + content + "
") 15 | %> -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/server/getContent.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> 2 | 3 | 4 | 9 | <% 10 | request.setCharacterEncoding("utf-8"); 11 | response.setCharacterEncoding("utf-8"); 12 | String content = request.getParameter("myEditor"); 13 | 14 | 15 | 16 | response.getWriter().print("第1个编辑器的值"); 17 | response.getWriter().print("
"+content+"
"); 18 | 19 | %> -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/server/getContent.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | ".htmlspecialchars_decode($content).""; 20 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/setWidthHeightDemo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

UEditor设置宽高demo

15 |

这里的宽高都只是编辑区域的宽高,不包括工具栏的高度和状态栏的高度

16 |

容器给定编辑器的宽高

17 | 18 | 19 | 20 |
21 |

初始化时给定编辑器的宽高

22 | 23 | 24 |

没有工具栏的编辑器

25 |
26 | 27 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/simpleDemo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |

UEditor简单功能

12 | 13 | 14 | 17 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/submitFormDemo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 |

UEditor提交示例

17 |
18 | 21 | 22 |
23 |

24 | 从1.2.6开始,会自动同步数据无需再手动调用sync方法 25 | 26 | 27 |

28 | 29 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/_examples/textareaDemo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 16 | 17 | 18 |

文本域渲染编辑器

19 | 20 | 21 | 22 |
23 | 24 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/anchor/anchor.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 13 | 14 | 15 |
16 | 17 |
18 | 19 | 39 | 40 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/attachment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ueditor图片对话框 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 | 0% 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 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_default.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/images/alignicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/images/alignicon.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/images/alignicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/images/alignicon.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/images/bg.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/images/file-icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/images/file-icons.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/images/file-icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/images/file-icons.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/images/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/images/icons.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/images/icons.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/images/image.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/images/progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/images/progress.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/images/success.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/images/success.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/attachment/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/attachment/images/success.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/background/background.css: -------------------------------------------------------------------------------- 1 | .wrapper{ width: 424px;margin: 10px auto; zoom:1;position: relative} 2 | .tabbody{height:225px;} 3 | .tabbody .panel { position: absolute;width:100%; height:100%;background: #fff; display: none;} 4 | .tabbody .focus { display: block;} 5 | 6 | body{font-size: 12px;color: #888;overflow: hidden;} 7 | input,label{vertical-align:middle} 8 | .clear{clear: both;} 9 | .pl{padding-left: 18px;padding-left: 23px\9;} 10 | 11 | #imageList {width: 420px;height: 215px;margin-top: 10px;overflow: hidden;overflow-y: auto;} 12 | #imageList div {float: left;width: 100px;height: 95px;margin: 5px 10px;} 13 | #imageList img {cursor: pointer;border: 2px solid white;} 14 | 15 | .bgarea{margin: 10px;padding: 5px;height: 84%;border: 1px solid #A8A297;} 16 | .content div{margin: 10px 0 10px 5px;} 17 | .content .iptradio{margin: 0px 5px 5px 0px;} 18 | .txt{width:280px;} 19 | 20 | .wrapcolor{height: 19px;} 21 | div.color{float: left;margin: 0;} 22 | #colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;margin: 0;float: left;} 23 | div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;} 24 | #custom input{height: 15px;min-height: 15px;width:20px;} 25 | #repeatType{width:100px;} 26 | 27 | 28 | /* 图片管理样式 */ 29 | #imgManager { 30 | width: 100%; 31 | height: 225px; 32 | } 33 | #imgManager #imageList{ 34 | width: 100%; 35 | overflow-x: hidden; 36 | overflow-y: auto; 37 | } 38 | #imgManager ul { 39 | display: block; 40 | list-style: none; 41 | margin: 0; 42 | padding: 0; 43 | } 44 | #imgManager li { 45 | float: left; 46 | display: block; 47 | list-style: none; 48 | padding: 0; 49 | width: 113px; 50 | height: 113px; 51 | margin: 9px 0 0 19px; 52 | background-color: #eee; 53 | overflow: hidden; 54 | cursor: pointer; 55 | position: relative; 56 | } 57 | #imgManager li.clearFloat { 58 | float: none; 59 | clear: both; 60 | display: block; 61 | width:0; 62 | height:0; 63 | margin: 0; 64 | padding: 0; 65 | } 66 | #imgManager li img { 67 | cursor: pointer; 68 | } 69 | #imgManager li .icon { 70 | cursor: pointer; 71 | width: 113px; 72 | height: 113px; 73 | position: absolute; 74 | top: 0; 75 | left: 0; 76 | z-index: 2; 77 | border: 0; 78 | background-repeat: no-repeat; 79 | } 80 | #imgManager li .icon:hover { 81 | width: 107px; 82 | height: 107px; 83 | border: 3px solid #1094fa; 84 | } 85 | #imgManager li.selected .icon { 86 | background-image: url(images/success.png); 87 | background-position: 75px 75px; 88 | } 89 | #imgManager li.selected .icon:hover { 90 | width: 107px; 91 | height: 107px; 92 | border: 3px solid #1094fa; 93 | background-position: 72px 72px; 94 | } -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/background/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/background/images/bg.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/background/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/background/images/success.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/charts/chart.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 图表配置文件 3 | * */ 4 | 5 | 6 | //不同类型的配置 7 | var typeConfig = [ 8 | { 9 | chart: { 10 | type: 'line' 11 | }, 12 | plotOptions: { 13 | line: { 14 | dataLabels: { 15 | enabled: false 16 | }, 17 | enableMouseTracking: true 18 | } 19 | } 20 | }, { 21 | chart: { 22 | type: 'line' 23 | }, 24 | plotOptions: { 25 | line: { 26 | dataLabels: { 27 | enabled: true 28 | }, 29 | enableMouseTracking: false 30 | } 31 | } 32 | }, { 33 | chart: { 34 | type: 'area' 35 | } 36 | }, { 37 | chart: { 38 | type: 'bar' 39 | } 40 | }, { 41 | chart: { 42 | type: 'column' 43 | } 44 | }, { 45 | chart: { 46 | plotBackgroundColor: null, 47 | plotBorderWidth: null, 48 | plotShadow: false 49 | }, 50 | plotOptions: { 51 | pie: { 52 | allowPointSelect: true, 53 | cursor: 'pointer', 54 | dataLabels: { 55 | enabled: true, 56 | color: '#000000', 57 | connectorColor: '#000000', 58 | formatter: function() { 59 | return ''+ this.point.name +': '+ ( Math.round( this.point.percentage*100 ) / 100 ) +' %'; 60 | } 61 | } 62 | } 63 | } 64 | } 65 | ]; 66 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/charts/images/charts0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/charts/images/charts0.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/charts/images/charts1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/charts/images/charts1.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/charts/images/charts2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/charts/images/charts2.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/charts/images/charts3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/charts/images/charts3.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/charts/images/charts4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/charts/images/charts4.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/charts/images/charts5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/charts/images/charts5.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/emotion/emotion.css: -------------------------------------------------------------------------------- 1 | .jd img{ 2 | background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top; 3 | cursor:pointer;width:35px;height:35px;display:block; 4 | } 5 | .pp img{ 6 | background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top; 7 | cursor:pointer;width:25px;height:25px;display:block; 8 | } 9 | .ldw img{ 10 | background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top; 11 | cursor:pointer;width:35px;height:35px;display:block; 12 | } 13 | .tsj img{ 14 | background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top; 15 | cursor:pointer;width:35px;height:35px;display:block; 16 | } 17 | .cat img{ 18 | background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top; 19 | cursor:pointer;width:35px;height:35px;display:block; 20 | } 21 | .bb img{ 22 | background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top; 23 | cursor:pointer;width:35px;height:35px;display:block; 24 | } 25 | .youa img{ 26 | background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top; 27 | cursor:pointer;width:35px;height:35px;display:block; 28 | } 29 | 30 | .smileytable td {height: 37px;} 31 | #tabPanel{margin-left:5px;overflow: hidden;} 32 | #tabContent {float:left;background:#FFFFFF;} 33 | #tabContent div{display: none;width:480px;overflow:hidden;} 34 | #tabIconReview.show{left:17px;display:block;} 35 | .menuFocus{background:#ACCD3C;} 36 | .menuDefault{background:#FFFFFF;} 37 | #tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px;} 38 | img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFFFFF;background-position:center;background-repeat:no-repeat;} 39 | 40 | .wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width: 95%;} 41 | .tabbody table{width: 100%;} 42 | .tabbody td{border:1px solid #BAC498;} 43 | .tabbody td span{display: block;zoom:1;padding:0 4px;} -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/emotion/images/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/emotion/images/0.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/emotion/images/bface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/emotion/images/bface.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/emotion/images/cface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/emotion/images/cface.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/emotion/images/fface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/emotion/images/fface.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/emotion/images/jxface2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/emotion/images/jxface2.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/emotion/images/neweditor-tab-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/emotion/images/neweditor-tab-bg.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/emotion/images/tface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/emotion/images/tface.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/emotion/images/wface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/emotion/images/wface.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/emotion/images/yface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/emotion/images/yface.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/help/help.css: -------------------------------------------------------------------------------- 1 | .wrapper{width: 370px;margin: 10px auto;zoom: 1;} 2 | .tabbody{height: 360px;} 3 | .tabbody .panel{width:100%;height: 360px;position: absolute;background: #fff;} 4 | .tabbody .panel h1{font-size:26px;margin: 5px 0 0 5px;} 5 | .tabbody .panel p{font-size:12px;margin: 5px 0 0 5px;} 6 | .tabbody table{width:90%;line-height: 20px;margin: 5px 0 0 5px;;} 7 | .tabbody table thead{font-weight: bold;line-height: 25px;} -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/help/help.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains PhpStorm. 3 | * User: xuheng 4 | * Date: 12-9-26 5 | * Time: 下午1:06 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | /** 9 | * tab点击处理事件 10 | * @param tabHeads 11 | * @param tabBodys 12 | * @param obj 13 | */ 14 | function clickHandler( tabHeads,tabBodys,obj ) { 15 | //head样式更改 16 | for ( var k = 0, len = tabHeads.length; k < len; k++ ) { 17 | tabHeads[k].className = ""; 18 | } 19 | obj.className = "focus"; 20 | //body显隐 21 | var tabSrc = obj.getAttribute( "tabSrc" ); 22 | for ( var j = 0, length = tabBodys.length; j < length; j++ ) { 23 | var body = tabBodys[j], 24 | id = body.getAttribute( "id" ); 25 | body.onclick = function(){ 26 | this.style.zoom = 1; 27 | }; 28 | if ( id != tabSrc ) { 29 | body.style.zIndex = 1; 30 | } else { 31 | body.style.zIndex = 200; 32 | } 33 | } 34 | 35 | } 36 | 37 | /** 38 | * TAB切换 39 | * @param tabParentId tab的父节点ID或者对象本身 40 | */ 41 | function switchTab( tabParentId ) { 42 | var tabElements = $G( tabParentId ).children, 43 | tabHeads = tabElements[0].children, 44 | tabBodys = tabElements[1].children; 45 | 46 | for ( var i = 0, length = tabHeads.length; i < length; i++ ) { 47 | var head = tabHeads[i]; 48 | if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head ); 49 | head.onclick = function () { 50 | clickHandler(tabHeads,tabBodys,this); 51 | } 52 | } 53 | } 54 | switchTab("helptab"); 55 | 56 | document.getElementById('version').innerHTML = parent.UE.version; -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/image/images/alignicon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/image/images/alignicon.jpg -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/image/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/image/images/bg.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/image/images/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/image/images/icons.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/image/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/image/images/icons.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/image/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/image/images/image.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/image/images/progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/image/images/progress.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/image/images/success.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/image/images/success.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/image/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/image/images/success.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/internal.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var parent = window.parent; 3 | //dialog对象 4 | dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )]; 5 | //当前打开dialog的编辑器实例 6 | editor = dialog.editor; 7 | 8 | UE = parent.UE; 9 | 10 | domUtils = UE.dom.domUtils; 11 | 12 | utils = UE.utils; 13 | 14 | browser = UE.browser; 15 | 16 | ajax = UE.ajax; 17 | 18 | $G = function ( id ) { 19 | return document.getElementById( id ) 20 | }; 21 | //focus元素 22 | $focus = function ( node ) { 23 | setTimeout( function () { 24 | if ( browser.ie ) { 25 | var r = node.createTextRange(); 26 | r.collapse( false ); 27 | r.select(); 28 | } else { 29 | node.focus() 30 | } 31 | }, 0 ) 32 | }; 33 | utils.loadFile(document,{ 34 | href:editor.options.themePath + editor.options.theme + "/dialogbase.css?cache="+Math.random(), 35 | tag:"link", 36 | type:"text/css", 37 | rel:"stylesheet" 38 | }); 39 | lang = editor.getLang(dialog.className.split( "-" )[2]); 40 | if(lang){ 41 | domUtils.on(window,'load',function () { 42 | 43 | var langImgPath = editor.options.langPath + editor.options.lang + "/images/"; 44 | //针对静态资源 45 | for ( var i in lang["static"] ) { 46 | var dom = $G( i ); 47 | if(!dom) continue; 48 | var tagName = dom.tagName, 49 | content = lang["static"][i]; 50 | if(content.src){ 51 | //clone 52 | content = utils.extend({},content,false); 53 | content.src = langImgPath + content.src; 54 | } 55 | if(content.style){ 56 | content = utils.extend({},content,false); 57 | content.style = content.style.replace(/url\s*\(/g,"url(" + langImgPath) 58 | } 59 | switch ( tagName.toLowerCase() ) { 60 | case "var": 61 | dom.parentNode.replaceChild( document.createTextNode( content ), dom ); 62 | break; 63 | case "select": 64 | var ops = dom.options; 65 | for ( var j = 0, oj; oj = ops[j]; ) { 66 | oj.innerHTML = content.options[j++]; 67 | } 68 | for ( var p in content ) { 69 | p != "options" && dom.setAttribute( p, content[p] ); 70 | } 71 | break; 72 | default : 73 | domUtils.setAttributes( dom, content); 74 | } 75 | } 76 | } ); 77 | } 78 | 79 | 80 | })(); 81 | 82 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/music/music.css: -------------------------------------------------------------------------------- 1 | .wrapper{margin: 5px 10px;} 2 | 3 | .searchBar{height:30px;padding:7px 0 3px;text-align:center;} 4 | .searchBtn{font-size:13px;height:24px;} 5 | 6 | .resultBar{width:460px;margin:5px auto;border: 1px solid #CCC;border-radius: 5px;box-shadow: 2px 2px 5px #D3D6DA;overflow: hidden;} 7 | 8 | .listPanel{overflow: hidden;} 9 | .panelon{display:block;} 10 | .paneloff{display:none} 11 | 12 | .page{width:220px;margin:20px auto;overflow: hidden;} 13 | .pageon{float:right;width:24px;line-height:24px;height:24px;margin-right: 5px;background: none;border: none;color: #000;font-weight: bold;text-align:center} 14 | .pageoff{float:right;width:24px;line-height:24px;height:24px;cursor:pointer;background-color: #fff; 15 | border: 1px solid #E7ECF0;color: #2D64B3;margin-right: 5px;text-decoration: none;text-align:center;} 16 | 17 | .m-box{width:460px;} 18 | .m-m{float: left;line-height: 20px;height: 20px;} 19 | .m-h{height:24px;line-height:24px;padding-left: 46px;background-color:#FAFAFA;border-bottom: 1px solid #DAD8D8;font-weight: bold;font-size: 12px;color: #333;} 20 | .m-l{float:left;width:40px; } 21 | .m-t{float:left;width:140px;} 22 | .m-s{float:left;width:110px;} 23 | .m-z{float:left;width:100px;} 24 | .m-try-t{float: left;width: 60px;;} 25 | 26 | .m-try{float:left;width:20px;height:20px;background:url('http://static.tieba.baidu.com/tb/editor/images/try_music.gif') no-repeat ;} 27 | .m-trying{float:left;width:20px;height:20px;background:url('http://static.tieba.baidu.com/tb/editor/images/stop_music.gif') no-repeat ;} 28 | 29 | .loading{width:95px;height:7px;font-size:7px;margin:60px auto;background:url(http://static.tieba.baidu.com/tb/editor/images/loading.gif) no-repeat} 30 | .empty{width:300px;height:40px;padding:2px;margin:50px auto;line-height:40px; color:#006699;text-align:center;} -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/music/music.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 插入音乐 6 | 7 | 8 | 9 | 10 |
11 | 15 |
16 | 17 |
18 |
19 |
20 |
21 | 22 | 31 | 32 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/preview/preview.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 |
29 | 30 | 40 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/addimg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/addimg.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/brush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/brush.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/delimg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/delimg.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/delimgH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/delimgH.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/empty.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/emptyH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/emptyH.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/eraser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/eraser.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/redo.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/redoH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/redoH.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/scale.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/scaleH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/scaleH.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/size.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/undo.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/scrawl/images/undoH.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/scrawl/images/undoH.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/snapscreen/snapscreen.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 47 | 48 | 49 |
50 |

51 |
52 |
53 |
54 |
55 |
56 |
57 | 58 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/spechars/spechars.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 14 | 15 | 16 |
17 |
18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/table/dragicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/table/dragicon.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/table/edittable.css: -------------------------------------------------------------------------------- 1 | body{ 2 | overflow: hidden; 3 | width: 540px; 4 | } 5 | .wrapper { 6 | margin: 10px auto 0; 7 | font-size: 12px; 8 | overflow: hidden; 9 | width: 520px; 10 | height: 315px; 11 | } 12 | 13 | .clear { 14 | clear: both; 15 | } 16 | 17 | .wrapper .left { 18 | float: left; 19 | margin-left: 10px;; 20 | } 21 | 22 | .wrapper .right { 23 | float: right; 24 | border-left: 2px dotted #EDEDED; 25 | padding-left: 15px; 26 | } 27 | 28 | .section { 29 | margin-bottom: 15px; 30 | width: 240px; 31 | overflow: hidden; 32 | } 33 | 34 | .section h3 { 35 | font-weight: bold; 36 | padding: 5px 0; 37 | margin-bottom: 10px; 38 | border-bottom: 1px solid #EDEDED; 39 | font-size: 12px; 40 | } 41 | 42 | .section ul { 43 | list-style: none; 44 | overflow: hidden; 45 | clear: both; 46 | 47 | } 48 | 49 | .section li { 50 | float: left; 51 | width: 120px;; 52 | } 53 | 54 | .section .tone { 55 | width: 80px;; 56 | } 57 | 58 | .section .preview { 59 | width: 220px; 60 | } 61 | 62 | .section .preview table { 63 | text-align: center; 64 | vertical-align: middle; 65 | color: #666; 66 | } 67 | 68 | .section .preview caption { 69 | font-weight: bold; 70 | } 71 | 72 | .section .preview td { 73 | border-width: 1px; 74 | border-style: solid; 75 | height: 22px; 76 | } 77 | 78 | .section .preview th { 79 | border-style: solid; 80 | border-color: #DDD; 81 | border-width: 2px 1px 1px 1px; 82 | height: 22px; 83 | background-color: #F7F7F7; 84 | } -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/table/edittable.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 |

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 |
62 | 63 | 64 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/table/edittd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 |
19 | 20 | 21 |
22 | 60 | 61 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/table/edittip.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 表格删除提示 5 | 6 | 17 | 18 | 19 |
20 |
21 | 22 |
23 |
24 | 25 |
26 |
27 | 32 | 33 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/template/images/bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/template/images/bg.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/template/images/pre0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/template/images/pre0.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/template/images/pre1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/template/images/pre1.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/template/images/pre2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/template/images/pre2.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/template/images/pre3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/template/images/pre3.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/template/images/pre4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/template/images/pre4.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/template/template.css: -------------------------------------------------------------------------------- 1 | .wrap{ padding: 5px;font-size: 14px;} 2 | .left{width:425px;float: left;} 3 | .right{width:160px;border: 1px solid #ccc;float: right;padding: 5px;margin-right: 5px;} 4 | .right .pre{height: 332px;overflow-y: auto;} 5 | .right .preitem{border: white 1px solid;margin: 5px 0;padding: 2px 0;} 6 | .right .preitem:hover{background-color: lemonChiffon;cursor: pointer;border: #ccc 1px solid;} 7 | .right .preitem img{display: block;margin: 0 auto;width:100px;} 8 | .clear{clear: both;} 9 | .top{height:26px;line-height: 26px;padding: 5px;} 10 | .bottom{height:320px;width:100%;margin: 0 auto;} 11 | .transparent{ background: url("images/bg.gif") repeat;} 12 | .bottom table tr td{border:1px dashed #ccc;} 13 | #colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;} 14 | .border_style1{padding:2px;border: 1px solid #ccc;border-radius: 5px;box-shadow:2px 2px 5px #d3d6da;} 15 | p{margin: 5px 0} 16 | table{clear:both;margin-bottom:10px;border-collapse:collapse;word-break:break-all;} 17 | li{clear:both} 18 | ol{padding-left:40px; } -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/template/template.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 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/template/template.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains PhpStorm. 3 | * User: xuheng 4 | * Date: 12-8-8 5 | * Time: 下午2:09 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | (function () { 9 | var me = editor, 10 | preview = $G( "preview" ), 11 | preitem = $G( "preitem" ), 12 | tmps = templates, 13 | currentTmp; 14 | var initPre = function () { 15 | var str = ""; 16 | for ( var i = 0, tmp; tmp = tmps[i++]; ) { 17 | str += '
'; 18 | } 19 | preitem.innerHTML = str; 20 | }; 21 | var pre = function ( n ) { 22 | var tmp = tmps[n - 1]; 23 | currentTmp = tmp; 24 | clearItem(); 25 | domUtils.setStyles( preitem.childNodes[n - 1], { 26 | "background-color":"lemonChiffon", 27 | "border":"#ccc 1px solid" 28 | } ); 29 | preview.innerHTML = tmp.preHtml ? tmp.preHtml : ""; 30 | }; 31 | var clearItem = function () { 32 | var items = preitem.children; 33 | for ( var i = 0, item; item = items[i++]; ) { 34 | domUtils.setStyles( item, { 35 | "background-color":"", 36 | "border":"white 1px solid" 37 | } ); 38 | } 39 | }; 40 | dialog.onok = function () { 41 | if ( !$G( "issave" ).checked ){ 42 | me.execCommand( "cleardoc" ); 43 | } 44 | var obj = { 45 | html:currentTmp && currentTmp.html 46 | }; 47 | me.execCommand( "template", obj ); 48 | }; 49 | initPre(); 50 | window.pre = pre; 51 | pre(2) 52 | 53 | })(); -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/bg.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/center_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/center_focus.jpg -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/file-icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/file-icons.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/file-icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/file-icons.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/icons.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/icons.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/image.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/left_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/left_focus.jpg -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/none_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/none_focus.jpg -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/progress.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/right_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/right_focus.jpg -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/success.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/success.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/video/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/video/images/success.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/webapp/webapp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 |
15 |
16 |
17 | 52 | 53 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/wordimage/fClipboard_ueditor.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/wordimage/fClipboard_ueditor.swf -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/dialogs/wordimage/imageUploader.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/dialogs/wordimage/imageUploader.swf -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/addimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/addimage.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/alldeletebtnhoverskin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/alldeletebtnhoverskin.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/alldeletebtnupskin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/alldeletebtnupskin.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/background.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/button.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/copy.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/deletedisable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/deletedisable.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/deleteenable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/deleteenable.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/listbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/listbackground.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/localimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/localimage.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/music.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/rotateleftdisable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/rotateleftdisable.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/rotateleftenable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/rotateleftenable.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/rotaterightdisable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/rotaterightdisable.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/rotaterightenable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/rotaterightenable.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/en/images/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/en/images/upload.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/zh-cn/images/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/zh-cn/images/copy.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/zh-cn/images/localimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/zh-cn/images/localimage.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/zh-cn/images/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/zh-cn/images/music.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/lang/zh-cn/images/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/lang/zh-cn/images/upload.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/php/action_crawler.php: -------------------------------------------------------------------------------- 1 | $CONFIG['catcherPathFormat'], 14 | "maxSize" => $CONFIG['catcherMaxSize'], 15 | "allowFiles" => $CONFIG['catcherAllowFiles'], 16 | "oriName" => "remote.png" 17 | ); 18 | $fieldName = $CONFIG['catcherFieldName']; 19 | 20 | /* 抓取远程图片 */ 21 | $list = array(); 22 | if (isset($_POST[$fieldName])) { 23 | $source = $_POST[$fieldName]; 24 | } else { 25 | $source = $_GET[$fieldName]; 26 | } 27 | foreach ($source as $imgUrl) { 28 | $item = new Uploader($imgUrl, $config, "remote"); 29 | $info = $item->getFileInfo(); 30 | array_push($list, array( 31 | "state" => $info["state"], 32 | "url" => $info["url"], 33 | "size" => $info["size"], 34 | "title" => htmlspecialchars($info["title"]), 35 | "original" => htmlspecialchars($info["original"]), 36 | "source" => htmlspecialchars($imgUrl) 37 | )); 38 | } 39 | 40 | /* 返回抓取数据 */ 41 | return json_encode(array( 42 | 'state'=> count($list) ? 'SUCCESS':'ERROR', 43 | 'list'=> $list 44 | )); -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/php/action_list.php: -------------------------------------------------------------------------------- 1 | "no match file", 38 | "list" => array(), 39 | "start" => $start, 40 | "total" => count($files) 41 | )); 42 | } 43 | 44 | /* 获取指定范围的列表 */ 45 | $len = count($files); 46 | for ($i = min($end, $len) - 1, $list = array(); $i < $len && $i >= 0 && $i >= $start; $i--){ 47 | $list[] = $files[$i]; 48 | } 49 | //倒序 50 | //for ($i = $end, $list = array(); $i < $len && $i < $end; $i++){ 51 | // $list[] = $files[$i]; 52 | //} 53 | 54 | /* 返回数据 */ 55 | $result = json_encode(array( 56 | "state" => "SUCCESS", 57 | "list" => $list, 58 | "start" => $start, 59 | "total" => count($files) 60 | )); 61 | 62 | return $result; 63 | 64 | 65 | /** 66 | * 遍历获取目录下的指定类型的文件 67 | * @param $path 68 | * @param array $files 69 | * @return array 70 | */ 71 | function getfiles($path, $allowFiles, &$files = array()) 72 | { 73 | if (!is_dir($path)) return null; 74 | if(substr($path, strlen($path) - 1) != '/') $path .= '/'; 75 | $handle = opendir($path); 76 | while (false !== ($file = readdir($handle))) { 77 | if ($file != '.' && $file != '..') { 78 | $path2 = $path . $file; 79 | if (is_dir($path2)) { 80 | getfiles($path2, $allowFiles, $files); 81 | } else { 82 | if (preg_match("/\.(".$allowFiles.")$/i", $file)) { 83 | $files[] = array( 84 | 'url'=> substr($path2, strlen($_SERVER['DOCUMENT_ROOT'])), 85 | 'mtime'=> filemtime($path2) 86 | ); 87 | } 88 | } 89 | } 90 | } 91 | return $files; 92 | } -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/php/action_upload.php: -------------------------------------------------------------------------------- 1 | $CONFIG['imagePathFormat'], 16 | "maxSize" => $CONFIG['imageMaxSize'], 17 | "allowFiles" => $CONFIG['imageAllowFiles'] 18 | ); 19 | $fieldName = $CONFIG['imageFieldName']; 20 | break; 21 | case 'uploadscrawl': 22 | $config = array( 23 | "pathFormat" => $CONFIG['scrawlPathFormat'], 24 | "maxSize" => $CONFIG['scrawlMaxSize'], 25 | "allowFiles" => $CONFIG['scrawlAllowFiles'], 26 | "oriName" => "scrawl.png" 27 | ); 28 | $fieldName = $CONFIG['scrawlFieldName']; 29 | $base64 = "base64"; 30 | break; 31 | case 'uploadvideo': 32 | $config = array( 33 | "pathFormat" => $CONFIG['videoPathFormat'], 34 | "maxSize" => $CONFIG['videoMaxSize'], 35 | "allowFiles" => $CONFIG['videoAllowFiles'] 36 | ); 37 | $fieldName = $CONFIG['videoFieldName']; 38 | break; 39 | case 'uploadfile': 40 | default: 41 | $config = array( 42 | "pathFormat" => $CONFIG['filePathFormat'], 43 | "maxSize" => $CONFIG['fileMaxSize'], 44 | "allowFiles" => $CONFIG['fileAllowFiles'] 45 | ); 46 | $fieldName = $CONFIG['fileFieldName']; 47 | break; 48 | } 49 | 50 | /* 生成上传实例对象并完成上传 */ 51 | $up = new Uploader($fieldName, $config, $base64); 52 | 53 | /** 54 | * 得到上传文件所对应的各个参数,数组结构 55 | * array( 56 | * "state" => "", //上传状态,上传成功时必须返回"SUCCESS" 57 | * "url" => "", //返回的地址 58 | * "title" => "", //新文件名 59 | * "original" => "", //原始文件名 60 | * "type" => "" //文件类型 61 | * "size" => "", //文件大小 62 | * ) 63 | */ 64 | 65 | /* 返回数据 */ 66 | return json_encode($up->getFileInfo()); 67 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/php/controller.php: -------------------------------------------------------------------------------- 1 | '请求地址出错' 44 | )); 45 | break; 46 | } 47 | 48 | /* 输出结果 */ 49 | if (isset($_GET["callback"])) { 50 | if (preg_match("/^[\w_]+$/", $_GET["callback"])) { 51 | echo htmlspecialchars($_GET["callback"]) . '(' . $result . ')'; 52 | } else { 53 | echo json_encode(array( 54 | 'state'=> 'callback参数不合法' 55 | )); 56 | } 57 | } else { 58 | echo $result; 59 | } -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/dialogbase.css: -------------------------------------------------------------------------------- 1 | /*弹出对话框页面样式组件 2 | */ 3 | 4 | /*reset 5 | */ 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, font, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td { 15 | margin: 0; 16 | padding: 0; 17 | outline: 0; 18 | font-size: 100%; 19 | } 20 | 21 | body { 22 | line-height: 1; 23 | } 24 | 25 | ol, ul { 26 | list-style: none; 27 | } 28 | 29 | blockquote, q { 30 | quotes: none; 31 | } 32 | 33 | ins { 34 | text-decoration: none; 35 | } 36 | 37 | del { 38 | text-decoration: line-through; 39 | } 40 | 41 | table { 42 | border-collapse: collapse; 43 | border-spacing: 0; 44 | } 45 | 46 | /*module 47 | */ 48 | body { 49 | background-color: #fff; 50 | font: 12px/1.5 sans-serif, "宋体", "Arial Narrow", HELVETICA; 51 | color: #646464; 52 | } 53 | 54 | /*tab*/ 55 | .tabhead { 56 | position: relative; 57 | z-index: 10; 58 | } 59 | 60 | .tabhead span { 61 | display: inline-block; 62 | padding: 0 5px; 63 | height: 30px; 64 | border: 1px solid #ccc; 65 | background: url("images/dialog-title-bg.png") repeat-x; 66 | text-align: center; 67 | line-height: 30px; 68 | cursor: pointer; 69 | *margin-right: 5px; 70 | } 71 | 72 | .tabhead span.focus { 73 | height: 31px; 74 | border-bottom: none; 75 | background: #fff; 76 | } 77 | 78 | .tabbody { 79 | position: relative; 80 | top: -1px; 81 | margin: 0 auto; 82 | border: 1px solid #ccc; 83 | } 84 | 85 | /*button*/ 86 | a.button { 87 | display: block; 88 | text-align: center; 89 | line-height: 24px; 90 | text-decoration: none; 91 | height: 24px; 92 | width: 95px; 93 | border: 0; 94 | color: #838383; 95 | background: url(../../themes/default/images/icons-all.gif) no-repeat; 96 | } 97 | 98 | a.button:hover { 99 | background-position: 0 -30px; 100 | } -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/anchor.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/arrow.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/arrow_down.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/arrow_up.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/button-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/button-bg.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/cancelbutton.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/cancelbutton.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/charts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/charts.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/cursor_h.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/cursor_h.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/cursor_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/cursor_h.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/cursor_v.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/cursor_v.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/cursor_v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/cursor_v.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/dialog-title-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/dialog-title-bg.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/fileScan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/fileScan.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/highlighted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/highlighted.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/icons-all.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/icons-all.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/icons.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/icons.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/loaderror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/loaderror.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/loading.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/lock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/lock.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/neweditor-tab-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/neweditor-tab-bg.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/pagebreak.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/pagebreak.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/scale.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/sortable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/sortable.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/spacer.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/sparator_v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/sparator_v.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/table-cell-align.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/table-cell-align.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/tangram-colorpicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/tangram-colorpicker.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/toolbar_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/toolbar_bg.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/unhighlighted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/unhighlighted.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/upload.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/videologo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/videologo.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/word.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/word.gif -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/default/images/wordpaste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/themes/default/images/wordpaste.png -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/themes/iframe.css: -------------------------------------------------------------------------------- 1 | /*可以在这里添加你自己的css*/ 2 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/highcharts/adapters/mootools-adapter.js: -------------------------------------------------------------------------------- 1 | /* 2 | Highcharts JS v3.0.6 (2013-10-04) 3 | MooTools adapter 4 | 5 | (c) 2010-2013 Torstein Hønsi 6 | 7 | License: www.highcharts.com/license 8 | */ 9 | (function(){var e=window,h=document,f=e.MooTools.version.substring(0,3),i=f==="1.2"||f==="1.1",j=i||f==="1.3",g=e.$extend||function(){return Object.append.apply(Object,arguments)};e.HighchartsAdapter={init:function(a){var b=Fx.prototype,c=b.start,d=Fx.Morph.prototype,e=d.compute;b.start=function(b,d){var e=this.element;if(b.d)this.paths=a.init(e,e.d,this.toD);c.apply(this,arguments);return this};d.compute=function(b,c,d){var f=this.paths;if(f)this.element.attr("d",a.step(f[0],f[1],d,this.toD));else return e.apply(this, 10 | arguments)}},adapterRun:function(a,b){if(b==="width"||b==="height")return parseInt($(a).getStyle(b),10)},getScript:function(a,b){var c=h.getElementsByTagName("head")[0],d=h.createElement("script");d.type="text/javascript";d.src=a;d.onload=b;c.appendChild(d)},animate:function(a,b,c){var d=a.attr,f=c&&c.complete;if(d&&!a.setStyle)a.getStyle=a.attr,a.setStyle=function(){var a=arguments;this.attr.call(this,a[0],a[1][0])},a.$family=function(){return!0};e.HighchartsAdapter.stop(a);c=new Fx.Morph(d?a:$(a), 11 | g({transition:Fx.Transitions.Quad.easeInOut},c));if(d)c.element=a;if(b.d)c.toD=b.d;f&&c.addEvent("complete",f);c.start(b);a.fx=c},each:function(a,b){return i?$each(a,b):Array.each(a,b)},map:function(a,b){return a.map(b)},grep:function(a,b){return a.filter(b)},inArray:function(a,b,c){return b?b.indexOf(a,c):-1},offset:function(a){a=a.getPosition();return{left:a.x,top:a.y}},extendWithEvents:function(a){a.addEvent||(a.nodeName?$(a):g(a,new Events))},addEvent:function(a,b,c){typeof b==="string"&&(b=== 12 | "unload"&&(b="beforeunload"),e.HighchartsAdapter.extendWithEvents(a),a.addEvent(b,c))},removeEvent:function(a,b,c){typeof a!=="string"&&a.addEvent&&(b?(b==="unload"&&(b="beforeunload"),c?a.removeEvent(b,c):a.removeEvents&&a.removeEvents(b)):a.removeEvents())},fireEvent:function(a,b,c,d){b={type:b,target:a};b=j?new Event(b):new DOMEvent(b);b=g(b,c);if(!b.target&&b.event)b.target=b.event.target;b.preventDefault=function(){d=null};a.fireEvent&&a.fireEvent(b.type,b);d&&d(b)},washMouseEvent:function(a){if(a.page)a.pageX= 13 | a.page.x,a.pageY=a.page.y;return a},stop:function(a){a.fx&&a.fx.cancel()}}})(); 14 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/highcharts/modules/funnel.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Highcharts funnel module, Beta 4 | 5 | (c) 2010-2012 Torstein Hønsi 6 | 7 | License: www.highcharts.com/license 8 | */ 9 | (function(d){var u=d.getOptions().plotOptions,p=d.seriesTypes,D=d.merge,z=function(){},A=d.each;u.funnel=D(u.pie,{center:["50%","50%"],width:"90%",neckWidth:"30%",height:"100%",neckHeight:"25%",dataLabels:{connectorWidth:1,connectorColor:"#606060"},size:!0,states:{select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}}});p.funnel=d.extendClass(p.pie,{type:"funnel",animate:z,translate:function(){var a=function(k,a){return/%$/.test(k)?a*parseInt(k,10)/100:parseInt(k,10)},g=0,e=this.chart,f=e.plotWidth, 10 | e=e.plotHeight,h=0,c=this.options,C=c.center,b=a(C[0],f),d=a(C[0],e),p=a(c.width,f),i,q,j=a(c.height,e),r=a(c.neckWidth,f),s=a(c.neckHeight,e),v=j-s,a=this.data,w,x,u=c.dataLabels.position==="left"?1:0,y,m,B,n,l,t,o;this.getWidthAt=q=function(k){return k>j-s||j===s?r:r+(p-r)*((j-s-k)/(j-s))};this.getX=function(k,a){return b+(a?-1:1)*(q(k)/2+c.dataLabels.distance)};this.center=[b,d,j];this.centerX=b;A(a,function(a){g+=a.y});A(a,function(a){o=null;x=g?a.y/g:0;m=d-j/2+h*j;l=m+x*j;i=q(m);y=b-i/2;B=y+ 11 | i;i=q(l);n=b-i/2;t=n+i;m>v?(y=n=b-r/2,B=t=b+r/2):l>v&&(o=l,i=q(v),n=b-i/2,t=n+i,l=v);w=["M",y,m,"L",B,m,t,l];o&&w.push(t,o,n,o);w.push(n,l,"Z");a.shapeType="path";a.shapeArgs={d:w};a.percentage=x*100;a.plotX=b;a.plotY=(m+(o||l))/2;a.tooltipPos=[b,a.plotY];a.slice=z;a.half=u;h+=x});this.setTooltipPoints()},drawPoints:function(){var a=this,g=a.options,e=a.chart.renderer;A(a.data,function(f){var h=f.graphic,c=f.shapeArgs;h?h.animate(c):f.graphic=e.path(c).attr({fill:f.color,stroke:g.borderColor,"stroke-width":g.borderWidth}).add(a.group)})}, 12 | sortByAngle:z,drawDataLabels:function(){var a=this.data,g=this.options.dataLabels.distance,e,f,h,c=a.length,d,b;for(this.center[2]-=2*g;c--;)h=a[c],f=(e=h.half)?1:-1,b=h.plotY,d=this.getX(b,e),h.labelPos=[0,b,d+(g-5)*f,b,d+g*f,b,e?"right":"left",0];p.pie.prototype.drawDataLabels.call(this)}})})(Highcharts); 13 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/highcharts/modules/heatmap.js: -------------------------------------------------------------------------------- 1 | (function(b){var k=b.seriesTypes,l=b.each;k.heatmap=b.extendClass(k.map,{colorKey:"z",useMapGeometry:!1,pointArrayMap:["y","z"],translate:function(){var c=this,b=c.options,i=Number.MAX_VALUE,j=Number.MIN_VALUE;c.generatePoints();l(c.data,function(a){var e=a.x,f=a.y,d=a.z,g=(b.colsize||1)/2,h=(b.rowsize||1)/2;a.path=["M",e-g,f-h,"L",e+g,f-h,"L",e+g,f+h,"L",e-g,f+h,"Z"];a.shapeType="path";a.shapeArgs={d:c.translatePath(a.path)};typeof d==="number"&&(d>j?j=d:d dataMax) { 39 | dataMax = value; 40 | } else if (value < dataMin) { 41 | dataMin = value; 42 | } 43 | } 44 | }); 45 | 46 | series.translateColors(dataMin, dataMax); 47 | }, 48 | 49 | getBox: function () {} 50 | 51 | }); 52 | 53 | }(Highcharts)); 54 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/highcharts/modules/no-data-to-display.js: -------------------------------------------------------------------------------- 1 | /* 2 | Highcharts JS v3.0.6 (2013-10-04) 3 | Plugin for displaying a message when there is no data visible in chart. 4 | 5 | (c) 2010-2013 Highsoft AS 6 | Author: Øystein Moseng 7 | 8 | License: www.highcharts.com/license 9 | */ 10 | (function(c){function f(){return!!this.points.length}function g(){this.hasData()?this.hideNoData():this.showNoData()}var d=c.seriesTypes,e=c.Chart.prototype,h=c.getOptions(),i=c.extend;i(h.lang,{noData:"No data to display"});h.noData={position:{x:0,y:0,align:"center",verticalAlign:"middle"},attr:{},style:{fontWeight:"bold",fontSize:"12px",color:"#60606a"}};d.pie.prototype.hasData=f;if(d.gauge)d.gauge.prototype.hasData=f;if(d.waterfall)d.waterfall.prototype.hasData=f;c.Series.prototype.hasData=function(){return this.dataMax!== 11 | void 0&&this.dataMin!==void 0};e.showNoData=function(a){var b=this.options,a=a||b.lang.noData,b=b.noData;if(!this.noDataLabel)this.noDataLabel=this.renderer.label(a,0,0,null,null,null,null,null,"no-data").attr(b.attr).css(b.style).add(),this.noDataLabel.align(i(this.noDataLabel.getBBox(),b.position),!1,"plotBox")};e.hideNoData=function(){if(this.noDataLabel)this.noDataLabel=this.noDataLabel.destroy()};e.hasData=function(){for(var a=this.series,b=a.length;b--;)if(a[b].hasData()&&!a[b].options.isInternal)return!0; 12 | return!1};e.callbacks.push(function(a){c.addEvent(a,"load",g);c.addEvent(a,"redraw",g)})})(Highcharts); 13 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/highcharts/themes/grid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Grid theme for Highcharts JS 3 | * @author Torstein Hønsi 4 | */ 5 | 6 | Highcharts.theme = { 7 | colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'], 8 | chart: { 9 | backgroundColor: { 10 | linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 }, 11 | stops: [ 12 | [0, 'rgb(255, 255, 255)'], 13 | [1, 'rgb(240, 240, 255)'] 14 | ] 15 | }, 16 | borderWidth: 2, 17 | plotBackgroundColor: 'rgba(255, 255, 255, .9)', 18 | plotShadow: true, 19 | plotBorderWidth: 1 20 | }, 21 | title: { 22 | style: { 23 | color: '#000', 24 | font: 'bold 16px "Trebuchet MS", Verdana, sans-serif' 25 | } 26 | }, 27 | subtitle: { 28 | style: { 29 | color: '#666666', 30 | font: 'bold 12px "Trebuchet MS", Verdana, sans-serif' 31 | } 32 | }, 33 | xAxis: { 34 | gridLineWidth: 1, 35 | lineColor: '#000', 36 | tickColor: '#000', 37 | labels: { 38 | style: { 39 | color: '#000', 40 | font: '11px Trebuchet MS, Verdana, sans-serif' 41 | } 42 | }, 43 | title: { 44 | style: { 45 | color: '#333', 46 | fontWeight: 'bold', 47 | fontSize: '12px', 48 | fontFamily: 'Trebuchet MS, Verdana, sans-serif' 49 | 50 | } 51 | } 52 | }, 53 | yAxis: { 54 | minorTickInterval: 'auto', 55 | lineColor: '#000', 56 | lineWidth: 1, 57 | tickWidth: 1, 58 | tickColor: '#000', 59 | labels: { 60 | style: { 61 | color: '#000', 62 | font: '11px Trebuchet MS, Verdana, sans-serif' 63 | } 64 | }, 65 | title: { 66 | style: { 67 | color: '#333', 68 | fontWeight: 'bold', 69 | fontSize: '12px', 70 | fontFamily: 'Trebuchet MS, Verdana, sans-serif' 71 | } 72 | } 73 | }, 74 | legend: { 75 | itemStyle: { 76 | font: '9pt Trebuchet MS, Verdana, sans-serif', 77 | color: 'black' 78 | 79 | }, 80 | itemHoverStyle: { 81 | color: '#039' 82 | }, 83 | itemHiddenStyle: { 84 | color: 'gray' 85 | } 86 | }, 87 | labels: { 88 | style: { 89 | color: '#99b' 90 | } 91 | }, 92 | 93 | navigation: { 94 | buttonOptions: { 95 | theme: { 96 | stroke: '#CCCCCC' 97 | } 98 | } 99 | } 100 | }; 101 | 102 | // Apply the theme 103 | var highchartsOptions = Highcharts.setOptions(Highcharts.theme); 104 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/highcharts/themes/skies.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Skies theme for Highcharts JS 3 | * @author Torstein Hønsi 4 | */ 5 | 6 | Highcharts.theme = { 7 | colors: ["#514F78", "#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B"], 8 | chart: { 9 | className: 'skies', 10 | borderWidth: 0, 11 | plotShadow: true, 12 | plotBackgroundImage: 'http://www.highcharts.com/demo/gfx/skies.jpg', 13 | plotBackgroundColor: { 14 | linearGradient: [0, 0, 250, 500], 15 | stops: [ 16 | [0, 'rgba(255, 255, 255, 1)'], 17 | [1, 'rgba(255, 255, 255, 0)'] 18 | ] 19 | }, 20 | plotBorderWidth: 1 21 | }, 22 | title: { 23 | style: { 24 | color: '#3E576F', 25 | font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif' 26 | } 27 | }, 28 | subtitle: { 29 | style: { 30 | color: '#6D869F', 31 | font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif' 32 | } 33 | }, 34 | xAxis: { 35 | gridLineWidth: 0, 36 | lineColor: '#C0D0E0', 37 | tickColor: '#C0D0E0', 38 | labels: { 39 | style: { 40 | color: '#666', 41 | fontWeight: 'bold' 42 | } 43 | }, 44 | title: { 45 | style: { 46 | color: '#666', 47 | font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif' 48 | } 49 | } 50 | }, 51 | yAxis: { 52 | alternateGridColor: 'rgba(255, 255, 255, .5)', 53 | lineColor: '#C0D0E0', 54 | tickColor: '#C0D0E0', 55 | tickWidth: 1, 56 | labels: { 57 | style: { 58 | color: '#666', 59 | fontWeight: 'bold' 60 | } 61 | }, 62 | title: { 63 | style: { 64 | color: '#666', 65 | font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif' 66 | } 67 | } 68 | }, 69 | legend: { 70 | itemStyle: { 71 | font: '9pt Trebuchet MS, Verdana, sans-serif', 72 | color: '#3E576F' 73 | }, 74 | itemHoverStyle: { 75 | color: 'black' 76 | }, 77 | itemHiddenStyle: { 78 | color: 'silver' 79 | } 80 | }, 81 | labels: { 82 | style: { 83 | color: '#3E576F' 84 | } 85 | } 86 | }; 87 | 88 | // Apply the theme 89 | var highchartsOptions = Highcharts.setOptions(Highcharts.theme); 90 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/snapscreen/UEditorSnapscreen.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/third-party/snapscreen/UEditorSnapscreen.exe -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/video-js/font/vjs.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/third-party/video-js/font/vjs.eot -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/video-js/font/vjs.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/third-party/video-js/font/vjs.ttf -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/video-js/font/vjs.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/third-party/video-js/font/vjs.woff -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/video-js/video-js.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/third-party/video-js/video-js.swf -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/webuploader/Uploader.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/third-party/webuploader/Uploader.swf -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/webuploader/webuploader.css: -------------------------------------------------------------------------------- 1 | .webuploader-container { 2 | position: relative; 3 | } 4 | .webuploader-element-invisible { 5 | position: absolute !important; 6 | clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ 7 | clip: rect(1px,1px,1px,1px); 8 | } 9 | .webuploader-pick { 10 | position: relative; 11 | display: inline-block; 12 | cursor: pointer; 13 | background: #00b7ee; 14 | padding: 10px 15px; 15 | color: #fff; 16 | text-align: center; 17 | border-radius: 3px; 18 | overflow: hidden; 19 | } 20 | .webuploader-pick-hover { 21 | background: #00a2d4; 22 | } 23 | 24 | .webuploader-pick-disable { 25 | opacity: 0.6; 26 | pointer-events:none; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /DjangoUeditor/static/ueditor/third-party/zeroclipboard/ZeroClipboard.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/DjangoUeditor/static/ueditor/third-party/zeroclipboard/ZeroClipboard.swf -------------------------------------------------------------------------------- /DjangoUeditor/templates/ueditor.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /DjangoUeditor/templates/ueditor_old.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DjangoUeditor/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import django 3 | from .views import get_ueditor_controller 4 | 5 | DJANGO_VERSION = django.VERSION[:2] 6 | 7 | 8 | if DJANGO_VERSION >= (1, 8): 9 | from django.conf.urls import url 10 | urlpatterns = [ 11 | url(r'^controller/$', get_ueditor_controller) 12 | ] 13 | 14 | else: 15 | try: 16 | from django.conf.urls import patterns, url 17 | except ImportError: 18 | from django.conf.urls.defaults import patterns, url 19 | 20 | urlpatterns = patterns('', 21 | url(r'^controller/$', get_ueditor_controller) 22 | ) 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # School_BBS 2 | 项目基本完善版本 3 | 4 | ## 欢迎fork / star 如果有问题请Issues 我 或者联系我的qq邮箱:358544104@qq.com 5 | # 效果预览 6 | ### 主页面 7 | 8 | ### ![image](https://github.com/Cherry93/images-floor/blob/master/%E4%B8%BB%E9%A1%B5%E9%9D%A2.png) 9 | ### 主页面功能包括,发帖,帖子展示,热点信息(爬取网站信息,存入数据库,再显示再页面上,最新评论,热门帖子,按阅读量排序 10 | ### 按周、按月、按日进行阅读量排序、帖子默认是原创,帖子有转载功能,点赞,统计阅读量,点赞数,转发数,收藏数。 11 | 12 | ## 详细页面 13 | 14 | ### ![image](https://github.com/Cherry93/images-floor/blob/master/%E8%AF%A6%E7%BB%86%E9%A1%B5%E9%9D%A2.png) 15 | 16 | ### 详细页面有,文章详情,转发,点赞,收藏,帖子的评论,以及二级评论 17 | 18 | ## 发帖页面 19 | ### ![image](https://github.com/Cherry93/images-floor/blob/master/%E5%8F%91%E5%B8%96.png) 20 | 21 | ### 采用富文本编辑器DjangoUeditor3 22 | 23 | ### 个人页面 24 | 25 | ### ![image](https://github.com/Cherry93/images-floor/blob/master/%E4%B8%AA%E4%BA%BA%E9%A1%B5%E9%9D%A2.png) 26 | 27 | ### 可以对用户信息进行修改,密码修改以及密码重置 28 | ### 当然也有用户注册,登录功能,比较常见,就不赘述啦~~~ 29 | 30 | ## 使用步骤: 31 | ### django2.0 (版本没啥关系) python3.6(2.7不确定能用不) pillow(图片显示) 32 | ### pip install requriements.txt 或者 pip install -r requirements.txt 33 | 34 | ### 可以先运行spider 文件的hotinfo.py 会生成一个bbstest.json 这个文件 35 | ### python manage.py loaddata bbstest.json 这样数据库就会有你爬下来的数据啦 36 | ### 最后python manage.py runserver 37 | ### http://127.0.0.1:8000 就可以看效果了 或者 http://127.0.0.1/index.html 38 | -------------------------------------------------------------------------------- /School_BBS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/School_BBS/__init__.py -------------------------------------------------------------------------------- /School_BBS/urls.py: -------------------------------------------------------------------------------- 1 | """School_BBS 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,include 17 | from django.contrib import admin 18 | from django.conf import settings 19 | from django.conf.urls.static import static 20 | # from users import views 21 | from posts import views 22 | urlpatterns = [ 23 | url(r'^admin/', admin.site.urls), 24 | url(r'^users/', include('users.urls')), 25 | url(r'^', include('posts.urls')), 26 | url(r'^', include('comments.urls')), 27 | # 将 auth 应用中的 urls 模块包含进来 28 | url(r'^users/', include('django.contrib.auth.urls')), 29 | # 别忘记在顶部引入 views 模块 30 | url(r'^$', views.index, name='index'), 31 | url(r'^ueditor/',include('DjangoUeditor.urls' )), 32 | ]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 33 | 34 | 35 | -------------------------------------------------------------------------------- /School_BBS/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for School_BBS 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", "School_BBS.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /comments/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/comments/__init__.py -------------------------------------------------------------------------------- /comments/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from comments.models import Comment 3 | # Register your models here. 4 | 5 | admin.site.register(Comment) -------------------------------------------------------------------------------- /comments/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CommentsConfig(AppConfig): 5 | name = 'comments' 6 | -------------------------------------------------------------------------------- /comments/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from .models import Comment 3 | 4 | 5 | class CommentForm(forms.ModelForm): 6 | class Meta: 7 | model = Comment 8 | fields = ['text'] 9 | -------------------------------------------------------------------------------- /comments/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-08 11:05 3 | from __future__ import unicode_literals 4 | 5 | from django.conf import settings 6 | from django.db import migrations, models 7 | import django.db.models.deletion 8 | 9 | 10 | class Migration(migrations.Migration): 11 | 12 | initial = True 13 | 14 | dependencies = [ 15 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 16 | ('posts', '0001_initial'), 17 | ] 18 | 19 | operations = [ 20 | migrations.CreateModel( 21 | name='Comment', 22 | fields=[ 23 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 24 | ('text', models.TextField(verbose_name='评论的内容')), 25 | ('created_time', models.DateTimeField(auto_now_add=True)), 26 | ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='posts.Post')), 27 | ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 28 | ], 29 | ), 30 | ] 31 | -------------------------------------------------------------------------------- /comments/migrations/0002_auto_20180410_1802.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-10 10:02 3 | from __future__ import unicode_literals 4 | 5 | import DjangoUeditor.models 6 | from django.db import migrations 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('comments', '0001_initial'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='comment', 18 | name='text', 19 | field=DjangoUeditor.models.UEditorField(blank=True, default='评论', verbose_name='评论内容'), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /comments/migrations/0003_commentreply.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-12 13:55 3 | from __future__ import unicode_literals 4 | 5 | from django.conf import settings 6 | from django.db import migrations, models 7 | import django.db.models.deletion 8 | 9 | 10 | class Migration(migrations.Migration): 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ('comments', '0002_auto_20180410_1802'), 15 | ] 16 | 17 | operations = [ 18 | migrations.CreateModel( 19 | name='CommentReply', 20 | fields=[ 21 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 22 | ('content', models.TextField()), 23 | ('replay_time', models.DateTimeField()), 24 | ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_comment_replies', to=settings.AUTH_USER_MODEL)), 25 | ('comment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment_replies', to='comments.Comment')), 26 | ('replay_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_replied', to=settings.AUTH_USER_MODEL)), 27 | ], 28 | ), 29 | ] 30 | -------------------------------------------------------------------------------- /comments/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/comments/migrations/__init__.py -------------------------------------------------------------------------------- /comments/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from posts.models import Post 3 | from users.models import User 4 | from DjangoUeditor.models import UEditorField 5 | # Create your models here. 6 | 7 | 8 | class Comment(models.Model): 9 | """评论""" 10 | user = models.ForeignKey(User) 11 | text = UEditorField(width=900, height=200, imagePath="images/", 12 | filePath="images/", verbose_name=u"评论内容",blank=True,default='评论') 13 | created_time = models.DateTimeField(auto_now_add=True) 14 | post = models.ForeignKey(Post) 15 | 16 | def __str__(self): 17 | return self.text[:20] 18 | 19 | 20 | class CommentReply(models.Model): 21 | """回复""" 22 | content = models.TextField() 23 | comment = models.ForeignKey(Comment, related_name='comment_replies') 24 | author = models.ForeignKey(User, related_name='user_comment_replies', null=True, blank=True, 25 | on_delete=models.SET_NULL) 26 | replay_user = models.ForeignKey(User, related_name='user_replied', null=True, blank=True, on_delete=models.SET_NULL) 27 | replay_time = models.DateTimeField() 28 | # review = models.BooleanField(default=False) 29 | 30 | def __unicode__(self): 31 | return '{0}->{1}'.format(self.author, self.replay_user) -------------------------------------------------------------------------------- /comments/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /comments/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | 3 | from .views import post_comment,reply 4 | 5 | app_name = 'comments' 6 | 7 | urlpatterns = [ 8 | url(r'^comment/post/(?P[0-9]+)/$', post_comment, name='post_comment'), 9 | url(r'^reply/(\d+)$', reply, name='reply'), 10 | ] -------------------------------------------------------------------------------- /db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/db.sqlite3 -------------------------------------------------------------------------------- /hotinfo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/hotinfo/__init__.py -------------------------------------------------------------------------------- /hotinfo/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /hotinfo/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HotinfoConfig(AppConfig): 5 | name = 'hotinfo' 6 | -------------------------------------------------------------------------------- /hotinfo/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-16 09:29 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='HotInfo', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('title', models.CharField(max_length=256)), 21 | ('link', models.CharField(max_length=256)), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /hotinfo/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/hotinfo/migrations/__init__.py -------------------------------------------------------------------------------- /hotinfo/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | 5 | 6 | class HotInfo(models.Model): 7 | title = models.CharField(max_length=256) 8 | link = models.CharField(max_length=256) 9 | -------------------------------------------------------------------------------- /hotinfo/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /hotinfo/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /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", "School_BBS.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 | -------------------------------------------------------------------------------- /media/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/media/images/1.jpg -------------------------------------------------------------------------------- /media/images/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/media/images/14.jpg -------------------------------------------------------------------------------- /media/images/1_5QuFmAp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/media/images/1_5QuFmAp.jpg -------------------------------------------------------------------------------- /media/images/1_KsmfVNw.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/media/images/1_KsmfVNw.jpg -------------------------------------------------------------------------------- /media/images/1_oNfA96G.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/media/images/1_oNfA96G.jpg -------------------------------------------------------------------------------- /media/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/media/images/4.jpg -------------------------------------------------------------------------------- /media/images/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/media/images/9.jpg -------------------------------------------------------------------------------- /media/images/9_b0VXlwa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/media/images/9_b0VXlwa.jpg -------------------------------------------------------------------------------- /media/images/微信图片_20180407181140_20180409201105_828.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/media/images/微信图片_20180407181140_20180409201105_828.png -------------------------------------------------------------------------------- /posts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/__init__.py -------------------------------------------------------------------------------- /posts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Post,Tag,Category,Like,Favorite 3 | # Register your models here. 4 | 5 | admin.site.register(Post) 6 | admin.site.register(Tag) 7 | admin.site.register(Category) 8 | admin.site.register(Like) 9 | admin.site.register(Favorite) -------------------------------------------------------------------------------- /posts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PostsConfig(AppConfig): 5 | name = 'posts' 6 | -------------------------------------------------------------------------------- /posts/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | 3 | from .models import Post,User 4 | 5 | 6 | 7 | class PostForm(forms.ModelForm): 8 | class Meta: 9 | model = Post 10 | fields = [ 'title','content_html','category','tags'] 11 | 12 | 13 | class AvaForm(forms.ModelForm): 14 | class Meta: 15 | model = User 16 | fields = ['avatar'] 17 | 18 | class UsrForm(forms.ModelForm): 19 | class Meta: 20 | model = User 21 | fields = ['username'] 22 | 23 | class SigForm(forms.ModelForm): 24 | class Meta: 25 | model = User 26 | fields = ['signature'] 27 | 28 | class QqForm(forms.ModelForm): 29 | class Meta: 30 | model = User 31 | fields = ['qq_num'] 32 | 33 | class MaForm(forms.ModelForm): 34 | class Meta: 35 | model = User 36 | fields = ['major'] 37 | 38 | class PhForm(forms.ModelForm): 39 | class Meta: 40 | model = User 41 | fields = ['phone'] -------------------------------------------------------------------------------- /posts/migrations/0002_auto_20180409_2004.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-09 12:04 3 | from __future__ import unicode_literals 4 | 5 | import DjangoUeditor.models 6 | from django.db import migrations 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('posts', '0001_initial'), 13 | ] 14 | 15 | operations = [ 16 | migrations.AlterField( 17 | model_name='post', 18 | name='content_html', 19 | field=DjangoUeditor.models.UEditorField(blank=True, default='images/1.jpg', verbose_name='文章内容'), 20 | ), 21 | ] 22 | -------------------------------------------------------------------------------- /posts/migrations/0003_transmit.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-10 07:02 3 | from __future__ import unicode_literals 4 | 5 | from django.conf import settings 6 | from django.db import migrations, models 7 | import django.db.models.deletion 8 | 9 | 10 | class Migration(migrations.Migration): 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ('posts', '0002_auto_20180409_2004'), 15 | ] 16 | 17 | operations = [ 18 | migrations.CreateModel( 19 | name='Transmit', 20 | fields=[ 21 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 22 | ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')), 23 | ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='posts.Post')), 24 | ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), 25 | ], 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /posts/migrations/0004_auto_20180410_1802.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-10 10:02 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('posts', '0003_transmit'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AlterModelOptions( 16 | name='post', 17 | options={'verbose_name': '帖子', 'verbose_name_plural': '帖子'}, 18 | ), 19 | migrations.AddField( 20 | model_name='post', 21 | name='views', 22 | field=models.PositiveIntegerField(default=0), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /posts/migrations/0005_auto_20180411_0939.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-11 01:39 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('posts', '0004_auto_20180410_1802'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='post', 17 | name='comment_num', 18 | field=models.IntegerField(default=0), 19 | ), 20 | migrations.AddField( 21 | model_name='post', 22 | name='favo_num', 23 | field=models.IntegerField(default=0), 24 | ), 25 | migrations.AddField( 26 | model_name='post', 27 | name='like_num', 28 | field=models.IntegerField(default=0), 29 | ), 30 | migrations.AddField( 31 | model_name='post', 32 | name='transmit_num', 33 | field=models.IntegerField(default=0), 34 | ), 35 | ] 36 | -------------------------------------------------------------------------------- /posts/migrations/0006_post_post_from.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-11 07:44 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('posts', '0005_auto_20180411_0939'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='post', 17 | name='post_from', 18 | field=models.IntegerField(choices=[(0, '原创'), (1, '转载')], default=0, verbose_name='文章来源'), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /posts/migrations/0007_auto_20180412_1928.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-12 11:28 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | import django.db.models.deletion 7 | 8 | 9 | class Migration(migrations.Migration): 10 | 11 | dependencies = [ 12 | ('posts', '0006_post_post_from'), 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Best', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('name', models.CharField(max_length=256)), 21 | ], 22 | ), 23 | migrations.AddField( 24 | model_name='post', 25 | name='best_act', 26 | field=models.IntegerField(default=0), 27 | ), 28 | migrations.AlterField( 29 | model_name='post', 30 | name='category', 31 | field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='posts.Category', verbose_name='话题'), 32 | ), 33 | migrations.AlterField( 34 | model_name='post', 35 | name='tags', 36 | field=models.ManyToManyField(blank=True, to='posts.Tag', verbose_name='专栏'), 37 | ), 38 | migrations.AddField( 39 | model_name='post', 40 | name='best', 41 | field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='posts.Best', verbose_name='精华'), 42 | ), 43 | ] 44 | -------------------------------------------------------------------------------- /posts/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/migrations/__init__.py -------------------------------------------------------------------------------- /posts/static/csrf.js: -------------------------------------------------------------------------------- 1 | $(document).ajaxSend(function(event, xhr, settings) { 2 | function getCookie(name) { 3 | var cookieValue = null; 4 | if (document.cookie && document.cookie != '') { 5 | var cookies = document.cookie.split(';'); 6 | for (var i = 0; i < cookies.length; i++) { 7 | var cookie = jQuery.trim(cookies[i]); 8 | // Does this cookie string begin with the name we want? 9 | if (cookie.substring(0, name.length + 1) == (name + '=')) { 10 | cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 11 | break; 12 | } 13 | } 14 | } 15 | return cookieValue; 16 | } 17 | function sameOrigin(url) { 18 | // url could be relative or scheme relative or absolute 19 | var host = document.location.host; // host + port 20 | var protocol = document.location.protocol; 21 | var sr_origin = '//' + host; 22 | var origin = protocol + sr_origin; 23 | // Allow absolute or scheme relative URLs to same origin 24 | return (url == origin || url.slice(0, origin.length + 1) == origin + '/') || 25 | (url == sr_origin || url.slice(0, sr_origin.length + 1) == sr_origin + '/') || 26 | // or any other URL that isn't scheme relative or absolute i.e relative. 27 | !(/^(\/\/|http:|https:).*/.test(url)); 28 | } 29 | function safeMethod(method) { 30 | return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); 31 | } 32 | 33 | if (!safeMethod(settings.type) && sameOrigin(settings.url)) { 34 | xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken')); 35 | } 36 | }); -------------------------------------------------------------------------------- /posts/static/css/common.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | } 5 | .footer { 6 | color:#666666; 7 | font-size:14px; 8 | font-family:Verdana; 9 | text-align:center; 10 | } -------------------------------------------------------------------------------- /posts/static/css/custom.css: -------------------------------------------------------------------------------- 1 | h1, h2, h3, h4, h5, h6 { 2 | color: black; 3 | } 4 | 5 | #side-carousel img { 6 | margin: 0 auto; 7 | } 8 | 9 | .footer-blurb { 10 | padding: 30px 0; 11 | margin-top: 20px; 12 | background-color: #eee; 13 | color: black; 14 | } 15 | 16 | .footer-blurb-item { 17 | padding: 20px; 18 | } 19 | 20 | .small-print { 21 | background-color: #fff; 22 | padding: 30px 0; 23 | } 24 | 25 | .feature, 26 | .page-intro, 27 | .article-intro, 28 | .small-print { 29 | text-align: center; 30 | } 31 | -------------------------------------------------------------------------------- /posts/static/css/index.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | } 5 | form{ 6 | font: "微软雅黑"; 7 | font-size: 15px; 8 | color:#0056B3; 9 | } 10 | input{ 11 | border: 0; 12 | } 13 | .textinput { 14 | width:100px; 15 | border-bottom:1px #2C59AA solid; 16 | } 17 | -------------------------------------------------------------------------------- /posts/static/css/register.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | }/*清除浏览器自带样式*/ 5 | hr{ 6 | height: 2px; 7 | margin-top:5px; 8 | margin-bottom: 5px; 9 | } 10 | font{ 11 | font-size: 15px; 12 | } 13 | table.body { 14 | BORDER: 1px solid; 15 | BORDER-COLOR: #CCCCCC; 16 | } 17 | table,td,input,select { 18 | font-size: 14px; 19 | } 20 | td{ 21 | height: 28px; 22 | } 23 | -------------------------------------------------------------------------------- /posts/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /posts/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /posts/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /posts/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /posts/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/img/favicon.ico -------------------------------------------------------------------------------- /posts/static/img/footer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/img/footer.jpg -------------------------------------------------------------------------------- /posts/static/img/hbut1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/img/hbut1.jpg -------------------------------------------------------------------------------- /posts/static/img/link.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/img/link.jpg -------------------------------------------------------------------------------- /posts/static/img/link2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/img/link2.png -------------------------------------------------------------------------------- /posts/static/img/link3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/img/link3.png -------------------------------------------------------------------------------- /posts/static/img/p_bk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/img/p_bk.jpg -------------------------------------------------------------------------------- /posts/static/img/pro_bk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/img/pro_bk.jpg -------------------------------------------------------------------------------- /posts/static/img/科技楼.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/static/img/科技楼.gif -------------------------------------------------------------------------------- /posts/static/js/ie10-viewport-bug-workaround.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * IE10 viewport hack for Surface/desktop Windows 8 bug 3 | * Copyright 2014-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | // See the Getting Started docs for more information: 8 | // http://getbootstrap.com/getting-started/#support-ie10-width 9 | 10 | (function () { 11 | 'use strict'; 12 | 13 | if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 14 | var msViewportStyle = document.createElement('style') 15 | msViewportStyle.appendChild( 16 | document.createTextNode( 17 | '@-ms-viewport{width:auto!important}' 18 | ) 19 | ) 20 | document.querySelector('head').appendChild(msViewportStyle) 21 | } 22 | 23 | })(); 24 | -------------------------------------------------------------------------------- /posts/templates/posts/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% load static %} 5 | {# {% static "css/bootstrap.min.css" %}#} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 欢迎进入湖北工业大学BBS站 17 | 18 | 19 |
20 | 21 |
22 | 25 |
26 | {#
#} 27 | {# 账号:#} 28 | {# 密码:#} 29 | {# #} 30 | 31 | 32 | {% if request.user.is_authenticated %} 33 | 34 | {% else %} 35 | 36 | {% endif %} 37 | {#
#} 38 |
39 |
40 |
41 | 44 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /posts/templates/posts/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 湖北工业大学 BBS站 14 | 15 | 16 | 17 | 20 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /posts/templates/posts/prof_self.html: -------------------------------------------------------------------------------- 1 | {% extends 'posts/profile.html' %} -------------------------------------------------------------------------------- /posts/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/posts/templatetags/__init__.py -------------------------------------------------------------------------------- /posts/templatetags/blog_tags.py: -------------------------------------------------------------------------------- 1 | from django import template 2 | from django.db.models import Count 3 | from users.models import User 4 | from ..models import Post, Category, Tag,Favorite,Like,Best 5 | from comments.models import Comment 6 | register = template.Library() 7 | 8 | 9 | @register.simple_tag 10 | def get_recent_posts(num=5): 11 | return Post.objects.all().order_by('-created_time')[:num] 12 | 13 | 14 | @register.simple_tag 15 | def archives(num=5): 16 | return Post.objects.dates('created_time', 'month', order='DESC')[:num] 17 | 18 | @register.simple_tag 19 | def archives2(num=5): 20 | return Post.objects.dates('created_time', 'day', order='DESC')[:num] 21 | 22 | @register.simple_tag 23 | def get_categories(): 24 | return Category.objects.annotate(num_post=Count('post')).filter(num_post__gt=0) 25 | 26 | 27 | @register.simple_tag 28 | def get_tags(): 29 | return Tag.objects.annotate(num_post=Count('post')).filter(num_post__gt=0) 30 | 31 | @register.simple_tag 32 | def get_comments(): 33 | return Comment.objects.annotate(num_comm=Count('user')).filter(num_comm__gt=0) 34 | 35 | @register.simple_tag 36 | def get_fav(): 37 | return Favorite.objects.annotate(num_fav=Count('post')).filter(num_fav_gt=0) 38 | 39 | @register.simple_tag 40 | def get_like(): 41 | return Like.objects.annotate(num_like=Count('post')).filter(num_like__gt=0) 42 | 43 | @register.simple_tag 44 | def get_best(): 45 | return Best.objects.annotate(num_best=Count('post')).filter(num_best__gt=0) -------------------------------------------------------------------------------- /posts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /posts/update.py: -------------------------------------------------------------------------------- 1 | from .forms import PostForm,AvaForm,UsrForm,PhForm,SigForm,QqForm,MaForm 2 | from django.shortcuts import render,get_object_or_404,render_to_response 3 | 4 | 5 | def update_ava(request): # 个人页面头像修改 6 | pro_form = AvaForm(request.POST, request.FILES, instance=request.user) 7 | # print(pro_form) 8 | if pro_form.is_valid(): 9 | pro_form.save() 10 | return render(request, 'posts/profile.html') 11 | 12 | 13 | def update_signature(request): 14 | signatur_form = SigForm(request.POST, instance=request.user) 15 | if signatur_form.is_valid(): 16 | signatur_form.save() 17 | return render(request, 'posts/profile.html') 18 | 19 | 20 | def update_name(request): 21 | name_form = UsrForm(request.POST, instance=request.user) 22 | if name_form.is_valid(): 23 | name_form.save() 24 | # return HttpResponse("{'status':'success'}", content_type='application/json') 25 | return render(request, 'posts/profile.html') 26 | 27 | def update_qq(request): 28 | signatur_form = QqForm(request.POST, instance=request.user) 29 | if signatur_form.is_valid(): 30 | signatur_form.save() 31 | return render(request, 'posts/profile.html') 32 | 33 | def update_ph(request): 34 | signatur_form = PhForm(request.POST, instance=request.user) 35 | if signatur_form.is_valid(): 36 | signatur_form.save() 37 | return render(request, 'posts/profile.html') 38 | 39 | def update_maj(request): 40 | signatur_form = MaForm(request.POST, instance=request.user) 41 | if signatur_form.is_valid(): 42 | signatur_form.save() 43 | return render(request, 'posts/profile.html') -------------------------------------------------------------------------------- /posts/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | import posts.views as views 3 | import posts.update as update 4 | from .views import IndexView 5 | app_name = 'posts' 6 | 7 | urlpatterns = [ 8 | url(r'^index/$', IndexView.as_view(), name='index'), 9 | # url(r'^index/', views.posts, name='index'), 10 | url(r'^categories/(?P\d+)/$', views.categories, name='categories'), 11 | url(r'^tags/(?P\d+)/$', views.tags, name='tags'), 12 | url(r'^best/(?P\d+)/$', views.tags, name='best'), 13 | url(r'^detail/(?P\d+)/$',views.detail, name='detail'), 14 | url(r'^add/$',views.add_post,name='add'), 15 | 16 | # 个人页面 17 | url(r'^profile/(\d+)$', views.profile, name='profile'), 18 | url(r'^favorite/(\d+)$', views.favorite, name='favorite'), 19 | url(r'^like/(\d+)$', views.like, name='like'), 20 | url(r'^comment/(\d+)$', views.comment, name='comment'), 21 | url(r'^tranmite/(\d+)$', views.transmite, name='tranmite'), 22 | 23 | 24 | url(r'^update_ava/$',update.update_ava,name='update_ava'), 25 | url(r'^update_name/$',update.update_name,name='update_name'), 26 | url(r'^update_ph/$',update.update_ph,name='update_ph'), 27 | url(r'^update_maj/$',update.update_maj,name='update_maj'), 28 | url(r'^update_qq/$',update.update_qq,name='update_qq'), 29 | url(r'^update_signature/$',update.update_signature,name='update_signature'), 30 | 31 | 32 | url(r'^favorite/$', views.add_favorite, name='favorite'), 33 | url(r'^like/$', views.add_like, name='like'), 34 | url(r'^transmit/$', views.add_transmit, name='transmit'), 35 | 36 | url(r'^search/$', views.search, name='search'), 37 | ] -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | django==2.2.24 2 | pillow 3 | django-bootstrap3 4 | -------------------------------------------------------------------------------- /spider/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/spider/__init__.py -------------------------------------------------------------------------------- /spider/hotInfo.py: -------------------------------------------------------------------------------- 1 | import requests 2 | from lxml import etree 3 | import json 4 | url = 'http://yz.chsi.com.cn/kyzx/kydt/' # 目标网址 5 | page = requests.get(url) # 获取网页对象 6 | 7 | sector = etree.HTML(page.text) # html解析 8 | info = sector.xpath('//div[@class="content-l"]/ul/li/a//text()') # 查找标题 9 | link = sector.xpath('//div[@class="content-l"]/ul/li/a/@href') # 对应的链接 10 | base_url= 'http://yz.chsi.com.cn' 11 | target_link = [] # 我们需要的网址信息 12 | for i in link: 13 | res = base_url+i 14 | target_link.append(res) 15 | print(target_link) 16 | 17 | ### 转化json 存到数据库 18 | res=[dict(title=info[index], link=target_link[index]) for index in range(len(info))] 19 | print(res) 20 | res2 = [dict(model = 'hotinfo.hotinfo',fields = k) for k in res] 21 | print(res2) 22 | 23 | # json_str2 = json.dumps(res2,ensure_ascii=False) 24 | # print ("python原始数据:", repr(res2)) 25 | # print ("json对象:", json_str2,type(json_str2)) 26 | 27 | with open("./bbstest.json",'w',encoding='utf-8') as json_file: 28 | json.dump(res2,json_file,ensure_ascii=False) -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 首页 8 | 9 | 10 | 11 |
12 |
13 |
14 |

Django Auth Example

15 | {% if user.is_authenticated %} 16 |

你已登录,欢迎你:{{ user.username }}

17 | {# #} 18 | 注销登录 19 | {% else %} 20 |

你还没有登录,请 21 | {# #} 22 | 登录 23 | 或者 24 | 25 |

26 | {% endif %} 27 |
28 |
29 |
30 | 31 | -------------------------------------------------------------------------------- /templates/registration/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 登录 8 | 9 | 17 | 18 | 19 |
20 |
21 |
22 |
23 |

登录

24 |
25 | {% csrf_token %} 26 | {{ form.non_field_errors }} 27 | {% for field in form %} 28 | {{ field.label_tag }} 29 | {{ field }} 30 | {{ field.errors }} 31 | {% if field.help_text %} 32 |

{{ field.help_text|safe }}

33 | {% endif %} 34 | {% endfor %} 35 | 36 | 37 | 38 | 39 |
40 | 41 |
42 |
没有账号?立即注册
43 | 44 |
45 |
46 |
47 |
48 |
49 | 50 | -------------------------------------------------------------------------------- /templates/registration/password_change_done.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 密码修改成功 8 | 9 | 10 | 11 |
12 |
13 |
14 |

返回首页

15 |

密码修改成功!

16 |
17 |
18 |
19 | 20 | -------------------------------------------------------------------------------- /templates/registration/password_change_form.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 修改密码 8 | 9 | 14 | 15 | 16 |
17 |
18 |
19 |
20 |

湖北工业大学BBS

21 |

修改密码

22 |
23 | {% csrf_token %} 24 | {{ form.non_field_errors }} 25 | {% for field in form %} 26 | {{ field.label_tag }} 27 | {{ field }} 28 | {{ field.errors }} 29 | {% if field.help_text %} 30 |

{{ field.help_text|safe }}

31 | {% endif %} 32 | {% endfor %} 33 | 34 |
35 |
36 |
37 |
38 |
39 | 40 | -------------------------------------------------------------------------------- /templates/registration/password_reset_complete.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 新密码设置成功 8 | 9 | 10 | 11 |
12 |
13 |
14 |

湖北工业大学BBS

15 |

新密码设置成功

16 |

17 | 你的口令己经设置。现在你可以继续进行登录。 18 |

19 |
20 |
21 |
22 | 23 | -------------------------------------------------------------------------------- /templates/registration/password_reset_confirm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 设置新密码 8 | 9 | 14 | 15 | 16 |
17 |
18 |
19 |
20 |

湖北工业大学BBS

21 |

设置新密码

22 |
23 | {% csrf_token %} 24 | {{ form.non_field_errors }} 25 | {% for field in form %} 26 | {{ field.label_tag }} 27 | {{ field }} 28 | {{ field.errors }} 29 | {% if field.help_text %} 30 |

{{ field.help_text|safe }}

31 | {% endif %} 32 | {% endfor %} 33 | 34 |
35 |
36 |
37 |
38 |
39 | 40 | -------------------------------------------------------------------------------- /templates/registration/password_reset_done.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 密码重置链接已经发送 8 | 9 | 10 | 11 |
12 |
13 |
14 |

湖北工业大学BBS

15 |

密码重置链接已经发送

16 |

17 | 如果您输入的邮件地址所对应的账户存在,设置密码的提示已经发送邮件给您,您将很快收到。 18 |

19 |

20 | 如果你没有收到邮件, 请确保您所输入的地址是正确的, 并检查您的垃圾邮件文件夹. 21 |

22 |
23 |
24 |
25 | 26 | -------------------------------------------------------------------------------- /templates/registration/password_reset_form.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 重置密码 8 | 9 | 14 | 15 | 16 |
17 |
18 |
19 |
20 |

湖北工业大学BBS

21 |

重置密码

22 |
23 | {% csrf_token %} 24 | {{ form.non_field_errors }} 25 | {% for field in form %} 26 | {{ field.label_tag }} 27 | {{ field }} 28 | {{ field.errors }} 29 | {% if field.help_text %} 30 |

{{ field.help_text|safe }}

31 | {% endif %} 32 | {% endfor %} 33 | 34 |
35 |
36 |
37 |
38 |
39 | 40 | -------------------------------------------------------------------------------- /templates/users/register.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 注册 9 | 10 | 15 | 16 | 17 |
18 |
19 |
20 |
21 |

注册

22 |
23 | {% csrf_token %} 24 | {% for field in form %} 25 | {{ field.label_tag }} 26 | {{ field }} 27 | {{ field.errors }} 28 | {% if field.help_text %} 29 |

{{ field.help_text|safe }}

30 | {% endif %} 31 | {% endfor %} 32 | 33 |
34 |
35 | {# {% url 'login' %}#} 36 | 已有账号登录 37 |
38 |
39 |
40 |
41 |
42 | 43 | -------------------------------------------------------------------------------- /users/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/users/__init__.py -------------------------------------------------------------------------------- /users/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import User 3 | # Register your models here. 4 | 5 | admin.site.register(User) -------------------------------------------------------------------------------- /users/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class UsersConfig(AppConfig): 5 | name = 'users' 6 | -------------------------------------------------------------------------------- /users/backends.py: -------------------------------------------------------------------------------- 1 | from .models import User 2 | 3 | 4 | class EmailBackend(object): 5 | def authenticate(self, request, **credentials): 6 | email = credentials.get('email', credentials.get('username')) 7 | try: 8 | user = User.objects.get(email=email) 9 | except User.DoesNotExist: 10 | pass 11 | else: 12 | if user.check_password(credentials["password"]): 13 | return user 14 | 15 | def get_user(self, user_id): 16 | try: 17 | return User.objects.get(pk=user_id) 18 | except User.DoesNotExist: 19 | return None 20 | -------------------------------------------------------------------------------- /users/forms.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.forms import UserCreationForm 2 | from .models import User 3 | 4 | 5 | 6 | class RegisterForm(UserCreationForm): 7 | class Meta(UserCreationForm.Meta): 8 | model = User 9 | fields = ("username", "email","student_num","major","qq_num") 10 | 11 | 12 | -------------------------------------------------------------------------------- /users/migrations/0002_auto_20180409_1236.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-09 04:36 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('users', '0001_initial'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='user', 17 | name='avatar', 18 | field=models.ImageField(blank=True, default='images/1.jpg', upload_to='images/', verbose_name='头像'), 19 | ), 20 | migrations.AddField( 21 | model_name='user', 22 | name='phone', 23 | field=models.CharField(blank=True, max_length=20, verbose_name='电话'), 24 | ), 25 | migrations.AddField( 26 | model_name='user', 27 | name='sex', 28 | field=models.CharField(choices=[('男', 1), ('女', 0)], default=1, max_length=1, verbose_name='性别'), 29 | ), 30 | ] 31 | -------------------------------------------------------------------------------- /users/migrations/0003_user_signature.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.9 on 2018-04-10 01:13 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('users', '0002_auto_20180409_1236'), 12 | ] 13 | 14 | operations = [ 15 | migrations.AddField( 16 | model_name='user', 17 | name='signature', 18 | field=models.CharField(default='This guy is too lazy to leave anything here!', max_length=128), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /users/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cherry93/School_BBS/643366109849e70dfbfaf53273e6f54b7198230a/users/migrations/__init__.py -------------------------------------------------------------------------------- /users/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import AbstractUser 3 | # Create your models here. 4 | 5 | # user 包括 学号,姓名,专业,QQ 6 | 7 | 8 | class User(AbstractUser): 9 | SEX_CHOICES = ( 10 | ('男', 1), 11 | ('女', 0),) 12 | student_num = models.CharField(max_length=64,verbose_name="学号") 13 | qq_num = models.CharField(max_length=64,blank=True,verbose_name="qq号") 14 | major = models.CharField(max_length=64,blank=True,verbose_name="专业") 15 | sex = models.CharField(max_length=1,choices=SEX_CHOICES,verbose_name='性别',default=1) 16 | phone = models.CharField(max_length=20,blank=True,verbose_name='电话') 17 | avatar = models.ImageField(blank=True, upload_to='images/',default='images/1.jpg',verbose_name='头像') 18 | signature = models.CharField(max_length=128, default='This guy is too lazy to leave anything here!') 19 | class Meta(AbstractUser.Meta): 20 | pass -------------------------------------------------------------------------------- /users/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /users/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | from . import views 3 | 4 | app_name = 'users' 5 | urlpatterns = [ 6 | url(r'^register/', views.register, name='register'), 7 | ] -------------------------------------------------------------------------------- /users/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render, redirect 2 | from .forms import RegisterForm 3 | # Create your views here. 4 | def register(request): 5 | # 从 get 或者 post 请求中获取 next 参数值 6 | # get 请求中,next 通过 url 传递,即 /?next=value 7 | # post 请求中,next 通过表单传递,即 8 | redirect_to = request.POST.get('next', request.GET.get('next', '')) 9 | 10 | # 只有当请求为 POST 时,才表示用户提交了注册信息 11 | if request.method == 'POST': 12 | # request.POST 是一个类字典数据结构,记录了用户提交的注册信息 13 | # 这里提交的就是用户名(username)、密码(password)、邮箱(email)、学号(student_num)等 14 | # 用这些数据实例化一个用户注册表单 15 | form = RegisterForm(request.POST) 16 | 17 | # 验证数据的合法性 18 | if form.is_valid(): 19 | # 如果提交数据合法,调用表单的 save 方法将用户数据保存到数据库 20 | form.save() 21 | if redirect_to: 22 | return redirect(redirect_to) 23 | else: 24 | return redirect('/') 25 | # 注册成功,跳转回首页 26 | else: 27 | # 请求不是 POST,表明用户正在访问注册页面,展示一个空的注册表单给用户 28 | form = RegisterForm() 29 | 30 | # 渲染模板 31 | # 如果用户正在访问注册页面,则渲染的是一个空的注册表单 32 | # 如果用户通过表单提交注册信息,但是数据验证不合法,则渲染的是一个带有错误信息的表单 33 | return render(request, 'users/register.html', context={'form': form}) 34 | 35 | def index(request): 36 | return render(request, 'index.html') --------------------------------------------------------------------------------