from django.db import models
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
from dvcs.models import Ref
from organizations.models import Organization
from catalogue.constants import STAGES
from django.db import models
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
from dvcs.models import Ref
from organizations.models import Organization
from catalogue.constants import STAGES
stage = models.CharField(_('stage'), max_length=128, blank=True, default=STAGES[0])
assigned_to = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, related_name='assignments')
deleted = models.BooleanField(default=False)
stage = models.CharField(_('stage'), max_length=128, blank=True, default=STAGES[0])
assigned_to = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, related_name='assignments')
deleted = models.BooleanField(default=False)
data = self.materialize()
data = data.replace(u'\ufeff', '')
data = self.materialize()
data = data.replace(u'\ufeff', '')
header = t.find('.//header')
if header is None:
header = etree.fromstring(data).find('.//{http://nowoczesnapolska.org.pl/sst#}header')
header = t.find('.//header')
if header is None:
header = etree.fromstring(data).find('.//{http://nowoczesnapolska.org.pl/sst#}header')
- d['title'] = getattr(header, 'text', ' ') or ' '
- #print 'meta', d['title']
+ metadata['title'] = getattr(header, 'text', ' ') or ' '
+ # print 'meta', d['title']