djangae | best way to run Django

 by   potatolondon Python Version: 2.0.0rc4 License: BSD-3-Clause

kandi X-RAY | djangae Summary

kandi X-RAY | djangae Summary

djangae is a Python library. djangae has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has high support. You can install using 'pip install djangae' or download it from GitHub, PyPI.

The best way to run Django on Google Cloud. Djangae (djan-gee) is a Django app that allows you to run Django applications on the Google Cloud platform, including (if you want to) using Django's models with Google Cloud Datastore as the underlying database. :earth_africa:  Website  |   :computer:  GitLab  |   :closed_book:   Docs  |   :busts_in_silhouette:  Google Group.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              djangae has a highly active ecosystem.
              It has 588 star(s) with 135 fork(s). There are 32 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              djangae has no issues reported. On average issues are closed in 186 days. There are 10 open pull requests and 0 closed requests.
              OutlinedDot
              It has a negative sentiment in the developer community.
              The latest version of djangae is 2.0.0rc4

            kandi-Quality Quality

              djangae has 0 bugs and 0 code smells.

            kandi-Security Security

              djangae has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              djangae code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              djangae is licensed under the BSD-3-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              djangae releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              djangae saves you 51672 person hours of effort in developing the same functionality from scratch.
              It has 59889 lines of code, 5741 functions and 630 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed djangae and discovered the below as its top functions. This is intended to give you an instant insight into djangae implemented functionality, and help decide if they suit your requirements.
            • Handler for oauth2 login
            • Create a Google OAuth2 session
            • Calculate the token s expiration time
            • Authenticate the user
            • Generate a unique username
            • Validate an IAP JWT
            • Find the atomic decorator
            • Process a single shard iteration
            • Define a callable object
            • Load the user
            • Authenticate a user
            • Handler for local IAP login
            • Generate shards for each shard
            • Returns a new Secrets instance for the given secrets class
            • Acquire a lock
            • Return task location
            • Generates a random string
            • Get bucket name
            • Wrap http url logging
            • Decorator to remove middleware
            • Return a new secrets instance
            • A view decorator for views
            • Handler for deferred requests
            • Create required queues
            • Decorator for view decorator
            • Fetch a single page from the datastore
            Get all kandi verified functions for this library.

            djangae Key Features

            No Key Features are available at this moment for djangae.

            djangae Examples and Code Snippets

            No Code Snippets are available at this moment for djangae.

            Community Discussions

            QUESTION

            Djangae Gauth integration
            Asked 2019-Mar-10 at 04:17

            I'm following the "Gauth authentication" portion of Djangae's documentation but I'm running into some unexpected behavior.

            I've configured urls.py and settings.py as specified by the documentation (the current settings are mostly a result of using the Djangae Scaffold) but at no point are users prompted to authenticate using or link their Google account. I've tried un/setting DJANGAE_CREATE_UNKNOWN_USER but this has no impact.

            I've also tried running commands inspired by sitepackages/prod/djangae/contrib/gauth/tests.py in my local shell in order to verify that the back-end configuration is correctly configured and that users can actually be authenticated against AppEngineUserAPIBackend but that fails because my User model (djangae.contrib.gauth_datastore.models.GaeDatastoreUser) seems to be missing required attributes: AttributeError: 'GaeDatastoreUser' object has no attribute 'user_id'.

            So, am I misunderstanding how this is all supposed to work and must take some additional steps to get Google Sign-In working? Or have I (likely) misconfigured my application? (I'm happy to include genericized versions of my config, but as I said, they've come directly from Djangae Scaffold or the documentation.)

            UPDATE: Interestingly, if I remove the --headless flag from my Behavior suite config, I see the expected behavior. The browser (Chrome) is being redirected to https://accounts.google.com/Login?continue=http%3A%2F%2Flocalhost%3A8080%2F

            Environment:

            Djangae (0.9.11)

            Django (1.11.19)

            ...

            ANSWER

            Answered 2019-Mar-10 at 04:17

            It turns out that this is the expected behavior. In the local sandbox, users are prompted for an email address and (by default) a "user" is created for them and they are automatically logged in.

            From App Engine's "Users Python API Overview" document:

            Google accounts and the development server

            The development server simulates the Google Accounts system using a dummy sign-in screen. When your application calls the Users API to get the URL for the sign-in screen, the API returns a special development server URL that prompts for an email address, but no password. You can type any email address into this prompt, and the app will behave as if you are signed in with an account with that address.

            The dummy sign-in screen also includes a checkbox that indicates whether the dummy account is an administrator; that is, whether the account has the the Viewer, Editor, or Owner primitive role, or the App Engine App Admin predefined role. If you check this box, the app will behave as if you are signed in using an administrator account.

            Similarly, the Users API returns a sign-out URL that cancels the dummy sign-in.

            The unique ID for a User object in the development server is calculated from the email address. Two unique email addresses always represent two unique users in the development server.

            Personally, I think this design is very flawed. I don't know what Google thinks about the Twelve Factor manifesto, but this behavior is a flagrant violation of article 10 (Dev/Prod Parity), which is summarized as "Keep development, staging, and production as similar as possible". I see no reason why the full auth/redirect flow wouldn't work in the local sandbox and, at the very least, users should be able to opt into it. (I would love to find out that this is an option.)

            The most concerning part about this conditional behavior is that the user object's API is different, which is why I was seeing the error mentioned in my question ('GaeDatastoreUser' object has no attribute 'user_id'). The local user also has no nickname method.

            Source https://stackoverflow.com/questions/55069209

            QUESTION

            Unable to redirect traffic using Djangae
            Asked 2019-Feb-13 at 18:42

            I am attempting to use djangae to serve static files only. In addition, I want to route all traffic to an index.html. When I visit http://localhost:8000 I get a 500 error. When I visit http://localhost:8000/static/index.html, I get the correct file.

            What am I doing wrong?

            My urlpatterns are as follows:

            ...

            ANSWER

            Answered 2019-Feb-13 at 18:42

            I have discovered a work around in this particular aspect. I moved the zone.tab file to / and edited my app.yaml to include this environment variable: PYTZ_TZDATADIR: .

            Still unsure why pytz needs to be called before a route is completed.

            Source https://stackoverflow.com/questions/54659032

            QUESTION

            Django rest framework import error in on django.test.client
            Asked 2017-Mar-07 at 00:22

            I'm using google app engine dev server for python running on mac os. The project I'm running is an appengine django project using djangae and django rest framework.

            Everything in the project works fine, however as soon as a declare an import relating to the rest_framework I get an error regarding django.test.client eventhough I'm not running any tests at the moment.

            The import I try to do is 'from rest_framework.decoraters import api_view', as soon as I make this import or any other import relating to the rest framework.

            This is the error I get with every import I make that involves the rest framework.

            ...

            ANSWER

            Answered 2017-Mar-07 at 00:22

            If you run into import errors like this on app engine be sure to check your skip_files in app.yaml.

            For example:

            Source https://stackoverflow.com/questions/42483422

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install djangae

            You can install using 'pip install djangae' or download it from GitHub, PyPI.
            You can use djangae like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install djangae

          • CLONE
          • HTTPS

            https://github.com/potatolondon/djangae.git

          • CLI

            gh repo clone potatolondon/djangae

          • sshUrl

            git@github.com:potatolondon/djangae.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link