diff options
Diffstat (limited to 'askbot/models/tag.py')
-rw-r--r-- | askbot/models/tag.py | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/askbot/models/tag.py b/askbot/models/tag.py index 647ea5cf..d7e91eb5 100644 --- a/askbot/models/tag.py +++ b/askbot/models/tag.py @@ -9,21 +9,6 @@ from askbot import const from askbot.conf import settings as askbot_settings from askbot.utils import category_tree -def get_global_group(): - """Returns the global group, - if necessary, creates one - """ - #todo: when groups are disconnected from tags, - #find comment as shown below in the test cases and - #revert the values - #todo: change groups to django groups - group_name = askbot_settings.GLOBAL_GROUP_NAME - from askbot.models import Group - try: - return Group.objects.get(name=group_name) - except Group.DoesNotExist: - return Group.objects.create(name=group_name) - def delete_tags(tags): """deletes tags in the list""" tag_ids = [tag.id for tag in tags] @@ -277,7 +262,8 @@ class TagManager(BaseQuerySetManager): return created_tags def clean_group_name(name): - """group names allow spaces, + """todo: move to the models/user.py + group names allow spaces, tag names do not, so we use this method to replace spaces with dashes""" return re.sub('\s+', '-', name.strip()) @@ -332,11 +318,3 @@ class MarkedTag(models.Model): class Meta: app_label = 'askbot' - -def get_groups(): - from askbot.models import Group - return Group.objects.all() - -def get_group_names(): - #todo: cache me - return get_groups().values_list('name', flat = True) |