mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-27 09:04:54 +00:00
changes
This commit is contained in:
51
base/constants.py
Normal file
51
base/constants.py
Normal file
@ -0,0 +1,51 @@
|
||||
"""
|
||||
This module contains constants used throughout the project
|
||||
"""
|
||||
import os
|
||||
|
||||
# GOOGLE_URL used for interact with google server to verify user existence.
|
||||
#GOOGLE_URL = "https://www.googleapis.com/plus/v1/"
|
||||
|
||||
|
||||
# Super Admin string constant for 'role'
|
||||
SUPER_ADMIN = "Super Admin"
|
||||
|
||||
# Define jwt_token_expiration time in minutes for now token will expire after 3 days
|
||||
JWT_TOKEN_EXPIRATION = 3 * 24 * 60
|
||||
|
||||
# Define common file extention
|
||||
FILE_EXTENSION = ("gif", "jpeg", "jpg", "png", "svg")
|
||||
|
||||
# Define file size in bytes(5MB = 5 * 1024 * 1024)
|
||||
FILE_SIZE = 5 * 1024 * 1024
|
||||
|
||||
# String constant for configurable date for allocation lock period
|
||||
ALLOCATION_LOCK_DATE = 1
|
||||
|
||||
sort_dict = {
|
||||
'1': 'name',
|
||||
'2': '-name'
|
||||
}
|
||||
USER_TYPE = (
|
||||
('1', 'junior'),
|
||||
('2', 'guardian'),
|
||||
('3', 'superuser')
|
||||
)
|
||||
GENDERS = (
|
||||
('1', 'Male'),
|
||||
('2', 'Female')
|
||||
)
|
||||
# duplicate name used defined in constant PROJECT_NAME
|
||||
PROJECT_NAME = 'Zod Bank'
|
||||
GUARDIAN = 'guardian'
|
||||
JUNIOR = 'junior'
|
||||
SUPERUSER = 'superuser'
|
||||
# numbers used as a constant
|
||||
|
||||
# Define the byte into kb
|
||||
BYTE_IMAGE_SIZE = 1024
|
||||
|
||||
# validate file size
|
||||
MAX_FILE_SIZE = 1024 * 1024 * 5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user