![]() create().Ī simple ViewSet for listing or retrieving users. post(), and instead provides actions such as. You can use any of the standard attributes such as permission_classes, authentication_classes in order to control the API policy on the viewset.Ī ViewSet class is simply a type of class-based View, that does not provide any method handlers such as. Return_value = ''.format(duration_string, _('earlier')) Seconds = int((elapsed_seconds % 3600) % 60) Minutes = int(elapsed_seconds % 3600 / 60) Now = make_aware(datetime.now(), get_current_timezone())Įlapsed_days, elapsed_seconds = diff_time.days, diff_conds "NAME": os.path.join(BASE_DIR, 'db.sqlite3'),įrom import gettext_lazy as _įrom import make_aware, get_current_timezoneĭef get_elapsed_time(from_date_time_obj, short_version: bool) -> str: STATIC_ROOT = os.path.join(BASE_DIR, 'tiptong', 'static') MEDIA_ROOT = os.path.join(BASE_DIR, 'tiptong', 'media') *glob.glob(BASE_DIR + '/*/*/locale', recursive=False) Json_path = settings.STATIC_ROOT / 'my_app/json/data.json'īASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(_file_))) STATIC_ROOT = BASE_DIR / 'tiptong' / 'static' MEDIA_ROOT = BASE_DIR / 'tiptong' / 'media' LOCALE_PATHS = list(Path.cwd().rglob('locale')) BASE_DIR = Path(_file_).resolve(strict=True).parent.parent
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |