forked from ojii/cmsplugin-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
230 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Copyright (c) 2011, Øyvind Saltvik | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name of Djeese Factory GmbH nor the | ||
names of its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL DJEESE FACTORY GMBH BE LIABLE FOR ANY | ||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
cmsplugin_blog/migrations/0015_auto__add_field_latestentriesplug.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# encoding: utf-8 | ||
import datetime | ||
from south.db import db | ||
from south.v2 import SchemaMigration | ||
from django.db import models | ||
|
||
class Migration(SchemaMigration): | ||
|
||
def forwards(self, orm): | ||
|
||
# Adding field 'LatestEntriesPlugin.tagged' | ||
db.add_column('cmsplugin_latestentriesplugin', 'tagged', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) | ||
|
||
|
||
def backwards(self, orm): | ||
|
||
# Removing unique constraint on 'EntryTitle', fields ['slug', 'language'] | ||
db.delete_unique('cmsplugin_blog_entrytitle', ['slug', 'language']) | ||
|
||
# Deleting field 'LatestEntriesPlugin.tagged' | ||
db.delete_column('cmsplugin_latestentriesplugin', 'tagged') | ||
|
||
|
||
models = { | ||
'auth.group': { | ||
'Meta': {'object_name': 'Group'}, | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), | ||
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) | ||
}, | ||
'auth.permission': { | ||
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, | ||
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) | ||
}, | ||
'auth.user': { | ||
'Meta': {'object_name': 'User'}, | ||
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | ||
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), | ||
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | ||
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), | ||
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | ||
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), | ||
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | ||
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), | ||
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) | ||
}, | ||
'cms.cmsplugin': { | ||
'Meta': {'object_name': 'CMSPlugin'}, | ||
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}), | ||
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), | ||
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), | ||
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}), | ||
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}), | ||
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), | ||
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), | ||
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), | ||
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) | ||
}, | ||
'cms.placeholder': { | ||
'Meta': {'object_name': 'Placeholder'}, | ||
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) | ||
}, | ||
'cmsplugin_blog.entry': { | ||
'Meta': {'ordering': "('-pub_date',)", 'object_name': 'Entry'}, | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'is_published': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'placeholders': ('djangocms_utils.fields.M2MPlaceholderField', [], {'to': "orm['cms.Placeholder']", 'symmetrical': 'False'}), | ||
'pub_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), | ||
'tags': ('tagging.fields.TagField', [], {}) | ||
}, | ||
'cmsplugin_blog.entrytitle': { | ||
'Meta': {'unique_together': "(('language', 'slug'),)", 'object_name': 'EntryTitle'}, | ||
'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}), | ||
'entry': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cmsplugin_blog.Entry']"}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'language': ('django.db.models.fields.CharField', [], {'max_length': '15'}), | ||
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}), | ||
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}) | ||
}, | ||
'cmsplugin_blog.latestentriesplugin': { | ||
'Meta': {'object_name': 'LatestEntriesPlugin', 'db_table': "'cmsplugin_latestentriesplugin'", '_ormbases': ['cms.CMSPlugin']}, | ||
'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), | ||
'current_language_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), | ||
'limit': ('django.db.models.fields.PositiveIntegerField', [], {}), | ||
'tagged': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}) | ||
}, | ||
'contenttypes.contenttype': { | ||
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, | ||
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | ||
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), | ||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) | ||
} | ||
} | ||
|
||
complete_apps = ['cmsplugin_blog'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
cmsplugin_blog/templates/admin/cmsplugin_blog/admin_helpers.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% if use_missing %} | ||
<script type="text/javascript" src="{{ STATIC_URL|default:MEDIA_URL }}missing/n11ndata.js"></script> | ||
<script type="text/javascript" src="{{ STATIC_URL|default:MEDIA_URL }}missing/n11n.js"></script> | ||
<script type="text/javascript" src="{{ STATIC_URL|default:MEDIA_URL }}missing/urlify2.js"></script> | ||
{% endif %} |
5 changes: 2 additions & 3 deletions
5
cmsplugin_blog/templates/admin/cmsplugin_blog/change_form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
{% extends "admin/change_form.html" %} | ||
|
||
{% block extrahead %} | ||
{% load cmsplugin_blog_tags %} | ||
{{ block.super }} | ||
{% if not add %} | ||
<script type="text/javascript" src="{{ STATIC_URL|default:MEDIA_URL }}cmsplugin_blog/change_form.js"></script> | ||
{% endif %} | ||
<script type="text/javascript" src="{{ STATIC_URL|default:MEDIA_URL }}missing/n11ndata.js"></script> | ||
<script type="text/javascript" src="{{ STATIC_URL|default:MEDIA_URL }}missing/n11n.js"></script> | ||
<script type="text/javascript" src="{{ STATIC_URL|default:MEDIA_URL }}missing/urlify2.js"></script> | ||
{% admin_helpers %} | ||
{% endblock %} |
20 changes: 7 additions & 13 deletions
20
cmsplugin_blog/templates/cmsplugin_blog/entry_archive.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 6 additions & 12 deletions
18
cmsplugin_blog/templates/cmsplugin_blog/entry_archive_day.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 5 additions & 12 deletions
17
cmsplugin_blog/templates/cmsplugin_blog/entry_archive_month.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
cmsplugin_blog/templates/cmsplugin_blog/entry_list_include.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% load i18n placeholder_tags cmsplugin_blog_tags simple_translation_tags %} | ||
{% for entry in object_list|annotate_with_translations %} | ||
{% with entry|get_preferred_translation_from_request:request as title %} | ||
{% with entry.placeholders|choose_placeholder:"excerpt" as excerpt %} | ||
<p>{{ entry.pub_date|date:"d b Y" }}<br/><a href="{{ title.get_absolute_url }}">{{ title }}</a> | ||
{{ entry|render_language_choices:request|safe }} | ||
</p> | ||
{% render_placeholder excerpt %} | ||
{% endwith %} | ||
{% endwith %} | ||
{% endfor %} |
17 changes: 5 additions & 12 deletions
17
cmsplugin_blog/templates/cmsplugin_blog/latest_entries.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
{% load i18n placeholder_tags simple_translation_tags djangocms_utils_tags %} | ||
{% for entry in latest|annotate_with_translations %} | ||
{% with entry|get_preferred_translation_from_request:request as title %} | ||
{% with entry.placeholders|choose_placeholder:"excerpt" as excerpt %} | ||
<p>{{ entry.pub_date|date:"d b Y" }}<br/><a href="{{ title.get_absolute_url }}">{{ title }}</a> | ||
{{ entry|render_language_choices:request|safe }} | ||
</p> | ||
{% render_placeholder excerpt %} | ||
{% endwith %} | ||
{% endwith %} | ||
{% empty %} | ||
{% load i18n %} | ||
{% if object_list %} | ||
{% include "cmsplugin_blog/entry_list_include.html" %} | ||
{% else %} | ||
<p>{% trans "No entries" %}</p> | ||
{% endfor %} | ||
{% endif %} |
Oops, something went wrong.