Did I find the right examples for you? yes no

All Samples(124)  |  Call(124)  |  Derive(0)  |  Import(0)

src/i/o/ionyweb-0.3/ionyweb/administration/actions/views.py   ionyweb(Download)
            return self.render_to_response_with_refresh(relation_id,
                                                        app_obj,
                                                        msg=MESSAGES.get('item_creation_success', ''))
 
        else:
            extra_context = {'form': form,
                             'add': True}
            return self.render_to_response(self.get_context_data(**extra_context),
                                           status_code=status.HTTP_400_BAD_REQUEST,
                                           msg=MESSAGES.get('invalid_data', ''))
                    # The absolute url object was changed, so reload page
                    response = Response(status.HTTP_202_ACCEPTED,
                                        {"msg": MESSAGES.get('redirection', ""),
                                         'location': obj_abs_url_after_edit})
                    return self.render(response)
 
            # Response with refresh placeholder
            return self.render_to_response_with_refresh(relation_id,
                                                        app_obj,
                                                        msg=MESSAGES.get('item_edit_success', ''))
            return self.render_to_response(self.get_context_data(**extra_context),
                                           status_code=status.HTTP_400_BAD_REQUEST,
                                           msg=MESSAGES.get('invalid_data', ''))
 
    def delete(self, request, relation_id, app_obj, object_pk, *args, **kwargs):

src/i/o/ionyweb-HEAD/ionyweb/administration/actions/views.py   ionyweb(Download)
            return self.render_to_response_with_refresh(relation_id,
                                                        app_obj,
                                                        msg=MESSAGES.get('item_creation_success', ''))
 
        else:
            extra_context = {'form': form,
                             'add': True}
            return self.render_to_response(self.get_context_data(**extra_context),
                                           status_code=status.HTTP_400_BAD_REQUEST,
                                           msg=MESSAGES.get('invalid_data', ''))
                    # The absolute url object was changed, so reload page
                    response = Response(status.HTTP_202_ACCEPTED,
                                        {"msg": MESSAGES.get('redirection', ""),
                                         'location': obj_abs_url_after_edit})
                    return self.render(response)
 
            # Response with refresh placeholder
            return self.render_to_response_with_refresh(relation_id,
                                                        app_obj,
                                                        msg=MESSAGES.get('item_edit_success', ''))
            return self.render_to_response(self.get_context_data(**extra_context),
                                           status_code=status.HTTP_400_BAD_REQUEST,
                                           msg=MESSAGES.get('invalid_data', ''))
 
    def delete(self, request, relation_id, app_obj, object_pk, *args, **kwargs):

src/i/o/ionyweb-0.3/ionyweb/administration/views/website.py   ionyweb(Download)
            site = form.save()
            request.website.ndds.add(site)
            response = Response(status.HTTP_200_OK, {'msg': MESSAGES.get('item_creation_success', "")})
        else:
            html = render_to_string('administration/website/domain.html',
            response = Response(status.HTTP_400_BAD_REQUEST,
                                {"html": html,
                                 'msg': MESSAGES.get('default_error', "")})
        return self.render(response)
 
            if form.is_valid():
                form.save()
                response = Response(status.HTTP_200_OK, {'msg': MESSAGES.get('item_edit_success', "")})
            else:
                html = render_to_string('administration/website/domain.html',
                response = Response(status.HTTP_400_BAD_REQUEST,
                                    {"html": html,
                                     'msg': MESSAGES.get('default_error', "")})
        return self.render(response)
 
        if request.website.domain == domain:
            response = Response(status.HTTP_400_BAD_REQUEST,
                                {'msg': MESSAGES.get('default_error', "")})
        else:
            domain.delete()

src/i/o/ionyweb-0.3/ionyweb/administration/views/plugin.py   ionyweb(Download)
            except ContentType.DoesNotExist:
                raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                    {'msg': MESSAGES.get('default_error', "")})
        # Bad parameters => 400
        else:
            raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                {'msg': MESSAGES.get('default_error', "")})
            except ContentType.DoesNotExist:
                raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                    {'msg': MESSAGES.get('default_error', "")})
 
            PluginClass     = content_type.model_class()
                # Sending response
                response = Response(status.HTTP_200_OK,
                                    {'msg': MESSAGES.get('item_edit_success', ''),
                                     'html': html_rendering,
                                     'layout_section_slug': layout_section_slug,
                                       context_instance=RequestContext(request))
                raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                    {'msg': MESSAGES.get('invalid_data', ""),
                                     'html': html})
        # Bad parameters => 400 BAD REQUEST

