additional setting for improved wp page

This commit is contained in:
usmannasir
2025-04-01 15:14:23 +05:00
parent 7505249cf4
commit 0385786716
2 changed files with 17 additions and 10 deletions

View File

@@ -305,6 +305,11 @@
<div ng-controller="listWebsites" class="container">
{% if not wpsite %}
<div class="alert alert-info">
No WordPress sites found. <a href="{% url 'createWordpress' %}" class="alert-link">Install WordPress</a> to get started.
</div>
{% endif %}
<div class="top-actions">
<h2>WordPress Toolkit {% if help_url %}<a href="{{ help_url }}" class="btn-tool">Help</a>{% endif %}</h2>

View File

@@ -141,10 +141,8 @@ class WebsiteManager:
currentACL = ACLManager.loadedACL(userID)
admin = Administrator.objects.get(pk=userID)
tata = {}
tata['wp'] = []
tata['wpsites'] = []
tata['wp'] = ACLManager.GetALLWPObjects(currentACL, userID)
data = {}
data['wp'] = ACLManager.GetALLWPObjects(currentACL, userID)
try:
if DeleteID != None:
@@ -156,14 +154,18 @@ class WebsiteManager:
except BaseException as msg:
pass
for sub in tata['wp']:
tata['wpsites'].append({'id': sub.id,
'title': sub.title,
'url': sub.FinalURL
})
sites = []
for site in data['wp']:
sites.append({
'id': site.id,
'title': site.title,
'url': site.FinalURL,
'screenshot': site.screenshot if hasattr(site, 'screenshot') else None,
'production_status': True # You can modify this based on your needs
})
proc = httpProc(request, 'websiteFunctions/WPsitesList.html',
{"wpsite": tata['wpsites']})
{"wpsite": sites})
return proc.render()
def WPHome(self, request=None, userID=None, WPid=None, DeleteID=None):