Giter VIP home page Giter VIP logo

nephila / djangocms-blog Goto Github PK

View Code? Open in Web Editor NEW
381.0 381.0 190.0 2.74 MB

django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks

Home Page: https://djangocms-blog.readthedocs.io

License: BSD 3-Clause "New" or "Revised" License

Python 95.61% CSS 0.22% HTML 3.91% JavaScript 0.26%
blog django django-blog django-cms hacktoberfest metatags python seo-meta seo-optimization social-network

djangocms-blog's Introduction

djangocms-blog

Join the Gitter chat Latest PyPI version Python versions Latest CI build status Test coverage Code Climate License

django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks.

Supported Django versions:

  • Django 3.2 - 4.2

Supported django CMS versions:

  • django CMS 3.9 - 3.11+

Installation

See installation documentation

Features

See features documentation for all the features details

  • Support for django-app-enabler autoconfiguration.
  • Placeholder content editing
  • Frontend editing using django CMS frontend editor
  • Multilingual support using django-parler
  • Twitter cards, Open Graph and Google+ snippets meta tags
  • Optional simpler TextField-based content editing
  • Multisite (posts can be visible in one or more Django sites on the same project)
  • Per-Apphook configuration
  • Configurable permalinks
  • Configurable django CMS menu
  • Per-Apphook templates set
  • Auto Apphook setup
  • Django sitemap framework
  • django CMS Wizard integration
  • Desktop notifications
  • Liveblog

Known djangocms-blog websites

See DjangoPackages for an updated list https://www.djangopackages.com/packages/p/djangocms-blog/

djangocms-blog's People

Contributors

cluster-master avatar creimers avatar danra avatar db654 avatar dependabot-preview[bot] avatar didierch avatar dipen30 avatar felipefarias avatar fmarco avatar frnhr avatar fsbraun avatar g3rb3n avatar jasujm avatar jedie avatar kynsi avatar maxvyaznikov avatar olibook avatar pcoder avatar petrklus avatar plamen-nikolov avatar pre-commit-ci[bot] avatar protoroto avatar sephii avatar skirsdeda avatar suquant avatar wesleyboar avatar wfehr avatar yakky avatar yunmanger1 avatar zanderle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

djangocms-blog's Issues

placeholder without django admin interface?!?

I'm a little confuse...

The is BLOG_USE_PLACEHOLDER it's True in my case (and by default)...

But it seems that there is no interface to create/edit content via placeholder.
I see only the translated "abstract" field in admin.

So the detail view has always no content, because {% render_placeholder post.content %} will always result in no content.

Installation dependency issue

After installing a django CMS 3 app with the djangocms-installer I installed djangocms-blog using pip. After adding the minimum config and dependencies to the INSTALLED_APPS.

After running ./manage.py migrate I received the following error:
djangocms_blog.0001_initial dependencies reference nonexistent parent node (u'filer', u'0001_initial')"

filer is installed and the same goes for the 0001_initial.py file. Any idea what I'm doing wrong?

Thanks in advance :)

Multiple blog layouts?

Hi,

I'm not a django expert by any means, so forgive me if I'm missing something obvious. I've spent the last few days learning the ropes of django cms and chose your blog to go with it. Is there a way to choose different layouts for posts similar to {% CMS TEMPLATES %} for a CMS page?

Thanks,
Ben

Migration dependency issue

When running migrations (as documented in README.rst) on djangocms-blog on Django 1.7.4 and django-cms 3.0.10, the migrations fails on django/db/migrations/graph.py", line 46 in add_dependency
with the following error:

"Migration %s dependencies reference nonexistent parent node %r" % (migration, parent)
KeyError: u"Migration djangocms_blog.0001_initial dependencies reference nonexistent parent node (u'cms', u'0003_auto_20140926_2347')"

Any ideas on how to resolve this issue?

Blog Entry based placeholder

