summaryrefslogtreecommitdiff
path: root/meetingtools
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2013-03-04 08:08:42 +0100
committerLeif Johansson <leifj@sunet.se>2013-03-04 08:08:42 +0100
commit2752cb0857dc3c7e5e9a06a7e713b0fdb71f6aba (patch)
tree149460fc3d672480e968ab71cef01b6c0ee9b04d /meetingtools
parentd9e0c635493f04d7764044e6098de9e458810a10 (diff)
prefetch tags
Diffstat (limited to 'meetingtools')
-rw-r--r--meetingtools/apps/room/models.py2
-rw-r--r--meetingtools/apps/room/views.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/meetingtools/apps/room/models.py b/meetingtools/apps/room/models.py
index 86acbc4..12f4b1d 100644
--- a/meetingtools/apps/room/models.py
+++ b/meetingtools/apps/room/models.py
@@ -35,12 +35,14 @@ class FileLock(object):
def __delete__(self):
raise AttributeError
+
class RoomLockedException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
+
class Room(models.Model):
creator = ForeignKey(User,editable=False)
name = CharField(max_length=128)
diff --git a/meetingtools/apps/room/views.py b/meetingtools/apps/room/views.py
index dd7e2b1..ffd222d 100644
--- a/meetingtools/apps/room/views.py
+++ b/meetingtools/apps/room/views.py
@@ -92,6 +92,7 @@ def view(request,id):
'active': True,
})
+
def _init_update_form(request,form,acc,folder_sco):
if form.fields.has_key('urlpath'):
url = base_url(request)
@@ -99,6 +100,7 @@ def _init_update_form(request,form,acc,folder_sco):
if form.fields.has_key('source_sco'):
form.fields['source_sco'].widget.choices = [('','-- select template --')]+[r for r in _user_templates(request,acc,folder_sco)]
+
def _update_room(request, room, data=dict(), acc=None):
params = {'type':'meeting'}
@@ -321,7 +323,7 @@ def list_rooms(request,username=None):
rooms = []
if user:
- rooms = Room.objects.filter(creator=user).order_by('name').all().prefetch_related("creator","sco","folder_sco","source_sco","deleted_sco")
+ rooms = Room.objects.filter(creator=user).order_by('name').all().prefetch_related("creator","sco","folder_sco","source_sco","deleted_sco","tags")
return respond_to(request,
{'text/html':'apps/room/list.html'},