Changeset 383:60b74ba08e2c for djangobb_forum/models.py
- Timestamp:
- Nov 9, 2011 4:22:58 PM (20 months ago)
- Branch:
- default
- File:
-
- 1 edited
-
djangobb_forum/models.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
djangobb_forum/models.py
r370 r383 49 49 pass 50 50 51 path = os.path.join(settings.MEDIA_ROOT, 'forum', 'themes') 52 THEME_CHOICES = [(theme, theme) for theme in os.listdir(path) 53 if os.path.isdir(os.path.join(path, theme))] 51 path = os.path.join(settings.STATIC_ROOT, 'forum', 'themes') 52 if os.path.exists(path): 53 # fix for collectstatic 54 THEME_CHOICES = [(theme, theme) for theme in os.listdir(path) 55 if os.path.isdir(os.path.join(path, theme))] 56 else: 57 THEME_CHOICES = [] 54 58 55 59 class Category(models.Model): … … 252 256 def summary(self): 253 257 LIMIT = 50 254 tail = len(self.body) > LIMIT and '...' or '' 258 tail = len(self.body) > LIMIT and '...' or '' 255 259 return self.body[:LIMIT] + tail 256 260
Note: See TracChangeset
for help on using the changeset viewer.
