问题标签 [django-nonrel]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
7899 浏览

google-app-engine - 在 django-nonrel 中创建超级用户

我是一个新手,一直在学习 django-nonrel 教程,并在 Google App Engine 中设置了 django-nonrel。

我现在正在尝试使用以下方法创建超级用户:

manage.py createsuperuser --username=joe --email=joe@example.com

我明白了

未知命令:'createsuperuser' 输入
'manage.py help' 以供使用

当我键入 manage.py help 时,我没有看到 createsuperuser 列出。

帮助。

0 投票
1 回答
1795 浏览

google-app-engine - Google App Engine 中的 Django-nonrel 管理员超级用户

我有一个 Django 应用程序,我为其创建了一个超级用户帐户,因此我可以登录 django-admin。

这适用于本地(我可以登录)。

如何在 Google App Engine 上的 appspot.com 帐户上创建超级用户?

0 投票
1 回答
1092 浏览

django-admin - 在 django-nonrel 上使用 django-admin,使用 App Engine 模型

我正在为 Google App Engine 创建一个 Django 应用程序。我正在使用 django-nonrel 但正在使用 Google App Engine 模型。

我也想使用 Django 的管理站点。

我的航空公司应用程序的models.py是:

我的admin.py是:

我做 GAE runserver 并得到以下错误:

我不能在django-nonrel admin 中使用 Google App Engine 模型吗?

0 投票
1 回答
1213 浏览

python - App Engine / Python / Django non-rel over JSON 上的身份验证

我正在 Google App Engine 上构建一个站点,运行 python 和 Django non-rel。一切都适用于 HTML 和发布/阅读数据。但是随着我的前进,我希望使用 AJAX 进行许多更新,最终还会通过 Android 和 iPhone 等移动设备进行更新。

我的页面使用 django non-rel 并且我的登录/注销身份验证非常适合 HTML。但是通过 JSON 发送的更新信息必须经过身份验证,用户才能进行更改。我知道只对 AJAX 调用进行身份验证不会太困难,因为您仍在访问网站,但是在进行手机身份验证时呢?

所以我是新手,我从哪里开始?

如何在 gae 上设置服务,以便进行经过身份验证的 CRUD 操作?理想情况下,我想为 ajax、android 等使用完全相同的 REST 服务。

0 投票
1 回答
1562 浏览

django - Google App Engine 上的 django-nonrel - 使用 ListField 进行多对多的含义

我正在开发一个 Google App Engine 应用程序,我在这方面相对较新。

我已经在 Django 中构建了一个应用程序,并且有一个使用 ManyToMany 字段类型的模型。

我知道 django-nonrel 不支持 Django 的多对多字段类型。所以我正在考虑改用 ListField 。

问题:
- 使用 ListField 代替 ManyToMany 有何含义?
- 我知道这意味着无法使用 Django 的 JOIN API。但这对我的应用意味着什么?- 在多对多领域中进行搜索时,我会遇到问题吗?

抱歉,如果这些是编程 101 问题。我是一名试图了解开发的设计师。

谢谢

0 投票
4 回答
2811 浏览

google-app-engine - Google App Engine ListField 中的 Django-nonrel

我正在尝试使用 django-nonrel 在 Google App Engine 中构建示例应用程序。并且在将 ListField 属性实现到模型中时遇到问题。

我创建了一个应用程序test_model并将其作为已安装的应用程序包含在我的设置中。model.py 是:

上面的例子给了我:
AttributeError:'module' object has no attribute 'Model'

如果我注释掉 djangotoolbox 导入,我会得到以下信息:
AttributeError: 'module' object has no attribute 'ListField'

我在这里做错了什么?我似乎找不到任何关于如何在 django-nonrel 中使用 ListField 的文档。那是因为它应该很明显吗?

0 投票
2 回答
1867 浏览

google-app-engine - Django-nonrel ≤1.3 和 Google App Engine 上的 Memcache

我是一名设计师,仍在尝试在 Google App Engine 中编写我的第一个应用程序作为实验。

我已经到了要设置 memcache 以按照以下说明缓存整个站点的地步:http: //docs.djangoproject.com/en/dev/topics/cache/#memcached

我很清楚我需要在我的 settings.py 中添加以下内容:

进而:

这可能是一个非常愚蠢的问题,但我的 IP 地址和端口对于我的谷歌应用引擎网站来说是什么?由于它托管在 Google 上,我需要考虑什么吗?

我怎么会发现

0 投票
1 回答
404 浏览

google-app-engine - django-nonrel google app engine order_by('?')

I am working on a django-nonrel app in Google App Engine.

I am trying to return items from a database in a random order. So I might have 100 items in my Items model. I wish to return a random selection of 20 items.

I have tried using:

Except I get the following error:

I take it this is a limitation of django-nonrel on GAE?

Is there an alternative method I could use for django-nonrel on GAE to get the same effect?

0 投票
2 回答
555 浏览

google-app-engine - 使用 django non-rel 在 GAE 上不区分大小写的 order_by

使用 google app engine 和 Django non-rel,我正在查询电影列表并希望按字母顺序排列它们。

问题在于任何不以大写字符开头的标题都没有遵循相同的排序模式。

因此,如果查询这些电影并将它们排序返回,则“iRobot”不会介于蝙蝠侠和 Zoolander 之间:

  1. 世界末日
  2. 蝙蝠侠
  3. 动物园人
  4. 我是机器人

如何让他们执行不区分大小写的 order_by?

谢谢

0 投票
2 回答
405 浏览

python - Django 框架测试失败

我正在使用 django-nonrel。当我运行manage.py test仅包含一个非常简单的用户定义测试的项目时,我在输出中收到以下错误。有没有人见过这个?我需要做些什么来解决问题才能test_shortcut_view (django.contrib.contenttypes.tests.ContentTypesTests)成功?