verb = _("asked")\r
\r
def process_data(self, **data):\r
- question = Question(author=self.user, **self.create_revision_data(True, **data))\r
+ processed_data = self.create_revision_data(True, **data)\r
+ if 'added_at' in data:\r
+ processed_data['added_at'] = data['added_at']\r
+\r
+ question = Question(author=self.user, **processed_data)\r
question.save()\r
self.node = question\r
\r
def get_revisions_url(self):
return ('revisions', (), {'id': self.id})
- def update_last_activity(self, user, save=False):
+ def update_last_activity(self, user, save=False, time=None):
+ if not time:
+ time = datetime.datetime.now()
+
self.last_activity_by = user
- self.last_activity_at = datetime.datetime.now()
+ self.last_activity_at = time
if self.parent:
- self.parent.update_last_activity(user, save=True)
+ self.parent.update_last_activity(user, save=True, time=time)
if save:
self.save()
super(BaseModel, self).save(*args, **kwargs)
self.active_revision = self._create_revision(self.author, 1, title=self.title, tagnames=self.tagnames,
body=self.body)
- self.update_last_activity(self.author)
+ self.update_last_activity(self.author, time=self.added_at)
if self.parent_id and not self.abs_parent_id:
self.abs_parent = self.parent.absolute_parent
<link rel="stylesheet" href="{{ settings.ADMIN_MEDIA_PREFIX }}css/base.css" type="text/css"/>
<link rel="stylesheet" href="{{ settings.ADMIN_MEDIA_PREFIX }}css/forms.css" type="text/css"/>
<link rel="stylesheet" href="{{ settings.ADMIN_MEDIA_PREFIX }}css/changelists.css" type="text/css"/>
+ <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{{ settings.ADMIN_MEDIA_PREFIX }}css/ie.css" /><![endif]-->
<link rel="stylesheet" type="text/css" media="screen" href="{% media "/media/style/djstyle_admin.css" %}"/>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
raise InvalidAuthentication(" ".join(form_auth.errors.values()[0]))
class LocalAuthContext(ConsumerTemplateContext):
- mode = 'STACK_ITEM'
+ mode = 'STACK_ITEM'
weight = 1000
human_name = 'Local authentication'
stack_item_template = 'modules/localauth/loginform.html'
return 'http://openid.aol.com/' + uname
class AolAuthContext(ConsumerTemplateContext):
- mode = 'BIGICON'
+ mode = 'SMALLICON'
type = 'SIMPLE_FORM'
simple_form_context = {
'your_what': 'AOL screen name'
}
- weight = 400
+ weight = 200
human_name = 'AOL'
- icon = '/media/images/openid/aol.gif'
+ icon = '/media/images/openid/aol.png'
class MyOpenIdAuthConsumer(OpenIdAbstractAuthConsumer):
return "http://%s.myopenid.com/" % blog_name
class MyOpenIdAuthContext(ConsumerTemplateContext):
- mode = 'SMALLICON'
+ mode = 'BIGICON'
type = 'SIMPLE_FORM'
simple_form_context = {
'your_what': 'MyOpenID user name'
}
- weight = 200
+ weight = 400
human_name = 'MyOpenID'
- icon = '/media/images/openid/myopenid.png'
+ icon = '/media/images/openid/myopenid_big.png'
class FlickrAuthConsumer(OpenIdAbstractAuthConsumer):