最适合在Google App Engine上运行的Django功能?

时间:2020-11-27 02:16:44

I'm in the process of starting a new project on App Engine and Brandon's advice made me think.

我正在开发一个关于App Engine的新项目,而Brandon的建议让我想到了。

Many features of Django don't work on Google App Engine: the admin interface and the modeling framework for example.

Django的许多功能在Google App Engine上不起作用:例如管理界面和建模框架。

Considering that App Engine already has a simple framework built-in ("webapp") and I can freely pick from the many Python templating solutions (including Django's) without tying myself to a relatively heavy weight (but in this case neutered) framework what are the top features that I would miss the most if I don't go with Django?

考虑到App Engine已经内置了一个简单的框架(“webapp”),我可以从许多Python模板解决方案(包括Django)中*选择,而不需要将自己与相对较重的(但在这种情况下为neutered)框架相关联。如果我不使用Django,我会最想念的*功能?

Background: I only have minimal Django experience and I'm considering using Mako templates (for speed).

背景:我只有最小的Django经验,我正在考虑使用Mako模板(速度)。

4 个解决方案

#1


6  

The main differences is what you already know that it does not support Admin and Django's (excellent) ORM ofcourse. This isn't surprising, though, since Google's own Datastore API is excellent. And you don't have to learn GQL to play with it.

主要区别在于您已经知道它不支持Admin和Django(优秀)ORM ofcourse。不过,这并不奇怪,因为谷歌自己的数据存储API非常出色。而且您不必学习GQL来使用它。

But using Django means that you can take advantage of more existing functionality (Django middleware, etc.) and, should you want to move away from Google App Engine in the future, there will be less code to rewrite.

但是使用Django意味着您可以利用更多现有功能(Django中间件等),如果您希望将来远离Google App Engine,将会有更少的代码需要重写。

Also Google released the Google App Engine Helper for Django which can be helpful to you in setting GAE Django app.

Google也发布了适用于Django的Google App Engine Helper,它可以帮助您设置GAE Django应用程序。

So, i would rather go for Google App Engine applications using Django instead of pure webapp.

所以,我宁愿选择使用Django而不是纯webapp的Google App Engine应用程序。

Edit on Request: Django's existing functionality i mentioned, can be taken in terms of many useful applications and mostly middlewares being developed by a huge DJango Community day by day.

根据请求编辑:我提到的Django现有的功能,可以用于许多有用的应用程序,并且大多数是由巨大的DJango社区每天开发的中间件。

Apart from useful Built-in-Middlewares provided by DJango itself, there are many others which can suite few specific usage too.

除了由DJango本身提供的有用的内置中间件之外,还有许多其他可以包含少量特定用途的中间件。

To name few (which sound interesting to me):

仅举几例(这对我来说很有趣):

And to play with them efficiently "Conditional middleware execution in Django" can be handy.

并且有效地使用它们“Django中的条件中间件执行”可以很方便。

Search for more, you will find more.

搜索更多,你会发现更多。

#2


2  

It seems the admin interface is getting support with app-engine-patch 1.0beta (link to announcement).

似乎管理界面正在获得app-engine-patch 1.0beta的支持(链接到公告)。

To me this is probably the best feature in Django. (Although I'll have to see how it works in App Engine's no-joins world.)

对我而言,这可能是Django中最好的功能。 (虽然我必须看看它在App Engine的无连接世界中是如何工作的。)

#3


0  

At the time of writing most of the django features been ported over to GAE with the help Google Appengine Patch project.

在撰写本文时,大多数django功能已通过Google Appengine Patch项目移植到GAE。

The main which wasn't yet is Django's model support, you have to use GAE db models. But it doesn't hurt that much.

还没有的主要是Django的模型支持,你必须使用GAE db模型。但它并没有那么大的伤害。

Just get Appengine-Patch and try it.

只需获得Appengine-Patch并尝试一下。

#4


-4  

Do yourself a favour and don't touch app engine.

帮自己一个忙,不要触摸app引擎。

If or rather when google changes the rules your time and effort invested in engineering the app will be lost. It (AppEngine) is propriety if you don't like something about it you've effectively lost your investment. You can't just take your app and run it somewhere else. Google isn't a charity - they will change the rules because they can with their concerns above small insignificant you. It's the worst kind of lockin ...

如果或者更确切地说当Google更改规则时,您投入到工程设计中的时间和精力将会丢失。它(AppEngine)是适当的,如果你不喜欢它,你实际上已经失去了你的投资。你不能只拿你的应用程序并在其他地方运行它。谷歌不是一个慈善机构 - 他们会改变规则,因为他们可以将他们的关注点放在小的微不足道的上面。这是最糟糕的锁定......

#1


6  

The main differences is what you already know that it does not support Admin and Django's (excellent) ORM ofcourse. This isn't surprising, though, since Google's own Datastore API is excellent. And you don't have to learn GQL to play with it.

主要区别在于您已经知道它不支持Admin和Django(优秀)ORM ofcourse。不过,这并不奇怪,因为谷歌自己的数据存储API非常出色。而且您不必学习GQL来使用它。

But using Django means that you can take advantage of more existing functionality (Django middleware, etc.) and, should you want to move away from Google App Engine in the future, there will be less code to rewrite.

但是使用Django意味着您可以利用更多现有功能(Django中间件等),如果您希望将来远离Google App Engine,将会有更少的代码需要重写。

Also Google released the Google App Engine Helper for Django which can be helpful to you in setting GAE Django app.

Google也发布了适用于Django的Google App Engine Helper,它可以帮助您设置GAE Django应用程序。

So, i would rather go for Google App Engine applications using Django instead of pure webapp.

所以,我宁愿选择使用Django而不是纯webapp的Google App Engine应用程序。

Edit on Request: Django's existing functionality i mentioned, can be taken in terms of many useful applications and mostly middlewares being developed by a huge DJango Community day by day.

根据请求编辑:我提到的Django现有的功能,可以用于许多有用的应用程序,并且大多数是由巨大的DJango社区每天开发的中间件。

Apart from useful Built-in-Middlewares provided by DJango itself, there are many others which can suite few specific usage too.

除了由DJango本身提供的有用的内置中间件之外,还有许多其他可以包含少量特定用途的中间件。

To name few (which sound interesting to me):

仅举几例(这对我来说很有趣):

And to play with them efficiently "Conditional middleware execution in Django" can be handy.

并且有效地使用它们“Django中的条件中间件执行”可以很方便。

Search for more, you will find more.

搜索更多,你会发现更多。

#2


2  

It seems the admin interface is getting support with app-engine-patch 1.0beta (link to announcement).

似乎管理界面正在获得app-engine-patch 1.0beta的支持(链接到公告)。

To me this is probably the best feature in Django. (Although I'll have to see how it works in App Engine's no-joins world.)

对我而言,这可能是Django中最好的功能。 (虽然我必须看看它在App Engine的无连接世界中是如何工作的。)

#3


0  

At the time of writing most of the django features been ported over to GAE with the help Google Appengine Patch project.

在撰写本文时,大多数django功能已通过Google Appengine Patch项目移植到GAE。

The main which wasn't yet is Django's model support, you have to use GAE db models. But it doesn't hurt that much.

还没有的主要是Django的模型支持,你必须使用GAE db模型。但它并没有那么大的伤害。

Just get Appengine-Patch and try it.

只需获得Appengine-Patch并尝试一下。

#4


-4  

Do yourself a favour and don't touch app engine.

帮自己一个忙,不要触摸app引擎。

If or rather when google changes the rules your time and effort invested in engineering the app will be lost. It (AppEngine) is propriety if you don't like something about it you've effectively lost your investment. You can't just take your app and run it somewhere else. Google isn't a charity - they will change the rules because they can with their concerns above small insignificant you. It's the worst kind of lockin ...

如果或者更确切地说当Google更改规则时,您投入到工程设计中的时间和精力将会丢失。它(AppEngine)是适当的,如果你不喜欢它,你实际上已经失去了你的投资。你不能只拿你的应用程序并在其他地方运行它。谷歌不是一个慈善机构 - 他们会改变规则,因为他们可以将他们的关注点放在小的微不足道的上面。这是最糟糕的锁定......