equal
deleted
inserted
replaced
10 def __repr__(self): |
10 def __repr__(self): |
11 return "<GetAdminLog Node>" |
11 return "<GetAdminLog Node>" |
12 |
12 |
13 def render(self, context): |
13 def render(self, context): |
14 if self.user is None: |
14 if self.user is None: |
15 context[self.varname] = LogEntry.objects.all().select_related()[:self.limit] |
15 context[self.varname] = LogEntry.objects.all().select_related('content_type', 'user')[:self.limit] |
16 else: |
16 else: |
17 if not self.user.isdigit(): |
17 if not self.user.isdigit(): |
18 self.user = context[self.user].id |
18 self.user = context[self.user].id |
19 context[self.varname] = LogEntry.objects.filter(user__id__exact=self.user).select_related()[:self.limit] |
19 context[self.varname] = LogEntry.objects.filter(user__id__exact=self.user).select_related('content_type', 'user')[:self.limit] |
20 return '' |
20 return '' |
21 |
21 |
22 class DoGetAdminLog: |
22 class DoGetAdminLog: |
23 """ |
23 """ |
24 Populates a template variable with the admin log for the given criteria. |
24 Populates a template variable with the admin log for the given criteria. |