Hi Yakky,
it would be cool, to set the placeholder functionality for each item in the blog dynamically.

Now it's an all or nothing thing. If I decide to use BLOG_USE_PLACEHOLDER = False I've no chance to add a PDF File, images or other content. In most of the cases the customer does'nt need more than BLOG_USE_PLACEHOLDER = False functionality. But if he needs it...

Therefore a dynamic change of the behaviour for each blog entry would be really cool.

Regards
Thomas

Insecure form action

Hi,

I have just installed djangocms-blog and it works like a charm (thanks). I have one problem though: I'm using http+ssl and when I edit some content I get the following error message on Chromium (Firefox is working):

Mixed Content: The page at 'https://example.org/fr/blog/' was loaded over HTTPS, but requested an insecure form action 'http://example.org/fr/admin/djangocms_blog/post/'. This request has been blocked; the content must be served over HTTPS.

Did I missed something?

Thanks

404 Bug: Display non-published blog for user with edit permissions...

As i describe at #85 (comment) it is a little confusing that non-published blog post are only visible in DRAFT mode.

Now, i find a boring "bug" with it:

  • activate DRAFT mode
  • go to detail view of a non-publish blog entry
  • switch to LIVE mode

This will result into 404... Because you stay at the same URL and the blog entry is not visible, now.

Also not good: If you are in DRAFT: You can't see if a blog post is published or not.

Solution:

  • Don't filter non-published blog entries for user with edit permission.
  • Mark non-published entries (e.g.: just add the Text "not published")

I didn't find a easy way to implement this :(

List only translated posts

It might be a good idea to only show the posts that have translations. This makes more sense, since the user will see only posts in their own language. Plus, it is also a good idea, since this would allow to have different content in different languages (not necessarily just translations, but different posts alltogether)

Save does'nt work in detail view

Hi everybody,
if I save a existend blog post in the detail view of the post, the change will not be saved to the database.

config:
BLOG_USE_PLACEHOLDER = False

Regards
Thomas

Pagination

Hi,

I setup a new blog and have a problem with the pagination. I got this
< a href="?=2" >nächste »< /a >
as Link (the name of the variable does not exists).

Multilingual tags for blog posts

I see that django-taggit is the defacto standard for tagging in django and there's nothing else maintained in this category. But it kind-of doesn't fit the whole picture where everything is supposed to be translatable. I mean if categories can be translated, tags should be translatable as well.
What could be done with this or is it not worth the effort? :)

Reverse for 'taggit_autosuggest-list'

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/en/admin/djangocms_blog/post/add/

Django Version: 1.7.4
Python Version: 3.4.0
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.admin',
 'django.contrib.sites',
 'django.contrib.sitemaps',
 'django.contrib.staticfiles',
 'django.contrib.messages',
 'cms',
 'djangocms_admin_style',
 'djangocms_text_ckeditor',
 'menus',
 'sekizai',
 'mptt',
 'djangocms_file',
 'djangocms_link',
 'djangocms_picture',
 'djangocms_video',
 'cmsplugin_htmlsitemap',
 'cmsplugin_pygments',
 'reversion',
 'reversion_compare',
 'compressor',
 'django_extensions',
 'filer',
 'easy_thumbnails',
 'cmsplugin_filer_image',
 'parler',
 'taggit',
 'taggit_autosuggest',
 'django_select2',
 'meta',
 'meta_mixin',
 'admin_enhancer',
 'djangocms_blog',
 'django_info_panel',
 'pylucid',
 'example_project',
 'pylucid_migration')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'cms.middleware.user.CurrentUserMiddleware',
 'cms.middleware.page.CurrentPageMiddleware',
 'cms.middleware.toolbar.ToolbarMiddleware',
 'cms.middleware.language.LanguageCookieMiddleware')


