Redirect user to comment when it's added and not to begining of page
Always update modification date when post/draft is saved Update version
This commit is contained in:
parent
0b871656b5
commit
47f5f97618
|
@ -1,3 +1,10 @@
|
||||||
|
v0.4 (09/08/2015)
|
||||||
|
** User **
|
||||||
|
Redirect user to comment when it's added and not to begining of page
|
||||||
|
|
||||||
|
** Bugs **
|
||||||
|
Always update modification date when post/draft is saved
|
||||||
|
|
||||||
v0.3 (13/11/2014)
|
v0.3 (13/11/2014)
|
||||||
|
|
||||||
** User **
|
** User **
|
||||||
|
|
|
@ -255,6 +255,7 @@ class Post(models.Model):
|
||||||
def save(self):
|
def save(self):
|
||||||
self.title = self.title.strip()
|
self.title = self.title.strip()
|
||||||
self.title_slug = slugify(self.title)
|
self.title_slug = slugify(self.title)
|
||||||
|
self.modification_date=datetime.now()
|
||||||
super(Post, self).save()
|
super(Post, self).save()
|
||||||
|
|
||||||
def manageTags(self, tags):
|
def manageTags(self, tags):
|
||||||
|
@ -320,7 +321,6 @@ class Post(models.Model):
|
||||||
f = open(filename, 'wb')
|
f = open(filename, 'wb')
|
||||||
f.write(content)
|
f.write(content)
|
||||||
f.close()
|
f.close()
|
||||||
self.modification_date=datetime.now()
|
|
||||||
|
|
||||||
self.manageTags(tags)
|
self.manageTags(tags)
|
||||||
|
|
||||||
|
@ -386,7 +386,6 @@ class Draft(Post):
|
||||||
f = open(filename, 'wb')
|
f = open(filename, 'wb')
|
||||||
f.write(content)
|
f.write(content)
|
||||||
f.close()
|
f.close()
|
||||||
self.modification_date=datetime.now()
|
|
||||||
|
|
||||||
self.manageTags(tags)
|
self.manageTags(tags)
|
||||||
self.save()
|
self.save()
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
<a href="/user">Users</a> <a href="/blog">Blogs</a> <a href="/disconnect">Disconnect</a><br/><br/>
|
<a href="/user">Users</a> <a href="/blog">Blogs</a> <a href="/disconnect">Disconnect</a><br/><br/>
|
||||||
{% block content %} {% endblock %}
|
{% block content %} {% endblock %}
|
||||||
<br/><br/><br/>
|
<br/><br/><br/>
|
||||||
<center><a href="http://indefero.soutade.fr/p/dynastie">Dynastie</a> 0.3</center>
|
<center><a href="http://indefero.soutade.fr/p/dynastie">Dynastie</a> 0.4</center>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -892,7 +892,8 @@ def add_comment(request, post_id, parent_id):
|
||||||
|
|
||||||
connection.send_messages(messages)
|
connection.send_messages(messages)
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|
||||||
|
ref = ref + '#comment_%s' % (comment_index)
|
||||||
response = HttpResponseRedirect(ref)
|
response = HttpResponseRedirect(ref)
|
||||||
response['Cache-Control'] = 'no-store, no-cache, must-revalidate'
|
response['Cache-Control'] = 'no-store, no-cache, must-revalidate'
|
||||||
response['Expires'] = 'Thu, 01 Jan 1970 00:00:00 GMT'
|
response['Expires'] = 'Thu, 01 Jan 1970 00:00:00 GMT'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user