fix #72: Installation error using custom setting.MEDIA_URL. Tnx myitchychin for report; fixed mypostmarkup import

This commit is contained in:
slav0nic 2010-01-04 23:41:21 +02:00
parent f1f2d02630
commit 8b5ffd4c79
2 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ from django.utils.translation import ugettext as _
from djangobb_forum.models import Topic, Post, Profile, Reputation, Report, PrivateMessage,\
Forum, Attachment, TZ_CHOICES, PRIVACY_CHOICES
from djangobb_forum.markups import mypostmarkup
from djangobb_forum.markups import bbmarkup
from djangobb_forum import settings as forum_settings
@ -215,7 +215,7 @@ class PersonalityProfileForm(forms.ModelForm):
def save(self, commit=True):
profile = super(PersonalityProfileForm, self).save(commit=False)
profile.signature = mypostmarkup.markup(profile.signature, auto_urls=False)
profile.signature = bbmarkup.bbcode(profile.signature)
if commit:
profile.save()
return profile

View file

@ -42,9 +42,9 @@ MARKUP_CHOICES = (
('markdown', 'markdown'),
)
path = settings.PROJECT_ROOT + settings.MEDIA_URL + 'forum/themes/'
path = os.path.join(settings.MEDIA_ROOT, 'forum', 'themes')
THEME_CHOICES = [(theme, theme) for theme in os.listdir(path)
if os.path.isdir(path + theme)]
if os.path.isdir(os.path.join(path, theme))]
class Category(models.Model):
name = models.CharField(_('Name'), max_length=80)