Template error:
In template /home/jens/PyLucid_env/lib/python3.4/site-packages/django/contrib/admin/templates/admin/includes/fieldset.html, error at line 19
   Reverse for 'taggit_autosuggest-list' with arguments '()' and keyword arguments '{'tagmodel': 'taggit.tag'}' not found. 0 pattern(s) tried: []
   9 :             {% for field in line %}


   10 :                 <div{% if not line.fields|length_is:'1' %} class="field-box{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}"{% elif field.is_checkbox %} class="checkbox-row"{% endif %}>


   11 :                     {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %}


   12 :                     {% if field.is_checkbox %}


   13 :                         {{ field.field }}{{ field.label_tag }}


   14 :                     {% else %}


   15 :                         {{ field.label_tag }}


   16 :                         {% if field.is_readonly %}


   17 :                             <p>{{ field.contents }}</p>


   18 :                         {% else %}


   19 :                              {{ field.field }} 


   20 :                         {% endif %}


   21 :                     {% endif %}


   22 :                     {% if field.field.help_text %}


   23 :                         <p class="help">{{ field.field.help_text|safe }}</p>


   24 :                     {% endif %}


   25 :                 </div>


   26 :             {% endfor %}


   27 :         </div>


   28 :     {% endfor %}


   29 : </fieldset>


Traceback:
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
  137.                 response = response.render()
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/response.py" in render
  103.             self.content = self.rendered_content
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/response.py" in rendered_content
  80.         content = template.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  148.             return self._render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in _render
  142.         return self.nodelist.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  126.         return compiled_parent._render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in _render
  142.         return self.nodelist.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  126.         return compiled_parent._render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in _render
  142.         return self.nodelist.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  126.         return compiled_parent._render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in _render
  142.         return self.nodelist.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  65.                 result = block.nodelist.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  65.                 result = block.nodelist.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render
  90.             output = self.filter_expression.resolve(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in resolve
  596.                 obj = self.var.resolve(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in resolve
  734.             value = self._resolve_lookup(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in _resolve_lookup
  788.                             current = current()
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/loader_tags.py" in super
  74.             return mark_safe(self.render(self.context))
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  65.                 result = block.nodelist.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/defaulttags.py" in render
  201.                             nodelist.append(node.render(context))
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  150.                 return template.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  148.             return self._render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in _render
  142.         return self.nodelist.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/defaulttags.py" in render
  201.                             nodelist.append(node.render(context))
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/defaulttags.py" in render
  201.                             nodelist.append(node.render(context))
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/defaulttags.py" in render
  312.                 return nodelist.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/defaulttags.py" in render
  312.                 return nodelist.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/template/debug.py" in render
  93.             output = force_text(output)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/utils/encoding.py" in force_text
  83.                     s = six.text_type(s)
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/forms/forms.py" in __str__
  508.         return self.as_widget()
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/forms/forms.py" in as_widget
  560.         return force_text(widget.render(name, self.value(), attrs=attrs))
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/taggit_autosuggest/widgets.py" in render
  28.         autosuggest_url = reverse('taggit_autosuggest-list', kwargs={'tagmodel': self.tagmodel})
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/core/urlresolvers.py" in reverse
  551.     return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
File "/home/jens/PyLucid_env/lib/python3.4/site-packages/django/core/urlresolvers.py" in _reverse_with_prefix
  468.                              (lookup_view_s, args, kwargs, len(patterns), patterns))

Exception Type: NoReverseMatch at /en/admin/djangocms_blog/post/add/
Exception Value: Reverse for 'taggit_autosuggest-list' with arguments '()' and keyword arguments '{'tagmodel': 'taggit.tag'}' not found. 0 pattern(s) tried: []

Internal Server Error: /admin/djangocms_blog/post/

I have a staging instance of a djangocms with a djangocms blog running here: http://85.214.27.139/magazin/

It's been working great. But since just this morning, I've been receiving nasty internal server error reporting emails from Django. Essentially it is saying:

ValueError: Database returned an invalid value in QuerySet.datetimes(). Are time zone definitions for your database and pytz installed?

I get this when I add a new blogpost and then try to look at the admin list view of the blog posts. When I delete the latest post using ./manage.py shell, I can look at the admin list view again no problem.

I'm using

  • python 3.4.
  • django 1.7.5
  • djangocms 3.0.13
  • djangocsm-blog 0.4.b1
  • mysql

Do you know what might be at hand here? Thanks.

Error on installation!

Some days ago I started I blog test on a dev system. Now I want setup the blog on my productive system and I got this error:

(env)david@dh-main:/tmp/cb5/ProjectSite$ pip install djangocms-blog
Downloading/unpacking djangocms-blog
Downloading djangocms_blog-0.3.0-py2.py3-none-any.whl (78kB): 78kB downloaded
Downloading/unpacking django-meta-mixin>=0.1.1 (from djangocms-blog)
Downloading django_meta_mixin-0.1.1-py2.py3-none-any.whl
Downloading/unpacking django-select2-py3 (from djangocms-blog)
Downloading Django-Select2-Py3-4.2.1.tar.gz (90kB): 90kB downloaded
Running setup.py (path:/tmp/cb5/ProjectSite/env/build/django-select2-py3/setup.py) egg_info for package django-select2-py3
Traceback (most recent call last):
File "", line 17, in
File "/tmp/cb5/ProjectSite/env/build/django-select2-py3/setup.py", line 75
% (fn, pattern)), file=sys.stderr)
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 17, in

