Skip to content

Commit

Permalink
docker install on almalinux
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Jan 5, 2024
1 parent f835bba commit 0697a30
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions websiteFunctions/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -6837,6 +6837,15 @@ def submitDockerSiteCreation(self, userID=None, data=None):
WPemal = data['WPemal']
WPpasswd = data['WPpasswd']

pattern = r"^[a-z0-9][a-z0-9]*$"

if re.match(pattern, sitename):
return True
else:
final_dic = {'status': 0, 'error_message': f'invalid site name "{sitename}": must consist only of lowercase alphanumeric characters, as well as start with a letter or number.'}
final_json = json.dumps(final_dic)
return HttpResponse(final_json)

loggedUser = Administrator.objects.get(pk=userID)
newOwner = Administrator.objects.get(userName=Owner)

Expand Down

0 comments on commit 0697a30

Please sign in to comment.