You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importrequestsdefvalidate_github_profile(value):
"""validate github profile"""pattern=r"^github.com\/[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*\/?$"ifre.search(pattern, value) isNone:
raiseValidationError(
_("%(value)s is not a valid GitHub profile."),
params={"value": value},
)
status_code=requests.get(value).status_codeifstatus_code==404:
raiseValidationError(
_("%(value)s is not a valid GitHub profile."),
params={"value": value},
)
Activity
delrius-euphoria commentedon Jun 29, 2022
A possible way is something like:
Or something along the lines