File "/tmp/cb5/ProjectSite/env/build/django-select2-py3/setup.py", line 75

% (fn, pattern)), file=sys.stderr)

                      ^

SyntaxError: invalid syntax

I use: python 2.7

Haystack search_index

The blog has to be searchable (using Haystack functionality). It's a customer requirement (we have to index the complete website).

Do you have any plans for such an integration?

There are two ways to implement that behaviour.
a) integration into djangocms-blog
or
b) creation of a new plugin djangocms-blog-search

Which way is your preferred one?

Latest entries plugin

Hi all!

  • just figured out that the category filter for the latest entries plugin doesn't work (filter by tag is fine).
    Am i missing anything or is it a bug?

in the models (line 241) there is anything regarding categories:

 class LatestPostsPlugin(BasePostPlugin):

    latest_posts = models.IntegerField(_(u'Articles'), default=get_setting('LATEST_POSTS'),
                                       help_text=_('The number of latests articles to be displayed.'))
    tags = models.ManyToManyField('taggit.Tag', blank=True,
                                  help_text=_('Show only the blog articles tagged with chosen tags.'))
    categories = models.ManyToManyField('BlogCategory', blank=True,
                                        help_text=_('Show only the blog articles tagged with chosen categories.'))

    def __str__(self):
        return u'%s latest articles by tag' % self.latest_posts

    def copy_relations(self, oldinstance):
        self.tags = oldinstance.tags.all()

    def get_posts(self, request):
        posts = self.post_queryset(request)
        tags = list(self.tags.all())
        if tags:
            posts = posts.filter(tags__in=tags)
        return posts[:self.latest_posts]
  • shouldn't the placeholder variable be sent to the template?

Logo for djangocms-blog

Do we have a logo for djangocms-blog?

I am in the process of creating my own blog page and I would like to display the django-cms and djangocms-blog logos.

Near-production

Near production-ready version.

  • Better admin
  • Streamlined editing UX
  • Documentation
  • Tests

Question: Abstract ≠ Content?

I'm playing around with djangocms-blog and I like it. However, I run into questions.

When adding a blog post, there's an abstract field. It's content is nicely displayed for each single items on the blog list view. On a blog item's view, however, this text is not displayed. Is it that I manually have to define the blog item's content on the respective item's page?

plugin content (pygments html code) and {% spaceless %}

The template use often {% spaceless %}: https://github.com/nephila/djangocms-blog/search?l=html&q={%25+spaceless+%25}

