小编Kin*_*Guy的帖子

尽管存在不安全因素,但流媒体更新访问被拒绝

我安装了不安全的软件包,但是我在客户端控制台中获得了以下内容:

Meteor.user()
Object {_id: "4Dyaa5wRmxmq7j7XF", profile: Object, services: Object}_id: "4Dyaa5wRmxmq7j7XF"profile: Objectname: "Mel Oug"__proto__: Objectservices: Objectfacebook: Object__proto__: Object__proto__: Object__defineGetter__: function __defineGetter__() { [native code] }__defineSetter__: function __defineSetter__() { [native code] }__lookupGetter__: function __lookupGetter__() { [native code] }__lookupSetter__: function __lookupSetter__() { [native code] }constructor: function Object() { [native code] }hasOwnProperty: function hasOwnProperty() { [native code] }isPrototypeOf: function isPrototypeOf() { [native code] }propertyIsEnumerable: function propertyIsEnumerable() { [native code] }toLocaleString: function toLocaleString() { [native code] }toString: function toString() { [native code] }valueOf: function valueOf() …
Run Code Online (Sandbox Code Playgroud)

javascript authentication mongodb meteor

4
推荐指数
1
解决办法
651
查看次数

Django dateutil ISO 8601没有'读'属性错误

我在Django视图中将日期时间转换为ISO 8601以推送到Facebook页面事件.我尝试过datetime.strptime但是遵循最佳建议我选择了:

    eventdate = event.date
    print eventdate
    date_iso = dateutil.parser.parse(eventdate)
Run Code Online (Sandbox Code Playgroud)

我打印时,eventdate在控制台中看起来像这样,2013-06-18 02:50:00但在我得到之前它没有进一步:

Django Version: 1.4.1
Exception Type: AttributeError
Exception Value:    
'datetime.datetime' object has no attribute 'read'
Exception Location: /Users/mirth/.virtualenvs/ssc/lib/python2.7/site-packages/dateutil/parser.py in get_token, line 72
Python Executable:  /Users/mirth/.virtualenvs/ssc/bin/python
Python Version: 2.7.2
Python Path:    
['/Users/mirth/code/django/ssc',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7/site-packages/requests/packages',
 '/Users/mirth/code/django/ssc/main',
 '/Users/mirth/code/django/ssc/main/../',
 '/Users/mirth/code/django/ssc',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg',
 '/Users/mirth/.virtualenvs/ssc/lib/python27.zip',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7/plat-darwin',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7/plat-mac',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7/plat-mac/lib-scriptpackages',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7/lib-tk',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7/lib-old',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7/lib-dynload',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7/site-packages',
 '/Users/mirth/.virtualenvs/ssc/lib/python2.7/site-packages/PIL']
Run Code Online (Sandbox Code Playgroud)

这可能是什么?谢谢

python django iso8601 python-dateutil

3
推荐指数
1
解决办法
1510
查看次数

Meteor简单模式数组应该没有defaultValue

我有一个表格供人们创建一个事件,以后会有成员,但不是在创建时.创建事件时,不应添加任何成员,因此autoform不显示任何成员字段:

createEvent.jade

template(name="createEvent")
  +quickForm(collection="Events" id="createEventForm" type="insert" fields="name,description,location")
Run Code Online (Sandbox Code Playgroud)

对于要提交的表单,我相信我必须确保Events集合中所有必填字段都有值,即使不是表单.表单将不会提交(提交按钮无效,我正在检查minimongol以确保没有记录条目)即使我已经尝试添加defaultValue:

  crew: {
    type: [String],
    label: "Crew",
    defaultValue: ""
  },
Run Code Online (Sandbox Code Playgroud)

autoValue将创建者添加为成员:

  crew: {
    type: [String],
    label: "Crew",
    autoValue: function() {
      return this.userId;
    },
  },
Run Code Online (Sandbox Code Playgroud)

