Did I find the right examples for you? yes no

All Samples(16)  |  Call(14)  |  Derive(0)  |  Import(2)

src/r/a/Radregator-HEAD/core/views.py   Radregator(Download)
from core.models import Topic,CommentType, Comment, Summary, CommentRelation, \
                   CommentResponse
from core.exceptions import UnknownOutputFormat, NonAjaxRequest, \
                                       MissingParameter, RecentlyResponded, \
                                       MethodUnsupported, InvalidTopic, \
        else:
            # Not a post
            raise MethodUnsupported("This endpoint only accepts POSTs, you used: " + request.method)
 
    except UserNotReporter:
            logger.info("core.views.api_commentsubmission(request, output_format=\
                'json'): not a post")
            raise MethodUnsupported("This endpoint only accepts POSTs, you used:" + request.method)
 
    except InvalidTopic:
            response = api_topic_delete(request, topic_slug_or_id, output_format) 
        else:
            raise MethodUnsupported("%s method is not supported at this time." %\
                request.method)
 
 
        else:
            raise MethodUnsupported("%s method is not supported at this time." % request.method)
 
 

src/r/a/Radregator-HEAD/users/views.py   Radregator(Download)
 
from fbapi import facebook 
from core.exceptions import MethodUnsupported, NonAjaxRequest
from users.exceptions import BadUsernameOrPassword, UserAccountDisabled, \
                             UserUsernameExists, UserEmailExists, \
            else:
                # Method not POST
                raise MethodUnsupported("This endpoint only accepts POSTs.")
        else:
            # Non-AJAX request.  Disallow for now.
            else:
                # Method not POST
                raise MethodUnsupported("This endpoint only accepts POSTs.")
        else:
            # Non-AJAX request.  Disallow for now.
 
        else:
            raise MethodUnsupported("%s is not supported at this time." % \
                                (request.method))