This is ok, instead if you have a <pre>...</pre> area ;)

I use "CMSPygmentsPlugin" to add sourcecode into blog articles...
Pygments use a <pre>...</pre> area, whitch will be useless, because {% spaceless %} removes all \n newlines... So is result in one-line code block ;)

What to do here?!? Just try to exclude the {% render_placeholder post.content %} part?

0001_initial.py migration fails due to out of date dependency on django-taggit

When installing djangocms-blog on Django 1.7.4 trough pip, and subsequently running

python manage.py migrate

migration 0001_initial.py fails with error message:

/migrations/0001_initial.py", line 97, in Migration
    ('tags', taggit_autosuggest.managers.TaggableManager(to='taggit.Tag', through='taggit.TaggedItem', blank=True, help_text='A comma-separated list of tags.', verbose_name='Tags')),
TypeError: __init__() got an unexpected keyword argument 'to'

This seems to be because an obsolete version of django-taggit is installed, where to is not a valid parameter to TaggableManager. When installing django-taggit >= 0.12 the migration works.

Question: How to create a enhanced blog page?!?

I'm new to djangocms and try to setup a full features blog page. similar to https://www.django-cms.org/en/blog/

Currently i see this solution:

  • one page with the blog AppHook
  • one normal djangocms page with template='sidebar_left.html':
    • Placeholder with slot="content" contains "BlogLatestEntriesPlugin"
    • Placeholder with slot="sidebar" contains: "BlogArchivePlugin", "BlogAuthorPostsPlugin", "BlogCategoryPlugin" and "BlogTagsPlugin"

The second "sidebar" page, looks similar to https://www.django-cms.org/en/blog/
But if i click on a "Read more" i will go to the first Blog-AppHook page and the Archive, Tags etc. are gone (Because they aren't on this page)

I didn't see a solution for this...

Saving category when adding post isn't refreshing list.

When I click Save to create new category in dialog It doesn't refresh in parent window.

In js console there is error Uncaught ReferenceError: SelectBox is not defined . There isn't anywhere included SelectBox.js so seems to me that there is error somewhere.

Content(body) field missing in interface

I have installed this plugin. However, when I add a new post I am unable to add content to it. The closest thing to it is the "abstract" field, but I dont thing that is the correct one.
Where am I supposed to add the main article(content) for the blog post?

NoReverseMatch: u'djangocms_blog' is not a registered namespace, error in get_absolute_url in Post

Environment:


Request Method: GET
Request URL: http://0.0.0.0:8000/ru/blog/?edit_off

Django Version: 1.6.5
Python Version: 2.7.6
Installed Applications:
('admin_tools',
 'admin_tools.theming',
 'admin_tools.menu',
 'admin_tools.dashboard',
 'djangocms_text_ckeditor',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.admin',
 'django.contrib.sites',
 'django.contrib.sitemaps',
 'django.contrib.staticfiles',
 'django.contrib.messages',
 'cms',
 'mptt',
 'menus',
 'south',
 'sekizai',
 'djangocms_style',
 'djangocms_column',
 'djangocms_file',
 'djangocms_flash',
 'djangocms_googlemap',
 'djangocms_inherit',
 'djangocms_link',
 'djangocms_picture',
 'djangocms_teaser',
 'djangocms_video',
 'reversion',
 'main',
 'crashreport',
 'lottery',
 'subscribe',
 'social_auth',
 'taggit',
 'taggit_autosuggest',
 'filer',
 'easy_thumbnails',
 'hvad',
 'django_select2',
 'cmsplugin_filer_image',
 'parler',
 'cmsplugin_filer_file',
 'cmsplugin_filer_folder',
 'cmsplugin_filer_link',
 'cmsplugin_filer_video',
 'cmsplugin_filer_teaser',
 'cmsplugin_filer_utils',
 'meta',
 'meta_mixin',
 'admin_enhancer',
 'djangocms_blog',
 'registration',
 'registration_email')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'cms.middleware.user.CurrentUserMiddleware',
 'cms.middleware.page.CurrentPageMiddleware',
 'cms.middleware.toolbar.ToolbarMiddleware',
 'cms.middleware.language.LanguageCookieMiddleware')


