aldryn / aldryn-blog Goto Github PK
View Code? Open in Web Editor NEWaldryn-blog IS DEPRECATED. PLEASE USE aldryn-newsblog!
License: Other
aldryn-blog IS DEPRECATED. PLEASE USE aldryn-newsblog!
License: Other
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...
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.
Add taggit to the Aldryn_Blog section instead of separate entry so you would have:
eg under /blog/archive/2013/ and /blog/archive/2013/04/
Bonus points for redirecting /2013/4/ to /2013/04/
5
.4.0 don't work on cms 3.0.2
errors in reverse url
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?
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
i'm using get_authors currently. I only want a list of authors
optional datetime
after that time, the blog post should not be displayed anymore
I have tried this several times and in different installations.
How I replicate this everytime with the same results is like this:
I tried this also (but I don't know if this is related to the above):
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.
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
response = middleware_method(request)
check_path = self.is_language_prefix_patterns_used()
for url_pattern in get_resolver(None).url_patterns:
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
self._urlconf_module = import_module(self.urlconf_name)
**import**(name)
import_module('%s.admin' % app)
**import**(name)
Exception Type: ImportError at /en/
Exception Value: cannot import name FrontendEditableAdmin
see example as in: https://www.django-cms.org/en/blog/
displaying:
Author
x articles
with list as selected author eg: "/blog/author/benjamin/"
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):
use django-select2?
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...
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. :)
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
/admin/aldryn_blog/post/add/
line 212: placeholder_element.data('id', );
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.
len(settings.LANGUAGES) == 1
language in (get_language(), None)
the aldryn-blog
migrations depend on taggit
.
If taggit happens to be under aldryn_blog
in installed apps, there is a migration error.
see news archive plugin as reference
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!
: (
When I add text to an assigned blog post, nothing shows up
create a text plugin with the lead in on first save
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
see news tag plugin as reference
add a haystack-2 compatible search index
http://www.esb.ch/de/admin/aldryn_blog/post/24/
i get 404s in admin for the select2 files...
the detail template should have opengraph and twittercard meta tags to make sharing posts more appealing.
https://dev.twitter.com/docs/cards/markup-reference
http://ogp.me/
To allow publications at a certain time of the day
add these to your INSTALLED_APPS
'taggit',
'django_select2',
'aldryn_blog',
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.
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.
should probably not be there
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.
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
currently we support tags for a post, but it would be very useful to categorize posts via a category
field.
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
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...
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.