Update to Django 1.8 + various changes

This commit is contained in:
Gregory Soutade 2015-09-21 19:05:25 +02:00
parent 47f5f97618
commit dd6739461b
7 changed files with 22 additions and 7 deletions

4
README
View File

@ -1,9 +1,9 @@
Dynastie is static blog generator delivered under GPL v3 licence terms. Dynastie is static blog generator delivered under GPL v3 licence terms.
Current version is 0.2 Current version is 0.5
Requirements : Requirements :
Django >= 1.4, libapache2-mod-wsgi if you want to use Dynastie with Apache. PyGments (Optional). Django >= 1.8, libapache2-mod-wsgi if you want to use Dynastie with Apache. PyGments (Optional).
Installation : Installation :
* Download Dynastie * Download Dynastie

View File

@ -3,7 +3,9 @@
DocumentRoot /home/soutade/dynastie/dynastie/ DocumentRoot /home/soutade/dynastie/dynastie/
WSGIScriptAlias / /home/soutade/dynastie/dynastie/wsgi.py WSGIDaemonProcess django-dynastie
WSGIProcessGroup django-dynastie
WSGIScriptAlias / /var/www/dynastie/dynastie/wsgi.py
Alias /static /home/soutade/dynastie/dynastie/static Alias /static /home/soutade/dynastie/dynastie/static

View File

@ -24,6 +24,7 @@ from dynastie.models import *
class BlogForm(ModelForm): class BlogForm(ModelForm):
class Meta: class Meta:
model = Blog model = Blog
exclude = ()
class PostForm(ModelForm): class PostForm(ModelForm):
description = forms.CharField(widget=forms.Textarea(attrs={'rows':'5', 'cols':'50'}), required=False) description = forms.CharField(widget=forms.Textarea(attrs={'rows':'5', 'cols':'50'}), required=False)
@ -51,6 +52,7 @@ class CategoryForm(ModelForm):
class UserForm(ModelForm): class UserForm(ModelForm):
class Meta: class Meta:
model = User model = User
exclude = ('groups', 'user_permissions', 'date_joined')
class CommentForm(ModelForm): class CommentForm(ModelForm):
class Meta: class Meta:

View File

@ -116,7 +116,9 @@ class Blog(models.Model):
if os.path.isdir(srcname): if os.path.isdir(srcname):
if not os.path.exists(dstname): if not os.path.exists(dstname):
os.makedirs(dstname) os.makedirs(dstname)
self.copytree(srcname, dstname) self.copytree(srcname, dstname, ignore=True)
else:
return self.copytree(srcname, dstname)
else: else:
copied = False copied = False
if os.path.exists(dstname): if os.path.exists(dstname):

View File

@ -68,7 +68,10 @@ Available tags:
<pre style="display:inline">#[Inline Picture](https://bits.wikimedia.org/images/wikimedia-button.png)</pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/> <pre style="display:inline">#[Inline Picture](https://bits.wikimedia.org/images/wikimedia-button.png)</pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/>
<pre style="display:inline">[Link](http://www.wikipedia.org)</pre> <a href="http://www.wikipedia.org">Link</a><br/><br/> <pre style="display:inline">[Link](http://www.wikipedia.org)</pre> <a href="http://www.wikipedia.org">Link</a><br/><br/>
<pre> <pre>
Code : 4 whitespaces ahead Code : 4 whitespaces ahead OR
```language
Code
```
</pre> </pre>
</td> </td>
<td> <td>

View File

@ -67,7 +67,10 @@ Available tags:
<pre style="display:inline">#[Inline Picture](https://bits.wikimedia.org/images/wikimedia-button.png)</pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/> <pre style="display:inline">#[Inline Picture](https://bits.wikimedia.org/images/wikimedia-button.png)</pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/>
<pre style="display:inline">[Link](http://www.wikipedia.org)</pre> <a href="http://www.wikipedia.org">Link</a><br/><br/> <pre style="display:inline">[Link](http://www.wikipedia.org)</pre> <a href="http://www.wikipedia.org">Link</a><br/><br/>
<pre> <pre>
Code : 4 whitespaces ahead Code : 4 whitespaces ahead OR
```language
Code
```
</pre> </pre>
</td> </td>
<td> <td>

View File

@ -80,7 +80,10 @@ Available tags:
<pre style="display:inline">#[Inline Picture](https://bits.wikimedia.org/images/wikimedia-button.png)</pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/> <pre style="display:inline">#[Inline Picture](https://bits.wikimedia.org/images/wikimedia-button.png)</pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/>
<pre style="display:inline">[Link](http://www.wikipedia.org)</pre> <a href="http://www.wikipedia.org">Link</a><br/><br/> <pre style="display:inline">[Link](http://www.wikipedia.org)</pre> <a href="http://www.wikipedia.org">Link</a><br/><br/>
<pre> <pre>
Code : 4 whitespaces ahead Code : 4 whitespaces ahead OR
```language
Code
```
</pre> </pre>
</td> </td>
<td> <td>