Template error:
In template /home/viator/coding/PreppyLLC/web/apps/djangocms_blog/templates/djangocms_blog/includes/blog_item.html, error at line 6
   u'djangocms_blog' is not a registered namespace
   1 : {% load i18n thumbnail cms_tags %}


   2 : {% load url from future %}


   3 : 


   4 : <article id="post-{{ post.slug }}" class="post-item">


   5 :     <header>


   6 :         <h3><a href=" {{ post.get_absolute_url }} ">{{ post.title }}</a></h3>


   7 :      {% block blog_meta %}


   8 :             <ul class="post-detail">


   9 :                 <li>


   10 :                     {% trans "by" %} <a href="{% url 'djangocms_blog:posts-author' post.author.username %}">{{ post.author.get_full_name }}</a>


   11 :                 </li>


   12 :                 <li>


   13 :                     {{ post.date_published|date:"M d, Y" }}


   14 :                 </li>


   15 :             </ul>


   16 :             <ul class="post-detail tags">


Traceback:
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  137.                 response = response.render()
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/response.py" in render
  105.             self.content = self.rendered_content
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/response.py" in rendered_content
  82.         content = template.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in render
  140.             return self._render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  123.         return compiled_parent._render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  123.         return compiled_parent._render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/classytags/core.py" in render
  106.         return self.render_tag(context, **kwargs)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/sekizai/templatetags/sekizai_tags.py" in render_tag
  76.         rendered_contents = nodelist.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/classytags/core.py" in render
  106.         return self.render_tag(context, **kwargs)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/cms/templatetags/cms_tags.py" in render_tag
  667.         rendered_contents = nodelist.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  62.             result = block.nodelist.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  62.             result = block.nodelist.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/defaulttags.py" in render
  196.                         nodelist.append(node.render(context))
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  155.         return self.render_template(self.template, context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render_template
  137.         output = template.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in render
  140.             return self._render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in render
  840.                 bit = self.render_node(node, context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  78.             return node.render(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/debug.py" in render
  88.             output = self.filter_expression.resolve(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in resolve
  585.                 obj = self.var.resolve(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in resolve
  735.             value = self._resolve_lookup(context)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/template/base.py" in _resolve_lookup
  789.                             current = current()
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/utils/functional.py" in _curried
  15.         return _curried_func(*(args + moreargs), **dict(kwargs, **morekwargs))
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/db/models/base.py" in get_absolute_url
  1009.     return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.model_name), func)(self, *args, **kwargs)
File "/home/viator/coding/PreppyLLC/web/apps/djangocms_blog/models.py" in get_absolute_url
  179.         return reverse('djangocms_blog:post-detail', kwargs=kwargs)
File "/home/viator/coding/PreppyLLC/env/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in reverse
  528.                                          key)

Exception Type: NoReverseMatch at /ru/blog/
Exception Value: u'djangocms_blog' is not a registered namespace

Error when using djangocms-blog and aldryn_search

Hello,

I tried to use djangocms-blog on my DjangoCMS 3 website and it works great. But when I add a few blog posts, enable aldryn_search and rebuild the haystack index, I get the following error:

ERROR:root:Error updating cms using default
Traceback (most recent call last):
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 189, in handle_label
self.update_backend(label, using)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 234, in update_backend
do_update(backend, index, qs, start, end, total, self.verbosity)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 89, in do_update
backend.update(index, current_qs)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/backends/solr_backend.py", line 54, in update
docs.append(index.full_prepare(obj))
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/indexes.py", line 207, in full_prepare
self.prepared_data = self.prepare(obj)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/aldryn_search/base.py", line 42, in prepare
self.prepared_data['text'] = self.get_search_data(obj, current_language, request)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/aldryn_search/search_indexes.py", line 52, in get_search_data
plugin_text_content = self.get_plugin_search_text(base_plugin, request)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/aldryn_search/search_indexes.py", line 68, in get_plugin_search_text
plugin_content_bits = get_plugin_index_data(base_plugin, request)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/aldryn_search/helpers.py", line 41, in get_plugin_index_data
plugin_contents = instance.render_plugin(context=RequestContext(request))
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/cms/models/pluginmodel.py", line 172, in render_plugin
context = plugin.render(context, instance, placeholder_slot)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/djangocms_blog/cms_plugins.py", line 27, in render
context['posts_list'] = instance.get_posts(context['request'])
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/djangocms_blog/models.py", line 254, in get_posts
posts = self.post_queryset(request)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/djangocms_blog/models.py", line 230, in post_queryset
if not request.toolbar or not request.toolbar.edit_mode:
AttributeError: 'WSGIRequest' object has no attribute 'toolbar'
Traceback (most recent call last):
File "./manage.py", line 12, in
execute_from_command_line(sys.argv)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/django/core/management/init.py", line 385, in execute_from_command_line
utility.execute()
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/django/core/management/init.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(_args, *_options.dict)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
output = self.handle(_args, *_options)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/management/commands/rebuild_index.py", line 16, in handle
call_command('update_index', *_options)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/django/core/management/init.py", line 115, in call_command
return klass.execute(_args, *_defaults)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
output = self.handle(_args, *_options)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 184, in handle
return super(Command, self).handle(_items, *_options)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/django/core/management/base.py", line 503, in handle
label_output = self.handle_label(label, *_options)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 189, in handle_label
self.update_backend(label, using)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 234, in update_backend
do_update(backend, index, qs, start, end, total, self.verbosity)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 89, in do_update
backend.update(index, current_qs)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/backends/solr_backend.py", line 54, in update
docs.append(index.full_prepare(obj))
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/haystack/indexes.py", line 207, in full_prepare
self.prepared_data = self.prepare(obj)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/aldryn_search/base.py", line 42, in prepare
self.prepared_data['text'] = self.get_search_data(obj, current_language, request)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/aldryn_search/search_indexes.py", line 52, in get_search_data
plugin_text_content = self.get_plugin_search_text(base_plugin, request)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/aldryn_search/search_indexes.py", line 68, in get_plugin_search_text
plugin_content_bits = get_plugin_index_data(base_plugin, request)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/aldryn_search/helpers.py", line 41, in get_plugin_index_data
plugin_contents = instance.render_plugin(context=RequestContext(request))
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/cms/models/pluginmodel.py", line 172, in render_plugin
context = plugin.render(context, instance, placeholder_slot)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/djangocms_blog/cms_plugins.py", line 27, in render
context['posts_list'] = instance.get_posts(context['request'])
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/djangocms_blog/models.py", line 254, in get_posts
posts = self.post_queryset(request)
File "/home/eugene/.virtualenvs/expresso/local/lib/python2.7/site-packages/djangocms_blog/models.py", line 230, in post_queryset
if not request.toolbar or not request.toolbar.edit_mode:
AttributeError: 'WSGIRequest' object has no attribute 'toolbar'

I fixed the issue by editing the line 230 in models.py by adding the "hasattr" test, like this:

@python_2_unicode_compatible
class BasePostPlugin(CMSPlugin):

    class Meta:
        abstract = True

    def post_queryset(self, request):
        language = get_language()
        posts = Post._default_manager.active_translations(language_code=language)
        if not hasattr(request, 'toolbar') or not request.toolbar or not request.toolbar.edit_mode:
            posts = posts.published()
        return posts

    def __str__(self):
        return unicode(self.latest_posts)

For your information, here is a list of packages I use:
Django==1.7.1
aldryn-search==0.2.4
django-cms==3.1.0.dev1
djangocms-blog==0.3.0.c1
...

Do you think it is the best way to go? Could you integrate this fix in your code? I think that DjangoCMS 3, djangocms-blog and aldryn_search is a great combination!

{% page_attribute "changed_date" %}

I add a {% page_attribute "changed_date" %} into the base template.

On a blog entry detail page, this date is not the blog date. It seems that this is the AppHook-Page date.

Is that normal?!?

Creating multiple independent blogs

I wanted to create a site with multiple independent blog pages and I was hoping the "application instance name" field will allow me to do that.

What does the "Application Instance name" field do?

I guessed that it might allow me to create multiple pages, and associate them with different blogs. Basically, create separate independent blog pages (for example, I could have a blog on physics simulations, and another on origami and I want to keep them completely separate).

However, on creating 2 different pages, both associated with the Blog application, but with different "application instance names", I saw that any blog posts that I create in one show up in the other as well.

Is there a way to create multiple independent blogs with djangocms-blog?

ps: This might be a django cms question rather than a djangocms-blog question, and I apologize in advance if that is the case...

(Edited issue title and text)

suggestion: use TranslatableSlugMixin for django-parler 1.0b3

hi! I was just checking out this app, see what I could learn from it, and see how parler is used. Nice work :)

In 1.0b3 I've added a nice TranslatableSlugMixin, which makes the detail view much easier to use (and handles fallback-translation URLs too). I think you'll find this useful as well! :)

