Best Django features that do work on Google App Engine?

后端 未结 4 1933
我寻月下人不归
我寻月下人不归 2021-02-06 13:11

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

Many features of Django don\'t work on Google App Engine: the ad

相关标签:
4条回答
  • 2021-02-06 13:40

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

    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.

    Just get Appengine-Patch and try it.

    0 讨论(0)
  • 2021-02-06 13:40

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

    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 ...

    0 讨论(0)
  • 2021-02-06 13:56

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

    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.)

    0 讨论(0)
  • 2021-02-06 13:58

    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.

    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.

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

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

    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.

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

    To name few (which sound interesting to me):

    • Google Analytics DJango Middleware
    • YUI Loader as Django middleware
    • Django domain redirect middleware
    • ForceHTTPS Django middleware etc...

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

    Search for more, you will find more.

    0 讨论(0)
提交回复
热议问题