1
0
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:
zhengxie
2015-11-09 10:54:13 +08:00
parent 178ff33a58
commit 7c42b0acf7
2 changed files with 7 additions and 0 deletions

View File

@@ -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
View 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