diff --git a/.gitignore b/.gitignore index 6e7070b..abc4b21 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,11 @@ *.pyc htdocs/media/ media/ +.idea .gitignore .idea/ .project .pydevproject .settings/ *~ +maistar_ranking diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index 1244138..c8f67ff 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -1,23 +1,2 @@ - - - - mysql - true - com.mysql.jdbc.Driver - jdbc:mariadb://127.0.0.1/kasu - - - - - - - - - - file:///usr/share/java/mariadb-jdbc/mariadb-java-client.jar - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/content/admin.py b/content/admin.py index 4221d66..df4bc1f 100644 --- a/content/admin.py +++ b/content/admin.py @@ -37,11 +37,11 @@ class PageAdmin(admin.ModelAdmin): fieldsets = ( ('Deutsch', { 'fields': ('menu_name_de', 'title_de', 'pdf_de', 'content_de',), - 'classes': ('collapse',), + 'classes': ('grp-collapse grp-open',), }), ('English', { 'fields': ('menu_name_en', 'title_en', 'pdf_en', 'content_en'), - 'classes': ('collapse', 'closed'), + 'classes': ('grp-collapse grp-closed',), }), ('Meta Data', { 'fields': ( @@ -53,11 +53,10 @@ class PageAdmin(admin.ModelAdmin): class Media(object): js = [ - '/static/js/tiny_mce/tiny_mce.js', + '/static/grappelli/tinymce/jscripts/tiny_mce/tiny_mce.js', '/static/js/tinymce_setup.js', ] - admin.site.register(models.Article, ArticleAdmin) admin.site.register(models.Page, PageAdmin) admin.site.register(models.Category, CategoryAdmin) diff --git a/content/models.py b/content/models.py index d32592c..69f67fe 100644 --- a/content/models.py +++ b/content/models.py @@ -68,7 +68,7 @@ class Article(ImageModel): author = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_('Author')) status = models.SmallIntegerField(_('Status'), choices=STATUS_CHOICES, default=STATUS_PUBLISHED) - date_created = models.DateField(_('Created'), blank=True) + date_created = models.DateTimeField(_('Created'), blank=True) date_modified = models.DateTimeField(_('Modified'), auto_now=True) objects = ArticleManager() diff --git a/content/templates/content/article_archive.html b/content/templates/content/article_archive.html index 6fa80a7..be45095 100644 --- a/content/templates/content/article_archive.html +++ b/content/templates/content/article_archive.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load i18n comments %} + {% block title %} {% trans 'Article Archive' %} {% if active_category %} - {{active_category.name}}{% endif %} @@ -12,35 +13,22 @@ {% if month %}{{ month|date:'F Y' }}{% elif year %}{{year}}{% endif %} {% endblock %} -{% block extra_head %} - - -{% endblock %} - -{% block navigation %} - - -{% endblock %} - -{% block maincontent %} -
-
-

{% trans 'Article Archive' %} +{% block teaser %}

+ {% trans 'Article Archive' %} {% if active_category %} - {{active_category.name}}{% endif %} - {% if month %}{{ month|date:'F Y' }}

{% elif year %}{{year}}{% endif %} - - {{content|safe}} -
-
+ {% if month %}{{ month|date:'F Y' }}{% elif year %}{{year}}{% endif %} + +
+ {% if active_category %} +

{{ active_category.description }}

+ {% else %} + {{current_page.content|safe}} + {% endif %} +
+{% endblock %} -
- {% block date_list %} +{% block redbox %} + {% block date_list %}

{% trans "Archive" %} {{year}}

- {% endblock %} -
+ {% endblock %} +{% endblock %} -
+{% block navigation %} + +{% endblock %} + +{% block maincontent %} +
{% for article in article_list %} {% get_comment_count for article as comment_count %}
@@ -73,12 +72,12 @@ {% empty %}

{% trans "We're sorry. Your search yielded no results." %}

{% endfor %} -
+