当前位置: 首页 > news >正文

安徽省交通运输厅金良免费网站做seo

安徽省交通运输厅金良,免费网站做seo,wordpress鼠标悬停图片,555建筑网首先要说明这段python代码并不完整#xff0c;而且我也没有做过测试#xff0c;只是我在工作时参考了其中的一些个方法。这是我在找python相关源码资料里看到的一段代码#xff0c;是Django静态文件URL配置代码片段2#xff0c;代码中有些方法还是挺技巧的#xff0c;做其…首先要说明这段python代码并不完整而且我也没有做过测试只是我在工作时参考了其中的一些个方法。这是我在找python相关源码资料里看到的一段代码是Django静态文件URL配置代码片段2代码中有些方法还是挺技巧的做其它操作时可以参考着使用。需要完整代码的伙伴们可以自已去找找看如果有时间等就等我把其它片段收集整理后再贴上来分享。 #!usr/bin/env python #coding: utf-8import logging import os.pathDEBUG True TEMPLATE_DEBUG DEBUG HERE os.path.dirname(os.path.abspath(__file__))ADMINS (# (Your Name, your_emailexample.com), )MANAGERS ADMINSDATABASES {default: {ENGINE: django.db.backends.mysql, # Add postgresql_psycopg2, postgresql, mysql, sqlite3 or oracle.NAME: djangodemo, # Or path to database file if using sqlite3.USER: root, # Not used with sqlite3.PASSWORD: , # Not used with sqlite3.HOST: localhost, # Set to empty string for localhost. Not used with sqlite3.PORT: 3306, # Set to empty string for default. Not used with sqlite3.} }# Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. # On Unix systems, a value of None will cause Django to use the same # timezone as the operating system. # If running in a Windows environment this must be set to the same as your # system time zone. TIME_ZONE Asia/Shanghai# Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE zh-cnSITE_ID 1# If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. USE_I18N True# If you set this to False, Django will not format dates, numbers and # calendars according to the current locale USE_L10N TrueMEDIA_ROOT os.path.join(HERE, data).replace(\\,/)STATIC_ROOT os.path.join(HERE, static).replace(\\,/)CAPTCHA_FONTos.path.join(HERE,static/Vera.ttf)# Absolute filesystem path to the directory that will hold user-uploaded files. # Example: /home/media/media.lawrence.com/media/ #MEDIA_ROOT # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash. # Examples: http://media.lawrence.com/media/, http://example.com/media/ MEDIA_URL /media/# Absolute path to the directory static files should be collected to. # Dont put anything in this directory yourself; store your static files # in apps static/ subdirectories and in STATICFILES_DIRS. # Example: /home/media/media.lawrence.com/static/ #STATIC_ROOT # URL prefix for static files. # Example: http://media.lawrence.com/static/ STATIC_URL /static/# URL prefix for admin static files -- CSS, JavaScript and images. # Make sure to use a trailing slash. # Examples: http://foo.com/static/admin/, /static/admin/. ADMIN_MEDIA_PREFIX /static/admin/# Additional locations of static files STATICFILES_DIRS (# Put strings here, like /home/html/static or C:/www/django/static.# Always use forward slashes, even on Windows.# Dont forget to use absolute paths, not relative paths. )# List of finder classes that know how to find static files in # various locations. STATICFILES_FINDERS (django.contrib.staticfiles.finders.FileSystemFinder,django.contrib.staticfiles.finders.AppDirectoriesFinder, # django.contrib.staticfiles.finders.DefaultStorageFinder, )# Make this unique, and dont share it with anybody. #www.iplaypy.com SECRET_KEY 3d5166r)lxd4zc-a$iuw3nkyi99ee4!k3bjhy)ly1i8pc*b9 #UPLOAD SETTINGS FILE_UPLOAD_TEMP_DIR os.path.join(HERE, data/upload/).replace(\\, /) FILE_UPLOAD_HANDLERS (django.core.files.uploadhandler.MemoryFileUploadHandler,django.core.files.uploadhandler.TemporaryFileUploadHandler,) DEFAULT_FILE_STORAGE django.core.files.storage.FileSystemStorage # for user upload ALLOW_FILE_TYPES (.jpg, .jpeg, .gif, .bmp, .png, .tiff) # unit byte ALLOW_MAX_FILE_SIZE 1024 * 1024 # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS (django.template.loaders.filesystem.Loader,django.template.loaders.app_directories.Loader,django.template.loaders.eggs.Loader, )MIDDLEWARE_CLASSES (django.middleware.common.CommonMiddleware,django.contrib.sessions.middleware.SessionMiddleware,django.middleware.csrf.CsrfViewMiddleware,django.contrib.auth.middleware.AuthenticationMiddleware,django.contrib.messages.middleware.MessageMiddleware, )ROOT_URLCONF urlsTEMPLATE_DIRS (os.path.join(HERE,templates), )TEMPLATE_CONTEXT_PROCESSORS ( django.core.context_processors.auth, d 2000 jango.core.context_processors.request,django.core.context_processors.media, ) INSTALLED_APPS (django.contrib.auth,django.contrib.contenttypes,django.contrib.sessions,django.contrib.sites,django.contrib.messages,django.contrib.staticfiles,# Uncomment the next line to enable the admin:django.contrib.admin,# Uncomment the next line to enable admin documentation:django.contrib.admindocs,blog,account,news,photo,rbac, )# A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING {version: 1,disable_existing_loggers: False,handlers: {mail_admins: {level: ERROR,class: django.utils.log.AdminEmailHandler}},loggers: {django.request: {handlers: [mail_admins],level: ERROR,propagate: True,},} } #mail EMAIL_HOST smtp.gmail.com #邮件smtp服务器 EMAIL_PORT 25 #端口 EMAIL_HOST_USER code***gmail.com #邮件账户 EMAIL_HOST_PASSWORD ********* #密码 EMAIL_USE_TLS False Python代码片段之Django静态文件URL的配置 #!usr/bin/env python #coding: utf-8 from django.conf.urls.defaults import patterns, include, url from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover()urlpatterns patterns(,# Examples:# url(r^$, djangodemo.views.home, namehome),# url(r^djangodemo/, include(djangodemo.foo.urls)),# Uncomment the admin/doc line below to enable admin documentation:# url(r^admin/doc/, include(django.contrib.admindocs.urls)),# Uncomment the next line to enable the admin:url(r^$, account.views.index,nameindex),url(r^admin/, include(admin.site.urls)),url(r^blog/, include(blog.urls)),url(r^account/, include(account.urls)),url(r^news/, include(news.urls)),url(r^photo/, include(photo.urls)),url(r^rbac/, include(rbac.urls)),url(r^static/(?Ppath.*)$,django.views.static.serve,{document_root:settings.STATIC_ROOT}),url(r^media/(?Ppath.*)$,django.views.static.serve,{document_root: settings.FILE_UPLOAD_TEMP_DIR}), )
http://www.pierceye.com/news/144767/

