Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HackSoftware/Django-Styleguide-Example
/ functions
Functions
216 in github.com/HackSoftware/Django-Styleguide-Example
⨍
Functions
216
◇
Types & classes
170
↳
Endpoints
6
↓ 13 callers
Function
model_update
Generic update service meant to be reused in local update services. For example: def user_update(*, user: User, data) -> User:
styleguide_example/common/services.py:9
↓ 13 callers
Function
user_create
( *, email: str, is_active: bool = True, is_admin: bool = False, password: Optional[str] = None )
styleguide_example/users/services.py:10
↓ 11 callers
Method
get
(self, request)
styleguide_example/authentication/apis.py:76
↓ 11 callers
Method
is_valid
We consider a file "valid" if the the datetime flag has value.
styleguide_example/files/models.py:26
↓ 8 callers
Method
get
(self, request)
styleguide_example/users/apis.py:47
↓ 8 callers
Method
post
(self, request, *args, **kwargs)
styleguide_example/authentication/apis.py:52
↓ 7 callers
Method
create
(self, file_name: str = "", file_type: str = "")
styleguide_example/files/services.py:58
↓ 7 callers
Method
filter
(self, record)
config/settings/loggers/setup.py:7
↓ 6 callers
Method
get
(self, request, *args, **kwargs)
styleguide_example/blog_examples/google_login_server_flow/raw/apis.py:35
↓ 6 callers
Function
roster_validate_period
(*, start_date: date, end_date: date, school_course: SchoolCourse)
styleguide_example/testing_examples/services/rosters.py:12
↓ 6 callers
Function
school_list_school_courses
( *, school: School, start_date: Optional[date] = None, end_date: Optional[date] = None, )
styleguide_example/testing_examples/selectors/schools.py:14
↓ 5 callers
Function
roster_create
( *, student: Student, school_course: SchoolCourse, start_date: Optional[date] = None, end_date: Optional[
styleguide_example/testing_examples/services/rosters.py:23
↓ 5 callers
Function
user_list
(*, filters=None)
styleguide_example/users/selectors.py:20
↓ 4 callers
Function
env_to_enum
(enum_cls, value)
config/env.py:10
↓ 4 callers
Method
update
(self, file: File, file_name: str = "", file_type: str = "")
styleguide_example/files/services.py:78
↓ 3 callers
Method
_get_redirect_uri
(self)
styleguide_example/blog_examples/google_login_server_flow/sdk/services.py:54
↓ 3 callers
Function
_validate_file_size
(file_obj)
styleguide_example/files/services.py:21
↓ 3 callers
Function
file_generate_name
(original_file_name)
styleguide_example/files/utils.py:8
↓ 3 callers
Method
get
(self, request)
styleguide_example/api/tests/pagination/test_get_paginated_response.py:25
↓ 2 callers
Method
_generate_client_config
(self)
styleguide_example/blog_examples/google_login_server_flow/sdk/services.py:60
↓ 2 callers
Method
_get_redirect_uri
(self)
styleguide_example/blog_examples/google_login_server_flow/raw/service.py:57
↓ 2 callers
Method
_infer_file_name_and_type
(self, file_name: str = "", file_type: str = "")
styleguide_example/files/services.py:43
↓ 2 callers
Method
_order_school_courses
(self, school_courses)
styleguide_example/testing_examples/tests/selectors/test_school_list_school_courses.py:20
↓ 2 callers
Method
create_user
(self, email, is_active=True, is_admin=False, password=None)
styleguide_example/users/models.py:15
↓ 2 callers
Method
decode_id_token
(self)
styleguide_example/blog_examples/google_login_server_flow/raw/service.py:28
↓ 2 callers
Method
decode_id_token
(self)
styleguide_example/blog_examples/google_login_server_flow/sdk/services.py:26
↓ 2 callers
Method
generate_qr_code
(self, name: Optional[str] = None)
styleguide_example/blog_examples/admin_2fa/models.py:17
↓ 2 callers
Method
get
(self, request)
styleguide_example/errors/apis.py:16
↓ 2 callers
Method
get_authorization_url
(self)
styleguide_example/blog_examples/google_login_server_flow/raw/service.py:63
↓ 2 callers
Method
get_authorization_url
(self)
styleguide_example/blog_examples/google_login_server_flow/sdk/services.py:76
↓ 2 callers
Function
get_paginated_response
(*, pagination_class, serializer_class, queryset, request, view)
styleguide_example/api/pagination.py:7
↓ 2 callers
Method
get_tokens
(self, *, code: str)
styleguide_example/blog_examples/google_login_server_flow/raw/service.py:84
↓ 2 callers
Method
get_tokens
(self, *, code: str, state: str)
styleguide_example/blog_examples/google_login_server_flow/sdk/services.py:93
↓ 2 callers
Method
get_user_info
(self, *, google_tokens: GoogleAccessTokens)
styleguide_example/blog_examples/google_login_server_flow/raw/service.py:106
↓ 2 callers
Method
get_user_info
(self, *, google_tokens: GoogleAccessTokens)
styleguide_example/blog_examples/google_login_server_flow/sdk/services.py:112
↓ 2 callers
Function
inline_serializer
(*, fields, data=None, **kwargs)
styleguide_example/api/utils.py:8
↓ 2 callers
Function
make_mock_object
(**kwargs)
styleguide_example/common/utils.py:7
↓ 2 callers
Function
s3_get_credentials
()
styleguide_example/integrations/aws/client.py:22
↓ 2 callers
Method
setup_logging
()
config/settings/loggers/setup.py:80
↓ 2 callers
Method
setup_structlog
()
config/settings/loggers/setup.py:34
↓ 2 callers
Function
show_toolbar
The general idea is the following: 1. We show the toolbar if we have it installed & we have it configured to be shown. - This opens
config/settings/debug_toolbar/setup.py:4
↓ 2 callers
Function
trigger_errors
(exception_handler)
styleguide_example/errors/services.py:99
↓ 2 callers
Function
user_get
(user_id)
styleguide_example/users/selectors.py:28
↓ 2 callers
Function
user_get_login_data
(*, user: BaseUser)
styleguide_example/users/selectors.py:10
↓ 1 callers
Method
_generate_state_session_token
(length=30, chars=UNICODE_ASCII_CHARACTER_SET)
styleguide_example/blog_examples/google_login_server_flow/raw/service.py:51
↓ 1 callers
Function
assert_settings
Checks if each item from `required_settings` is present in Django settings
styleguide_example/common/utils.py:22
↓ 1 callers
Function
auth_logout
(user: BaseUser)
styleguide_example/authentication/services.py:17
↓ 1 callers
Function
bytes_to_mib
(value: int)
styleguide_example/files/utils.py:26
↓ 1 callers
Function
create_serializer_class
(name, fields)
styleguide_example/api/utils.py:4
↓ 1 callers
Method
do_settings
(INSTALLED_APPS, MIDDLEWARE, middleware_position=None)
config/settings/debug_toolbar/setup.py:40
↓ 1 callers
Method
do_urls
(urlpatterns)
config/settings/debug_toolbar/setup.py:70
↓ 1 callers
Function
email_failed
(email: Email)
styleguide_example/emails/services.py:16
↓ 1 callers
Function
email_send
(email: Email)
styleguide_example/emails/services.py:25
↓ 1 callers
Function
email_send_all
This is a very specific service. We don't want to decorate with @transaction.atomic, since we are executing updates, 1 by 1, in a separa
styleguide_example/emails/services.py:53
↓ 1 callers
Function
file_generate_local_upload_url
(*, file_id: str)
styleguide_example/files/utils.py:18
↓ 1 callers
Function
file_generate_upload_path
(instance, filename)
styleguide_example/files/utils.py:14
↓ 1 callers
Method
finish
(self, *, file: File)
styleguide_example/files/services.py:142
↓ 1 callers
Method
get
(self, request, *args, **kwargs)
styleguide_example/blog_examples/google_login_server_flow/sdk/apis.py:35
↓ 1 callers
Function
get_auth_header
(headers)
styleguide_example/api/mixins.py:11
↓ 1 callers
Function
get_new_toc
()
markdown_tools/toc.py:5
↓ 1 callers
Function
get_object
Reuse get_object_or_404 since the implementation supports both Model && queryset. Catch Http404 & return None
styleguide_example/common/utils.py:11
↓ 1 callers
Method
get_paginated_response
We redefine this method in order to return `limit` and `offset`. This is used by the frontend to construct the pagination itself.
styleguide_example/api/pagination.py:37
↓ 1 callers
Function
get_readme
()
markdown_tools/toc.py:13
↓ 1 callers
Function
google_raw_login_get_credentials
()
styleguide_example/blog_examples/google_login_server_flow/raw/service.py:117
↓ 1 callers
Function
google_sdk_login_get_credentials
()
styleguide_example/blog_examples/google_login_server_flow/sdk/services.py:123
↓ 1 callers
Function
main
()
manage.py:7
↓ 1 callers
Function
main
()
markdown_tools/toc.py:36
↓ 1 callers
Method
post
(self, request)
styleguide_example/blog_examples/admin_2fa/views.py:13
↓ 1 callers
Function
replace_toc
()
markdown_tools/toc.py:23
↓ 1 callers
Method
rotate_session_identifier
(self)
styleguide_example/blog_examples/admin_2fa/models.py:32
↓ 1 callers
Function
s3_generate_presigned_post
(*, file_path: str, file_type: str)
styleguide_example/integrations/aws/client.py:58
↓ 1 callers
Function
s3_get_client
()
styleguide_example/integrations/aws/client.py:47
↓ 1 callers
Function
save_readme
(readme)
markdown_tools/toc.py:18
↓ 1 callers
Method
setup_settings
(INSTALLED_APPS, MIDDLEWARE, middleware_position=None)
config/settings/loggers/setup.py:17
↓ 1 callers
Method
start
(self, *, file_name: str, file_type: str)
styleguide_example/files/services.py:110
↓ 1 callers
Function
student_create
(*, email: str, school: School, start_date: Optional[date] = None)
styleguide_example/testing_examples/services/students.py:15
↓ 1 callers
Function
tabulate_qs
(queryset, *, fields: list[str] | None = None, exclude: list[str] | None = None)
styleguide_example/blog_examples/print_qs_in_shell/utils.py:4
↓ 1 callers
Method
upload_local
(self, *, file: File, file_obj)
styleguide_example/files/services.py:151
↓ 1 callers
Function
user_two_factor_auth_data_create
(*, user: BaseUser)
styleguide_example/blog_examples/admin_2fa/services.py:9
↓ 1 callers
Function
user_update
(*, user: BaseUser, data)
styleguide_example/users/services.py:19
↓ 1 callers
Method
validate_otp
(self, otp: str)
styleguide_example/blog_examples/admin_2fa/models.py:27
↓ 1 callers
Function
wrapper
(func)
styleguide_example/blog_examples/celery_non_concurrent/tasks.py:16
Method
__init__
(self, user: BaseUser, file_obj)
styleguide_example/files/services.py:39
Method
__init__
(self, user: BaseUser)
styleguide_example/files/services.py:106
Method
__init__
(self)
styleguide_example/blog_examples/google_login_server_flow/raw/service.py:47
Method
__init__
(self)
styleguide_example/blog_examples/google_login_server_flow/sdk/services.py:51
Method
__init__
(self, full_path, value=1, **extra)
styleguide_example/blog_examples/f_expressions/db_functions.py:16
Method
__init__
(self, message, extra=None)
styleguide_example/core/exceptions.py:2
Method
__str__
(self)
styleguide_example/users/models.py:66
Method
__str__
(self)
styleguide_example/testing_examples/models.py:11
Method
__str__
(self)
styleguide_example/testing_examples/models.py:28
Method
__str__
(self)
styleguide_example/testing_examples/models.py:59
Function
_email_send_failure
(self, exc, task_id, args, kwargs, einfo)
styleguide_example/emails/tasks.py:9
Function
auth_jwt_response_payload_handler
Default implementation. Add whatever suits you here.
styleguide_example/authentication/services.py:10
Function
auth_user_get_jwt_secret_key
(user: BaseUser)
styleguide_example/authentication/services.py:6
Method
authenticate
(self, request)
styleguide_example/api/mixins.py:32
Method
clean_otp
(self)
styleguide_example/blog_examples/admin_2fa/views.py:36
Function
combined_logformat
(logger, name, event_dict)
gunicorn.conf.py:11
Method
create_superuser
(self, email, password=None)
styleguide_example/users/models.py:35
Function
debug_task
(self)
styleguide_example/tasks/tasks.py:5
next →
1–100 of 216, ranked by callers