huskar_api/api/support.py
def post(self):
        """Adds an IP address to blacklist.

        The site admin authority is required. See :ref:`application_auth` also.

        :<header Authorization: Huskar Token (See :ref:`token`)
        :form remote_addr: The adding IP address.
        :status 400: The IP address is invalid.
        :status 409: The blacklist is modifying by another request.
        :status 200: The operation is success.
        """
        g.auth.require_admin()
        remote_addr = request.form.get('remote_addr', type=ip_address)
        if not remote_addr:
            abort(400, 'remote_addr is invalid')
        with self._update_blacklist() as blacklist:
            blacklist.add(unicode(remote_addr))
        return api_response()
Adds an IP address to blacklist.

        The site admin authority is required. See :ref:`application_auth` also.

        :<header Authorization: Huskar Token (See :ref:`token`)
        :form remote_addr: The adding IP address.
        :status 400: The IP address is invalid.
        :status 409: The blacklist is modifying by another request.
        :status 200: The operation is success.
        
Adds an IP address to blacklist.
The site admin authority is required.
Adds an IP address to blacklist . The site admin authority is required .
def post(self):
        g.auth.require_admin()
        remote_addr = request.form.get('remote_addr', type=ip_address)
        if not remote_addr:
            abort(400, 'remote_addr is invalid')
        with self._update_blacklist() as blacklist:
            blacklist.add(unicode(remote_addr))
        return api_response()
def post ( self ) : g . auth . require_admin ( ) remote_addr = request . form . get ( 'remote_addr' , type = ip_address ) if not remote_addr : abort ( 400 , 'remote_addr is invalid' ) with self . _update_blacklist ( ) as blacklist : blacklist . add ( unicode ( remote_addr ) ) return api_response ( )
Adds an IP address to blacklist.
Adds an IP address to blacklist .
"""Adds an IP address to blacklist.

        The site admin authority is required. See :ref:`application_auth` also.

        :<header Authorization: Huskar Token (See :ref:`token`)
        :form remote_addr: The adding IP address.
        :status 400: The IP address is invalid.
        :status 409: The blacklist is modifying by another request.
        :status 200: The operation is success.
        """
self
<header
Huskar Token (See :ref:`token`)
Huskar Token ( See : ref : ` token ` )
form
The adding IP address.
The adding IP address .
status
The IP address is invalid.
The IP address is invalid .
status
The blacklist is modifying by another request.
The blacklist is modifying by another request .
status
The operation is success.
The operation is success .