Permalink
Browse files

New RPC method for tag listing

  • Loading branch information...
1 parent 4a28e1a commit 43a0e7239ef4323d0ce95998a8f0b46d6e165647 @elpaso elpaso committed Oct 6, 2012
Showing with 13 additions and 2 deletions.
  1. +13 −2 qgis-app/plugins/api.py
@@ -5,7 +5,7 @@
from django.db import IntegrityError
from plugins.views import plugin_notify
import StringIO
-
+from taggit.models import Tag
from django.utils.translation import ugettext_lazy as _
from django.core.exceptions import ValidationError, PermissionDenied
@@ -96,4 +96,15 @@ def plugin_upload(package, **kwargs):
connection.close()
raise
- return (plugin.pk, new_version.pk)
+ return (plugin.pk, new_version.pk)
+
+
+@rpcmethod(name='plugin.tags', signature=['array'], login_required=False)
+def plugin_tags(**kwargs):
+ """
+ Returns a list of current tags, in alphabetical order
+
+ """
+ return [t.name for t in Tag.objects.all().order_by('name')]
+
+

0 comments on commit 43a0e72

Please sign in to comment.