This commit is contained in:
usman@cyberpersons.com
2023-06-22 12:08:30 +05:00
parent f337f89551
commit 38802b663a
3 changed files with 19 additions and 12 deletions

View File

@@ -209,7 +209,8 @@ class FileManager:
try: try:
currentFile = items.split(' ') currentFile = items.split(' ')
currentFile = [a for a in currentFile if a != ''] currentFile = [a for a in currentFile if a != '']
if currentFile[-1] == '.' or currentFile[-1] == '..' or currentFile[0] == 'total':
if currentFile[-1] == '.' or currentFile[-1] == '..' or currentFile[0] == 'total' or currentFile[-1].startswith('mail.'):
continue continue
if len(currentFile) > 9: if len(currentFile) > 9:

View File

@@ -23,17 +23,20 @@ class ChildDomainManager:
checker = 0 checker = 0
for items in childDomains: for items in childDomains:
dic = { if items.domain == f'mail.{master.domain}':
'childDomain': items.domain, pass
'path': items.path,
'childLunch': '/websites/' + self.masterDomain + '/' + items.domain
}
if checker == 0:
json_data = json_data + json.dumps(dic)
checker = 1
else: else:
json_data = json_data + ',' + json.dumps(dic) dic = {
'childDomain': items.domain,
'path': items.path,
'childLunch': '/websites/' + self.masterDomain + '/' + items.domain
}
if checker == 0:
json_data = json_data + json.dumps(dic)
checker = 1
else:
json_data = json_data + ',' + json.dumps(dic)
json_data = json_data + ']' json_data = json_data + ']'

View File

@@ -2382,7 +2382,10 @@ class WebsiteManager:
for web in websites: for web in websites:
for child in web.childdomains_set.all(): for child in web.childdomains_set.all():
childDomains.append(child) if child.domain == f'mail.{web.domain}':
pass
else:
childDomains.append(child)
pagination = self.getPagination(len(childDomains), recordsToShow) pagination = self.getPagination(len(childDomains), recordsToShow)
json_data = self.findChildsListJson(childDomains[finalPageNumber:endPageNumber]) json_data = self.findChildsListJson(childDomains[finalPageNumber:endPageNumber])