u'djangocms_blog' is not a registered namespace

When I added a plugin to my page, this showed up.
I fixed it by adding url(r'^blog/', include('djangocms_blog.urls', namespace='djangocms_blog')), to the urls.py. If this is the normal way to fix it. Please add it to the installation docs.

Unusual behavior with the TagAutoSuggest widget in the LatestEntriesForm

When initially adding a LatestEntriesPlugin, as expected, only the latest_posts field is required. Subsequently trying to edit the plugin, however, results in a standard "Enter a list of values" error on the tags field. Even adding a tag doesn't seem to remove the error. Removing the widget TagAutoSuggest from forms.py and using the default django field works correctly.

screenshot from 2015-08-13 11 25 53

Using:
djangocms-blog - develop branch
django-cms==3.1.2
django-taggit==0.16.4
django-taggit-autosuggest==0.2.7

Addtoblock not loading custom css or js

I'm working on a custom base template and I am having difficulty getting my stylesheet to load.

My base.html is as follow:

{% extends CMS_TEMPLATE %}

{% load sekizai_tags staticfiles %}
{% addtoblock "css" %}
  <link href='{% static "djangocms_blog/css/djangocms_blog.css" %}' rel="stylesheet" type="text/css">
{% endaddtoblock %}

{% addtoblock 'js' %}
  <script type="text/javascript" src='{% static "js/libs/pym.js" %}'></script>
{% endaddtoblock %}

{% block meta %}
    {%  if meta %}
        {% include "meta_mixin/meta.html" %}
    {% endif %}
{% endblock meta %}

{% block content %}
<div class="container-fluid app app-blog">

    {% block content_blog %}{% endblock %}
</div>
{% endblock content %}

The format of the static tags is the same as in other parts of my cms application. However, the assets are not being loaded. I cannot find any documentation that provides clarification on custom static asset loading. Am I missing something obvious?

Thanks.

question: post.meta_description text field

I noticed that in model.py, meta_description and meta_keywords are of type TextField, but meta description doesn't render as a Text Field. Instead, meta description renders as ordinary input.

Admitting that I haven't scrutinizing as much as I could: do you deliberately overwrite the widget somewhere? Do you want to keep it that way?

I would prefer if meta description also was a text field.

bildschirmfoto 2015-06-17 um 19 39 34

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.