小编inl*_*ger的帖子

如何只检索新数据?

我正在尝试为我的网站管理员创建简单的通知系统,我只需要向每个管理员用户发送实时消息.但是当我使用firebase时,它会在每个页面上加载旧数据,并且用户可以看到来自数据库的所有消息.如果我设置limit(1),用户将在每个页面重新加载时看到最后一个通知:

var eventsList = new Firebase('https://*****-messages.firebaseio.com/');

eventsList.on('child_added', function(message) {
    var message = message.val();
    $.notification(message.message);
});
Run Code Online (Sandbox Code Playgroud)

如何在没有旧通知历史的情况下仅加载新邮件?

firebase

22
推荐指数
2
解决办法
2万
查看次数

如何用Django表单保存html数组?

我有一些html表单,其中包含以下字段:

<input type="text" name="input[]">
<input type="text" name="input[]">
<input type="text" name="input[]">
<input type="text" name="input[]">
Run Code Online (Sandbox Code Playgroud)

我如何用django表单保存这个表单?

django-forms

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

如何跳过特定模型的Django admin中的删除确认页面?

我有一个包含大量数据的模型,Django 创建删除确认页面很长时间。我必须跳过这个过程并在没有任何确认的情况下删除数据。我尝试了一些来自互联网的解决方案,但它不起作用 - 我仍然看到确认页面。

有谁知道怎么做?

python django

5
推荐指数
2
解决办法
1881
查看次数

从Python脚本解析PHP文件变量

我需要从我的Python脚本中获取PHP(Wordpress)配置文件中的一些数据.我如何解析配置数据?例如,我如何获得$ wp_version值?配置示例:

/**
 * The WordPress version string
 *
 * @global string $wp_version
 */
$wp_version = '3.5.1';

/**
 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
 *
 * @global int $wp_db_version
 */
$wp_db_version = 22441;

/**
 * Holds the TinyMCE version
 *
 * @global string $tinymce_version
 */
$tinymce_version = '358-23224';

/**
 * Holds the required PHP version
 *
 * @global string $required_php_version
 */
$required_php_version = '5.2.4';

/**
 * Holds the …
Run Code Online (Sandbox Code Playgroud)

php python regex

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

标签 统计

python ×2

django ×1

django-forms ×1

firebase ×1

php ×1

regex ×1