Пример #1
0
    def get(self):
        """Render the login page, including the login form."""
        self._redirect_if_logged_in()

        return {
            "form": self.form.render(LoginSchema.default_values(self.request))
        }
Пример #2
0
    def test_default_values_prefills_username_from_username_query_param(
            self, pyramid_request, params, value):
        pyramid_request.params = params

        assert LoginSchema.default_values(pyramid_request)["username"] == value