mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 15:19:06 +00:00
[api2] Fix undefined variables
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import logging
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
from django.utils import timezone
|
||||
from rest_framework import status
|
||||
@@ -10,10 +11,12 @@ from rest_framework.throttling import UserRateThrottle
|
||||
from rest_framework.views import APIView
|
||||
import seaserv
|
||||
from seaserv import seafile_api, ccnet_threaded_rpc
|
||||
from pysearpc import SearpcError
|
||||
|
||||
from seahub.api2.authentication import TokenAuthentication
|
||||
from seahub.api2.serializers import AccountSerializer
|
||||
from seahub.api2.utils import api_error, to_python_boolean
|
||||
from seahub.api2.status import HTTP_520_OPERATION_FAILED
|
||||
from seahub.base.accounts import User
|
||||
from seahub.profile.models import Profile
|
||||
from seahub.utils import is_valid_username
|
||||
|
4
seahub/api2/status.py
Normal file
4
seahub/api2/status.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# Define custom HTTP status code. 4xx starts from 440, 5xx starts from 520.
|
||||
HTTP_440_REPO_PASSWD_REQUIRED = 440
|
||||
HTTP_441_REPO_PASSWD_MAGIC_REQUIRED = 441
|
||||
HTTP_520_OPERATION_FAILED = 520
|
Reference in New Issue
Block a user