Coder Social home page Coder Social logo

aldryn-blog's Issues

missing scripts in admin template

in templates/admin/post/change_form.html line 7:
...cms/js/plugins/cms.base.js
shouldn`t it be
...cms/js/modules/cms.base.js

The same with changeform.js...

Fix empty urls

there are some urls that point to an error like:
blog/tag/
blog/2012/5/14/

which should either render all tags or the current posts of one day.

Admin view

Add taggit to the Aldryn_Blog section instead of separate entry so you would have:

  • Posts
  • Tags

Cannot add content to blog article

Using Django 1.6.4, Django CMS 3.0.1 and aldryn-blog 0.3.9 with a sqlite db.

I followed the instructions and am able to add a blog article .... but I can only add the lead-in text. How and where do I add the article content?

image

minor fixes

  • LatestBlogEntries Plugin should have a default value for "Latest entries". Say 5.
  • LatestBlogEntries Plugin should not filter based on tags if none are selected (selecting no tag should display all)
  • make blog templates editable in the online editor
  • don't 404 if there are no blog entries (show an empty list instead)

bad_table_name, proper_table_name, model._meta.app_label

I was told this was a aldryn-blog problem rather than django-cms, so I am posting it here. (im a django beginner) After Installing django-cms by following the tutorial at https://github.com/divio/django-cms-tutorial and using the recommended "stable" releases and also installing aldryn-blog i get these depreciation errors.

/home/msables/.envs/teethinline/local/lib/python2.7/site-packages/cms/admin/placeholderadmin.py:570: DeprecationWarning: Class FrontendEditableAdmin is deprecated and will be removed in 3.1. Instead, use FrontendEditableAdminMixin.
"Instead, use FrontendEditableAdminMixin.", DeprecationWarning)

/home/msables/.envs/teethinline/local/lib/python2.7/site-packages/cms/admin/placeholderadmin.py:563: DeprecationWarning: Class PlaceholderAdmin is deprecated and will be removed in 3.1. Instead, combine PlaceholderAdminMixin with admin.ModelAdmin.
"Instead, combine PlaceholderAdminMixin with admin.ModelAdmin.", DeprecationWarning)

/home/msables/.envs/teethinline/local/lib/python2.7/site-packages/filer/admin/clipboardadmin.py:5: DeprecationWarning: django.utils.simplejson is deprecated; use json instead.
from django.utils import simplejson

/home/msables/.envs/teethinline/local/lib/python2.7/site-packages/cms/plugin_pool.py:157: DeprecationWarning: please rename the table "cmsplugin_latestentriesplugin" to "aldryn_blog_latestentriesplugin" in aldryn_blog
The compatibility code will be removed in 3.1
bad_table_name, proper_table_name, model._meta.app_label), DeprecationWarning)

/home/msables/.envs/teethinline/local/lib/python2.7/site-packages/cms/plugin_pool.py:157: DeprecationWarning: please rename the table "cmsplugin_authorsplugin" to "aldryn_blog_authorsplugin" in aldryn_blog
The compatibility code will be removed in 3.1
bad_table_name, proper_table_name, model._meta.app_label), DeprecationWarning)

I am using the recommended postgresql database. How do i correct these warnings?

Blog content user perspective

Hi guys,

I'm working quite intensively with Django-CMS and I'm impressed with aldryn-blog. I have a suggestion and I hope you find it useful.

From the user point of view, isn't it better to add a post by doing this simple steps:
Blog -> Add blog post -> Insert Lead-in and also Blog content, fill the rest of the fields and you are done!
And then just edit, if you need, in the front-end.

The body could be a HTMLField in the Post model and then render_model in the details template, or put TextPlugin inside the content placeholder in order to be able to add more features, but the point is: you will be able to have your post ready in just three steps :)

Cheers

Can not add Latest Blog Entries plugin, crashes on "save" and is created empty

I have tried this several times and in different installations.
How I replicate this everytime with the same results is like this:

  1. Create a virtual environment and activate it.
  2. Install 'djangocms-installer' via pip.
  3. Run 'djangocms' to create a demo project. sqlite database, bootstrap and demo homepage selected.
  4. Install aldryn-blog via pip. Add the relevant for it to INSTALLED_APPS and then perform "manage syncdb" and also "manage migrate".
  5. Create a page which is then connected to the Blog App. Add 2-3 blog posts for testing.
  6. Add a plugin "Latest blog Entries" somewhere in the pages at the 'content' section. When selecting "save", there is an error message: "Share this trace at a public site" but which disappears after one second and I am returned to 'structure' mode of the page. I can actually see the Latest Blog Entries plugin where I was to place it, but it is non functional and it shows the word . There are no messages at all generated at the console where I have launched "manage runserver".

I tried this also (but I don't know if this is related to the above):

  1. Opened a django shell via "manage shell".
  2. Issued: >>> from aldryn_blog.models import LatestEntriesPlugin
  3. Issued: >>> LatestEntriesPlugin.objects.all()

I got the following error lines:

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/query.py", line 71, in repr
data = list(self[:REPR_OUTPUT_SIZE + 1])
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/query.py", line 96, in iter
self._fetch_all()
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/query.py", line 854, in _fetch_all
self._result_cache = list(self.iterator())
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
for row in compiler.results_iter():
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 709, in results_iter
for rows in self.execute_sql(MULTI):
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 782, in execute_sql
cursor.execute(sql, params)
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/backends/util.py", line 69, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/utils.py", line 99, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/backends/util.py", line 53, in execute
return self.cursor.execute(sql, params)
File "/usr/local/marvian/lessons/zarfi/env_zarfi/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 450, in execute
return Database.Cursor.execute(self, query, params)
OperationalError: no such table: aldryn_blog_latestentriesplugin

I hope this helps.
Regards.

ImportError: cannot import name FrontendEditableAdmin

I got an import error of FrontendEditableAdmin in admin.py at line12. Could any body help me to fix it?
Below is my settings,
Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/en/

Django Version: 1.5.5
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'cms',
'mptt',
'menus',
'south',
'sekizai',
'easy_thumbnails',
'reversion',
'django_select2',
'hvad',
'djangocms_text_ckeditor',
'filer',
'taggit',
'aldryn_blog')
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.page.CurrentPageMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.language.LanguageCookieMiddleware')

Traceback:
File "/home/youyix/djangoWorkspace/Dcms/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                 response = middleware_method(request)
    
    File "/home/youyix/djangoWorkspace/Dcms/env/local/lib/python2.7/site-packages/django/middleware/locale.py" in process_request
  2.     check_path = self.is_language_prefix_patterns_used()
    
    File "/home/youyix/djangoWorkspace/Dcms/env/local/lib/python2.7/site-packages/django/middleware/locale.py" in is_language_prefix_patterns_used
  3.     for url_pattern in get_resolver(None).url_patterns:
    
    File "/home/youyix/djangoWorkspace/Dcms/env/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in url_patterns
  4.     patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    
    File "/home/youyix/djangoWorkspace/Dcms/env/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in urlconf_module
  5.         self._urlconf_module = import_module(self.urlconf_name)
    
    File "/home/youyix/djangoWorkspace/Dcms/env/local/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  6. **import**(name)
    
    File "/home/youyix/djangoWorkspace/Dcms/asite/asite/urls.py" in
  7. admin.autodiscover()
    File "/home/youyix/djangoWorkspace/Dcms/env/local/lib/python2.7/site-packages/django/contrib/admin/init.py" in autodiscover
  8.         import_module('%s.admin' % app)
    
    File "/home/youyix/djangoWorkspace/Dcms/env/local/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  9. **import**(name)
    
    File "/home/youyix/djangoWorkspace/Dcms/env/local/lib/python2.7/site-packages/aldryn_blog/admin.py" in
  10. from cms.admin.placeholderadmin import FrontendEditableAdmin

Exception Type: ImportError at /en/
Exception Value: cannot import name FrontendEditableAdmin

Issues on authors

I get the following error when adding the authors plugin:

IntegrityError at /en/admin/stacks/stack/edit-plugin/9/
null value in column "author_id" violates not-null constraint
DETAIL:  Failing row contains (9, null, 5).
    """
    def __init__(self, cursor):
        self.cursor = cursor
    def execute(self, query, args=None):
        try:
            return self.cursor.execute(query, args) ...
        except Database.IntegrityError as e:
            six.reraise(utils.IntegrityError, utils.IntegrityError(*tuple(e.args)), sys.exc_info()[2])
        except Database.DatabaseError as e:
            six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), sys.exc_info()[2])
    def executemany(self, query, args):

LatestEntriesPlugin failure

So I have a cms page with a placeholder,

{% static_placeholder "newsitems" %}

here, I want to add the LatestEntriesPlugin.
But it doen't work. I have more than 3 blog post, but when I want to create this plugin with the latest 3, I get no blog posts at all.

I found out the issue was in LatestEntriesPlugin model. When I comment the __unicode__, all works perfectly:

class LatestEntriesPlugin(CMSPlugin):
    latest_entries = models.IntegerField(default=5, help_text=_('The number of latests entries to be displayed.'))
    tags = models.ManyToManyField('taggit.Tag', blank=True, help_text=_('Show only the blog posts tagged with chosen tags.'))

    # def __unicode__(self):
    #     return str(self.latest_entries)

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

    def get_posts(self):
        posts = Post.published.filter_by_language(self.language)
        tags = list(self.tags.all())
        if tags:
            posts = posts.filter(tags__in=tags)
        return posts[:self.latest_entries]

One question is, why is this __unicode__ here? Regarding this model is not available in the admin site, it seems this code is overflowing...

Please repair model 'Post' :)

Hi, I'm use custom model in django cms and your plugin.
Please add this line in models:

...
from .utils import generate_slugs, get_blog_authors, get_slug_for_user

User = getattr(settings, 'AUTH_USER_MODEL', User)
...

This code repairs the problem of its own the user class. :)

Aldryn-blog installation error

Hi all,

i installed the latest version of django-cms and so the django-mptt 0.6.0.
When i try to install aldryn-blog the installation fails on the version of django-mptt cause it requires below 0.6.0
Do anyone know a solution for this?

Thanks and best regards
Manuel

Language field

While blog entries themselves shouldn't be translatable, it should be possible to set the language of a blog post so that only blog posts in the user's language are displayed.

  • should use settings.LANGUAGES as choices
  • nullable/blank (which means: display this entry in all languages)
  • not displayed if len(settings.LANGUAGES) == 1
  • Views only display entries with language in (get_language(), None)

migration dependency

the aldryn-blog migrations depend on taggit.
If taggit happens to be under aldryn_blog in installed apps, there is a migration error.

Can't Install because of Django-Select 2

I can't install this app because Django-Select2 is not compatible with Python3 . I found a specific branch of Django-Select2 with Python 3 support. I installed it, but aldryn-blog still wants to install the non Python3 version.

(env2)jeremy@AtlasShrugged ~/Dropbox/Programming/webdevelopment/newtest $ pip install aldryn-blog
Downloading/unpacking aldryn-blog
  Downloading aldryn-blog-0.3.12.tar.gz
  Running setup.py (path:/home/jeremy/Dropbox/Programming/webdevelopment/newtest/env2/build/aldryn-blog/setup.py) egg_info for package aldryn-blog

    warning: no previously-included files matching '*.pyc' found under directory '*'
Downloading/unpacking django-taggit<0.12 (from aldryn-blog)
  Downloading django_taggit-0.11.2-py2.py3-none-any.whl
Downloading/unpacking django-filer (from aldryn-blog)
  Downloading django-filer-0.9.5.tar.gz (739kB): 739kB downloaded
  Running setup.py (path:/home/jeremy/Dropbox/Programming/webdevelopment/newtest/env2/build/django-filer/setup.py) egg_info for package django-filer

Downloading/unpacking django-select2 (from aldryn-blog)
  Downloading Django-Select2-4.2.2.tar.gz (91kB): 91kB downloaded
  Running setup.py (path:/home/jeremy/Dropbox/Programming/webdevelopment/newtest/env2/build/django-select2/setup.py) egg_info for package django-select2
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/home/jeremy/Dropbox/Programming/webdevelopment/newtest/env2/build/django-select2/setup.py", line 154
        print data['error_code']
                 ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/home/jeremy/Dropbox/Programming/webdevelopment/newtest/env2/build/django-select2/setup.py", line 154

Also as a side note I tried this with just a Python2.7 Environment and it worked. However I used sqlite3 as the database which is supposedly not supported. It seemed to work just fine. Whats not supposed to work with sqlite3?

Thank you!

: (

TemplateDoesNotExist at /admin/aldryn_blog/category/add/

When I am using admin interface to Aldryn Blog's application I am receiving Django template-loader postmortem Error.

My Installed apps are

('djangocms_admin_style',
'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',
'defesa_vida',
'aldryn_common',
'aldryn_blog',
'django_select2',
'djangocms_text_ckeditor',
'easy_thumbnails',
'filer',
'taggit')

Does anyone had one idea to this?
Thanks in advance

error: You selected an apphook with an "app_name". You must enter a instance name.

Hi,

I wanted to try your app but I got an error while creating the blog page.

I installed django-cms following the readme here:
https://github.com/divio/django-cms-tutorial/blob/master/Step%201%20-%20Initial%20Setup.md

Then I installed your app following the readme of your app.
Everything went fine during the installation.

Now, after I try to add the blog page, that is following this "In order to display them, create a CMS page and install the app there (choose Blog from the Advanced Settings -> Application dropdown).", so that I select Blog for the application, I got the following error:

"You selected an apphook with an "app_name". You must enter a instance name."

This happened with django-cms 3.0rc1 with both django 1.5 and 1.6.

Slug validation missing

When a slug is provided during the creation of a post, the validity of the slug is not verify. For example, if the slug contain space or commas I'm getting:

NoReverseMatch: Reverse for 'post-detail' with arguments '()' and
keyword arguments '{'year': 2014, 'slug': u'dummy, foo, bar', 'day': 8,
'month': 5}' not found. 1 pattern(s) tried: [u'en/blog/(?P<year>\\d{4})/
(?P<month>\\d{1,2})/(?P<day>\\d{1,2})/(?P<slug>\\w[-\\w]*)/$']

In addition, if the slug is not provided and the title doesn't contain any valid character (Cyrillic/Chinese/Arab... title) the slug created is an empty string and the same bug occur.

I can try to provide a pull request, this weekend.

installing aldryn-blog in django-cms breaks djangocms_link plugin

This is very easy to reproduce. I discovered this by following the tutorial at:
"divio / django-cms-tutorial" where as an example at Step 6 of the tutorial, is used the installation of a blog app, the aldryn-blog app.
The link plugin works correctly until the completion of the steps described to install aldryn-blog. After that, any attempt to create a link using the plugin from the frontend editor, generates an error.

It would seem that the error actually is connected to django-select2 which is installed automatically when installing aldryn-blog.
I fixed this in my cms installation by modifying the project's "urls.py" file and adding the line:
url(r'^select2/', include('django_select2.urls')),
at the urlpatterns section.

Currently, my sections that deal with the urlpatterns is as follows:

=========== CUT ====================
urlpatterns = patterns('',
url(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': {'cmspages': CMSSitemap}}),
url(r'^select2/', include('django_select2.urls')),
)

urlpatterns += i18n_patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^', include('cms.urls')),
)
============== CUT ==================

After this change, the link plugin works properly.

I don't know whether this is a documentation issue or something that has to be fixed in code.
But I hope it helps.

Regards.

Issues while installing

At first install there needs to be a blog entry, otherwise the following error occurs while adding the tags plugin:

IndexError at /en/applications/blog/
list index out of range

Additionally I get the following error after creating an entry:

NoReverseMatch at /en/applications/blog/
u'aldryn_blog' is not a registered namespace

category support

currently we support tags for a post, but it would be very useful to categorize posts via a category field.

import error in migrations

aldryn_blog/migrations/0005_date_to_datetime_step2.py", line 7, in
from dateutil.tz import tzutc
ImportError: No module named dateutil.tz

should probably add python-dateutil to the requirements

multiple author support

Some posts have a co-author, maybe even more than two.

For the first case I think an extra fk to AUTH_MODEL would do it, but I think a better solution would be to change this to a m2m field with a through model that allows the user to specific a primary author, so this through model would have three fields: author, is_primary.

The author is a fk to either it's own PostAuthor model with a fk to user OR PostAuthor model acting as proxy to user. The idea behind this is to be able to encapsulate some functionality in this model, so we can do author.get_absolute_url() instead of the get_slugs hack...

NoReverseMatch at /de/admin/r/46/2/

Hello,

i has follow the instruction from readme to install the blog in Django CMS 3 (Django 1.6.) and when i run Archive or an article i become:

NoReverseMatch at /de/admin/r/46/2/
u'aldryn_blog' is not a registered namespace

The complete Error: http://pastebin.com/mLcDB4qH
Installed Apps: http://pastebin.com/EppRgGZ0
Console: http://pastebin.com/ZwW2UVtX

Im not a Programmer i see Django CMS in Youtube and found intresting, but i not know what mean this mistake message.

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.