gae-boilerplate文档 [英] gae-boilerplate documentation

查看:96
本文介绍了gae-boilerplate文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我为App Engine寻找一个良好的社交登录包的过程中,我正在尝试使用gae-boilerplate。但我发现没有文档,除了自述文件,我认为它是不够的。



我有很多问题,其中包括:




  • 应该将样板用作库还是根据需要进行下载和修改?
  • 样板文件应如何更新?

  • 每个模型都做什么?

  • 我的模板应该放在哪里?

  • 路线文件?

  • 我应该从BaseHandler派生我的处理程序吗?

  • 总的来说,我应该在我的页面中实现什么?例如,我发现我必须在所有POST请求中包含一个csrf_token。我很高兴能够提前知道这一点,还有很多其他的事情,我不得不一直找出来,并且我不确定我是否应该这样做。

  • 还有一些...



我最大的问题是社交登录无效,我觉得样板是一个巨大的怪物,我不知道从哪里开始。更糟糕的是,很难从任何不是生产机器的社交认证中进行调试。这就是为什么我拼命寻找一些文档。



我还没有发现任何东西,我想我的情况下一定会有更多的人。所以,任何指向文档的指针都可以帮助理解gae-boilerplate更好一点。非常感谢。

编辑:我在一个站点切换到gae-boilerplate我以前工作过。也许我的大部分问题都来自于我试图整合gae-boilerplate和我现有网站的方式。因此,我试图将gae-templatesplate作为库来处理,并保留自己的模板,处理程序,静态文件等。



谢谢大家!



编辑2:尝试其他选项后,我不得不说我对gae-simpleauth很满意。它的效果非常好,Alex的支持非常棒。

>


  • 样板文件应该用作库还是根据需要进行下载和修改?

    • 您可以根据您的具体要求对其进行修改。


  • 应该更新样板文件吗?

    • 你是什么意思?

      • 用户 SocialUser 非常明显。 LogVisit LogEmail 用于审计目的。
      • >
      • 我的模板应该放在哪里?

        • 在模板目录中


      • 我应该有不同的路线文件吗?

        • 不可以,您可以将现有文件用于您的所有路线。

      • 我应该从 BaseHandler 派生我的处理程序吗?

        • 这不是强制性的,但我会建议这样做。 BaseHandler 非常方便,并且提供了很多好东西。
        • ,我应该在我的页面中执行什么操作?

          • 您的意思是什么?




        一般而言,您可以使用gae-boilerplate作为参考,在其上面您将构建自己的项目。逐步研究代码,试图找出每个文件和库的用途以及它们如何一起工作。这样你就可以获得很多东西,比如jinja模板,oauth2等。



        希望这有助于。


        In my search for a good social login package for App Engine, I am giving gae-boilerplate a try. But I find there is no documentation except the readme file, which I think it is not enough at all.

        I have many questions, among them:

        • Should the boilerplate be used as a library or download and modify as needed?
        • How should the boilerplate be updated?
        • What does each model do?
        • Where should my templates go?
        • Should I have a different routes file?
        • Should I derive my Handlers from BaseHandler?
        • In general, what things should I implement in my pages? For example, I found out that I have to include a csrf_token in all POST requests. It would have been nice to know this in advance, and the many other things that I'm having to find out along the way, and which I implement without being sure if I'm supposed to be doing that.
        • And some more...

        My biggest problem is that Social login is not working, and I feel this boilerplate is a big monster with which I don't know where to start. To make things worse, it is hard to debug social auth from any machine that is not the production one. Thats why I'm desperately looking for some docs.

        I have not found anything in SO, and I guess there must be more people in my situation. So, any pointers to documentation that could help to understand gae-boilerplate a little bit better would be very appreciated.

        EDIT: I switched to gae-boilerplate in a site that I had previously working. Maybe most of my problems come from the way that I have tried to integrate gae-boilerplate and my existing site. As a result I have tried to treat gae-boilerplate as a library, and keep my own templates, handlers, static files and such.

        Thank you guys!

        EDIT 2: After trying other options, I have to say that I am very happy with gae-simpleauth. It works really well, and Alex's support is superb.

        解决方案

        I will try to answer most of your questions below:

        • Should the boilerplate be used as a library or download and modify as needed?
          • You can modify it as needed based on your specific requirements.
        • How should the boilerplate be updated?
          • What do you mean?
        • What does each model do?
          • User and SocialUser are pretty self explanatory. LogVisit and LogEmail are used for auditing purposes.
        • Where should my templates go?
          • In the templates directory
        • Should I have a different routes file?
          • No, you can use the existing file for all your routes.
        • Should I derive my Handlers from BaseHandler?
          • It't not mandatory but I would recommend to do so. BaseHandler is very handy and provides a lot of good stuff.
        • In general, what things should I implement in my pages?
          • What exactly do you mean?

        In general, you can use gae-boilerplate as a reference on top of which you will built your own project. Study the code step by step, try to figure out what is the purpose of each file and library used and how they work together. This way you will gain good knowledge of a lot of things like jinja templating, oauth2, etc.

        Hope this helps.

        这篇关于gae-boilerplate文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