我在一分钟前遇到这个问题,默认情况下没有表单字段设置事件创建者,现在它可以工作:

  host: {
    type: String,
    label: "Host",
    autoValue: function() {
      return this.userId;
    },
  },
Run Code Online (Sandbox Code Playgroud)

但我不能得到这个基于数组的默认值.我也试过defaultValue: "['']"了一些其他人.坚持到现在,请帮忙..

javascript meteor meteor-autoform meteor-collection2

3
推荐指数
1
解决办法
2740
查看次数

为什么我的Bootstrap CSS div不能很好地堆叠?

我在Bootstrap遇到了麻烦,这里有些人似乎都知道.我根据基本的"行"类网格约定设置了以下两个div,但是当我减小浏览器屏幕的大小时,它们没有按预期堆叠.他们只是保持固定.

更新:

当我链接到bootstrap-responsive.css文件时,Bootstrap变得响应,如下所示.

但是,这些盒子超出了我预期和设置的最大网格尺寸(即原始安装中出现的默认值为940px,我再次通过LESS再次编译它来重新确认).而且,它实际上超出了浏览器窗口的最右侧范围.Chrome浏览器的屏幕截图(17.0.963.56)(截图中的开发者工具中可见更多标记):

http://static.inky.ws/image/1457/image.jpg

无论是否包含以下内容都会发生这种情况

也许我以错误的方式使用bootstrap,但是我希望它能够响应所选的div(被归类为"row","spanX"等),但要停留在我选择的最大网格宽度上,并且至少要停在远处的窗户!

再次感谢您的时间,马特

HTML:

<div class="row-fluid"><!-- Intro begin -->
    <div class="span6">
        <p style="font-size: 18px;">
            <strong><span style="font-size: 20px;">Mingo makes it easy to share food with other people in your area.</span></strong>
        </p>
    </div>

    <div class="span6">
        <!--<img src="{{STATIC_URL}}images/pics/how_it_works.png" width="350px" style="margin-right: 20px;" />-->
        <div style="background-color: #E7F5DF; height: 250px; padding: 8px; border-radius: 8px;">
            <ul class="nav nav-pills" style="float: right;">
                <li class="active"><a href="#">How it works</a></li>
                <li><a href="#">Save time, save money</a></li>
            </ul>
            <div style="width: 99.5%; height: 87.5%; background-color: #c6e3b6; margin: 9.5% 0 0; …
Run Code Online (Sandbox Code Playgroud)

css twitter-bootstrap

1
推荐指数
1
解决办法
4540
查看次数

带 wagtail 的 Django 调试工具栏 404

我正在努力开始django-debug-toolbar工作。我已按照安装步骤进行操作,并获得了包含统计信息的侧边栏(例如 2.75 毫秒内的 SQL 1 查询、使用的静态文件 19 个文件、12 个信号的 30 个接收器),这些统计信息似乎是合法的并表明其正在工作。

但是,当我在给定选项卡上单击“获取更多信息”时,我会在浏览器中收到 404 错误,并在控制台中收到此类信息:

"GET /__debug__/render_panel/?store_id=ac74875cfe864b2dab4c6d17c1d1ed5d&panel_id=RequestPanel HTTP/1.1" 404 1791"
Run Code Online (Sandbox Code Playgroud)

网站上的其他页面可以正常工作。

我尝试过各种配置urls.py。这是我目前拥有的:

from __future__ import absolute_import, unicode_literals

from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin

from wagtail.wagtailadmin import urls as wagtailadmin_urls
from wagtail.wagtailcore import urls as wagtail_urls
from wagtail.wagtaildocs import urls as wagtaildocs_urls

from search import views as search_views

urlpatterns = [
    url(r'^django-admin/', include(admin.site.urls)),

    url(r'^admin/', include(wagtailadmin_urls)),
    url(r'^documents/', include(wagtaildocs_urls)),

    url(r'^search/$', search_views.search, …
Run Code Online (Sandbox Code Playgroud)

django debugging django-debug-toolbar wagtail

1
推荐指数
1
解决办法
930
查看次数