versioning and wp plugin updates

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-10 00:26:00 +00:00
parent 0ea3a30909
commit a86524a6b1
24 changed files with 2011 additions and 101 deletions

View File

@@ -64,7 +64,7 @@ class Plugin(models.Model):
def get_latest_version(self):
"""Get the latest released version of this plugin."""
return self.versions.filter(
status__in=['released', 'update_ready']
status='released'
).first()
def get_download_count(self):
@@ -80,11 +80,8 @@ class PluginVersion(models.Model):
"""
STATUS_CHOICES = [
('draft', 'Draft'), # In development
('testing', 'Testing'), # Internal testing
('staged', 'Staged'), # Ready, not yet pushed
('released', 'Released'), # Available for download
('update_ready', 'Update Ready'), # Push to installed sites
('draft', 'Draft'), # In development - NOT available for download
('released', 'Released'), # Available for download and updates
('deprecated', 'Deprecated'), # Old version, not recommended
]