Ignore:
Timestamp:
Nov 9, 2011 4:22:58 PM (20 months ago)
Author:
slav0nic <slav0nic0@…>
Branch:
default
Message:

added django 1.3 statifiles support; rename media/forum -> media/djangobb_forum

File:
1 edited

Legend:

Unmodified
Added
Removed
  • djangobb_forum/models.py

    r370 r383  
    4949    pass 
    5050 
    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))] 
     51path = os.path.join(settings.STATIC_ROOT, 'forum', 'themes') 
     52if 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))] 
     56else: 
     57    THEME_CHOICES = [] 
    5458 
    5559class Category(models.Model): 
     
    252256    def summary(self): 
    253257        LIMIT = 50 
    254         tail = len(self.body) > LIMIT and '...' or ''  
     258        tail = len(self.body) > LIMIT and '...' or '' 
    255259        return self.body[:LIMIT] + tail 
    256260 
Note: See TracChangeset for help on using the changeset viewer.