相关文章:

  • 网站 云建站设计网站推荐室内
  • 网站怎么自适应屏幕云南建设投资集团网站
  • qq中心官方网站两个网站如何使用一个虚拟主机
  • 泰安网站制作推荐电脑网页游戏排行榜前十名
  • 石家庄最好的网站建设公司上海都有哪些企业公司
  • 网站的链接要怎么做官网制作公司
  • 学生成绩管理系统 网站建设站长之家源码下载
  • wap多用户网站微信端的网站开发python
  • 网络营销中自建网站厦门湖里区建设局网站
  • 公司建设网站的申请信用卡做盗版影视网站违法吗
  • 商务网站推广技巧包括什么移动网站开发教程
  • 北京网站备案域名温州制作网站公司
  • 门户网站建设工作流程做网站的背景图片
  • 用360云盘做网站简洁个人博客网站模板
  • 沈阳网站建设 网络服务wordpress媒体库图片不显示
  • 什么公司做网站出名大商创 多用户商城
  • 学校网站管理网站制作开发及优化是什么
  • wordpress获取所有标签页那些网站用不着做优化
  • 大有网网站现在较为常用的网站开发技术
  • 太原建站公司有哪些网站统计 wordpress
  • 网站轮播图怎么保存盛锡福网站
  • 做网站用百度浏览器网络营销案例分析试题
  • 当建设部门网站南宁网站的优化
  • wordpress访问文件夹成都黑帽seo
  • 上海市建设工程安全质量监督总站网站做配资网站
  • 网站管理建设的需求分析小程序开发教程免费
  • 石家庄网站建设电话重庆最便宜的网站建设
  • 人才网站建设策划书pc网站建设
  • 做网站用哪几个端口 比较好微信营销
  • 网站开发价格有专业做网站的吗网站公司