src/i/o/ionyweb-HEAD/ionyweb/administration/views/website.py   ionyweb(Download)
            site = form.save()
            request.website.ndds.add(site)
            response = Response(status.HTTP_200_OK, {'msg': MESSAGES.get('item_creation_success', "")})
        else:
            html = render_to_string('administration/website/domain.html',
            response = Response(status.HTTP_400_BAD_REQUEST,
                                {"html": html,
                                 'msg': MESSAGES.get('default_error', "")})
        return self.render(response)
 
            if form.is_valid():
                form.save()
                response = Response(status.HTTP_200_OK, {'msg': MESSAGES.get('item_edit_success', "")})
            else:
                html = render_to_string('administration/website/domain.html',
                response = Response(status.HTTP_400_BAD_REQUEST,
                                    {"html": html,
                                     'msg': MESSAGES.get('default_error', "")})
        return self.render(response)
 
        if request.website.domain == domain:
            response = Response(status.HTTP_400_BAD_REQUEST,
                                {'msg': MESSAGES.get('default_error', "")})
        else:
            domain.delete()

src/i/o/ionyweb-HEAD/ionyweb/administration/views/plugin.py   ionyweb(Download)
            except ContentType.DoesNotExist:
                raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                    {'msg': MESSAGES.get('default_error', "")})
        # Bad parameters => 400
        else:
            raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                {'msg': MESSAGES.get('default_error', "")})
            except ContentType.DoesNotExist:
                raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                    {'msg': MESSAGES.get('default_error', "")})
 
            PluginClass     = content_type.model_class()
                # Sending response
                response = Response(status.HTTP_200_OK,
                                    {'msg': MESSAGES.get('item_edit_success', ''),
                                     'html': html_rendering,
                                     'layout_section_slug': layout_section_slug,
                                       context_instance=RequestContext(request))
                raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                    {'msg': MESSAGES.get('invalid_data', ""),
                                     'html': html})
        # Bad parameters => 400 BAD REQUEST

src/i/o/ionyweb-0.3/ionyweb/administration/views/page.py   ionyweb(Download)
        if not layout_section_slug:            
            response = Response(status.HTTP_400_BAD_REQUEST,
                                {"msg": MESSAGES.get('default_error', "")})
            return self.render(response)
 
        response = Response(status.HTTP_200_OK,
                            {'html': html_rendering,
                             'msg': MESSAGES.get('items_edit_success', "")})
 
        return self.render(response)
 
            response = Response(status.HTTP_202_ACCEPTED,
                                {"msg": MESSAGES.get('redirection', ""),
                                 'location': page.get_absolute_url()})
        else:
            response = Response(status.HTTP_400_BAD_REQUEST,
                                {"html": content,
                                 "msg": MESSAGES.get('default_error', "")})
        return self.render(response)
 
            refresh_manager = True
            # Messgae fo user
            msg_user = MESSAGES.get('items_move_success', '')
        # ----------------------
        # Settings page as draft

src/i/o/ionyweb-HEAD/ionyweb/administration/views/page.py   ionyweb(Download)
        if not layout_section_slug:            
            response = Response(status.HTTP_400_BAD_REQUEST,
                                {"msg": MESSAGES.get('default_error', "")})
            return self.render(response)
 
        response = Response(status.HTTP_200_OK,
                            {'html': html_rendering,
                             'msg': MESSAGES.get('items_edit_success', "")})
 
        return self.render(response)
 
            response = Response(status.HTTP_202_ACCEPTED,
                                {"msg": MESSAGES.get('redirection', ""),
                                 'location': page.get_absolute_url()})
        else:
            response = Response(status.HTTP_400_BAD_REQUEST,
                                {"html": content,
                                 "msg": MESSAGES.get('default_error', "")})
        return self.render(response)
 
            refresh_manager = True
            # Messgae fo user
            msg_user = MESSAGES.get('items_move_success', '')
        # ----------------------
        # Settings page as draft

src/i/o/ionyweb-0.3/ionyweb/administration/views/login.py   ionyweb(Download)
                    login(request, user)
                    response = Response(status.HTTP_200_OK,
                                        {"msg": MESSAGES.get('user_authenticated', "")})
                else:
                    response = Response(status.HTTP_400_BAD_REQUEST,
                                        {"msg": MESSAGES.get('inactive_user', "")})
 
            else:
                response = Response(status.HTTP_400_BAD_REQUEST,
                                    {"msg": MESSAGES.get('bad_login_pwd', "")})
        except User.DoesNotExist:            
            response = Response(status.HTTP_400_BAD_REQUEST,
                                {"msg": MESSAGES.get('bad_login_pwd', "")})
 
        return self.render(response)

src/i/o/ionyweb-HEAD/ionyweb/administration/views/login.py   ionyweb(Download)
                    login(request, user)
                    response = Response(status.HTTP_200_OK,
                                        {"msg": MESSAGES.get('user_authenticated', "")})
                else:
                    response = Response(status.HTTP_400_BAD_REQUEST,
                                        {"msg": MESSAGES.get('inactive_user', "")})
 
            else:
                response = Response(status.HTTP_400_BAD_REQUEST,
                                    {"msg": MESSAGES.get('bad_login_pwd', "")})
        except User.DoesNotExist:            
            response = Response(status.HTTP_400_BAD_REQUEST,
                                {"msg": MESSAGES.get('bad_login_pwd', "")})
 
        return self.render(response)

  1 | 2 | 3  Next