aldryn / aldryn-news Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://huboard.com/aldryn/aldryn-news/board
License: Other
Home Page: http://huboard.com/aldryn/aldryn-news/board
License: Other
Similar to #14 but instead with the author.
See: https://www.django-cms.org/en/blog/2012/ as reference
if a news is in a category, the news url should be beneath the category url.
-> so that correct menu active/inactive state works
"pip install aldryn-news" as stated in Manual configuration, does not work:
pip install aldryn-news
Downloading/unpacking aldryn-news
Could not find any downloads that satisfy the requirement aldryn-news
Cleaning up...
No distributions at all found for aldryn-news
this occurs after adding the tags plugin
Environment:
Request Method: GET
Request URL: http://all-addons-stage.us-iad-rs.aldryn.io/en/applications/news/
Django Version: 1.6.5
Python Version: 2.7.4
Installed Applications:
[u'django.contrib.auth',
u'django.contrib.contenttypes',
u'django.contrib.sessions',
u'django.contrib.sites',
u'django.contrib.messages',
u'djangocms_admin_style',
u'django.contrib.admin',
u'django.contrib.staticfiles',
u'cms',
u'menus',
u'mptt',
u'south',
u'raven.contrib.django',
u'sekizai',
u'gunicorn',
u'cmscloud',
u'compressor',
u'filer',
u'easy_thumbnails',
u'aldryn_button',
u'standard_form',
u'aldryn_quote',
u'hvad',
u'aldryn_redirects',
u'aldryn_theme_standardsite',
u'djangocms_text_ckeditor',
u'filer',
u'aldryn_gallery',
u'filer',
u'easy_thumbnails',
u'social_tags',
u'aldryn_social_sharing',
u'aldryn_crazyegg',
u'aldryn_grid_foundation',
u'aldryn_disqus',
u'aldryn_facebook',
u'aldryn_google_chrome_frame',
u'aldryn_style',
u'aldryn_twitter',
u'aldryn_responsive',
u'aldryn_google_analytics',
u'aldryn_news',
u'hvad',
u'djangocms_text_ckeditor',
u'django_select2',
u'easy_thumbnails',
u'filer',
u'taggit',
u'taggit',
u'aldryn_blog',
u'easy_thumbnails',
u'filer',
u'djangocms_text_ckeditor',
u'django_select2',
u'aldryn_common',
u'hvad',
u'pyrate',
u'aldryn_mailchimp',
u'aldryn_people',
u'hvad',
u'sortedm2m',
u'aldryn_video',
u'absolute',
u'aldryn_jobs',
u'emailit',
u'hvad',
u'standard_form',
u'aldryn_common',
u'aldryn_common',
'polymorphic',
'cmsplugin_filer_file',
'cmsplugin_filer_image',
'reversion',
'djangocms_link',
'djangocms_snippet',
'djangocms_googlemap',
'django.contrib.sitemaps',
'health_check',
'health_check_db',
'health_check_cache']
Installed Middleware:
[u'django.contrib.sessions.middleware.SessionMiddleware',
u'django.middleware.transaction.TransactionMiddleware',
u'django.contrib.auth.middleware.AuthenticationMiddleware',
u'cmscloud.middleware.AccessControlMiddleware',
u'django.contrib.messages.middleware.MessageMiddleware',
u'django.middleware.locale.LocaleMiddleware',
u'django.middleware.common.CommonMiddleware',
u'django.middleware.csrf.CsrfViewMiddleware',
u'django.middleware.http.ConditionalGetMiddleware',
u'cms.middleware.language.LanguageCookieMiddleware',
u'cms.middleware.user.CurrentUserMiddleware',
u'cms.middleware.page.CurrentPageMiddleware',
u'cms.middleware.toolbar.ToolbarMiddleware',
u'aldryn_redirects.middleware.RedirectFallbackMiddleware',
'cmscloud.middleware.CurrentSiteMiddleware',
'cmscloud.middleware.AldrynUserMiddleware']
Traceback:
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
112. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/app/.heroku/python/lib/python2.7/site-packages/cms/utils/decorators.py" in inner
16. return func(request, *args, **kwargs)
File "/app/.heroku/python/lib/python2.7/site-packages/django/views/generic/base.py" in view
69. return self.dispatch(request, *args, **kwargs)
File "/app/.heroku/python/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
87. return handler(request, *args, **kwargs)
File "/app/.heroku/python/lib/python2.7/site-packages/django/views/generic/dates.py" in get
333. self.date_list, self.object_list, extra_context = self.get_dated_items()
File "/app/.heroku/python/lib/python2.7/site-packages/django/views/generic/dates.py" in get_dated_items
415. date_list = self.get_date_list(qs, ordering='DESC')
File "/app/.heroku/python/lib/python2.7/site-packages/django/views/generic/dates.py" in get_date_list
390. if self.uses_datetime_field:
File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/functional.py" in __get__
49. res = instance.__dict__[self.func.__name__] = self.func(instance)
File "/app/.heroku/python/lib/python2.7/site-packages/django/views/generic/dates.py" in uses_datetime_field
289. field = model._meta.get_field(self.get_date_field())
File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/options.py" in get_field
355. raise FieldDoesNotExist('%s has no field named %r' % (self.object_name, name))
Exception Type: FieldDoesNotExist at /en/applications/news/
Exception Value: NewsTranslation has no field named 'publication_start'
If I create a new news with publication_start in the future it's shown in the news list.
I looks like hvad does not use using_translations(), wasn't called in my debuging approaches.
Queryset filter should be correct.
django-cms==3.0.10
django-hvad==1.0.0
deploying with this addon fails: https://gist.github.com/stefanfoulis/0d69413f4eb5c3559762
I suspect missing tagging in "installed_apps" in app.json.
there's always the message "there are no news tags"?
http://cyberlink-dev.divio.ch/de/news/2013/8/6/launch-neuer-website/
http://cl.ly/image/2d1M071n2q3Y
AttributeError at /en/admin/aldryn_news/news/edit-field/3/de/ This QueryDict instance is immutable Request Method: POST Request URL: http://api-international-stage.us-iad-rs.aldryn.io/en/admin/aldryn_news/news/edit-field/3/de/?edit_fields=lead_in&language=de Django Version: 1.5.5 Exception Type: AttributeError Exception Value: This QueryDict instance is immutable Exception Location: /app/.heroku/python/lib/python2.7/site-packages/django/http/request.py in _assert_mutable, line 307 Python Executable: /app/.heroku/python/bin/python Python Version: 2.7.4 Python Path: ['/app', '/app/.heroku/python/bin', '/app/.heroku/python/lib/python2.7/site-packages/setuptools-1.1-py2.7.egg', '/app/.heroku/python/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg', '/app', '/app/.heroku/python/lib/python27.zip', '/app/.heroku/python/lib/python2.7', '/app/.heroku/python/lib/python2.7/plat-linux2', '/app/.heroku/python/lib/python2.7/lib-tk', '/app/.heroku/python/lib/python2.7/lib-old', '/app/.heroku/python/lib/python2.7/lib-dynload', '/app/.heroku/python/lib/python2.7/site-packages'] Server time: Thu, 27 Feb 2014 11:50:23 +0100
A plugin that renders the archive:
2013
Jan, Feb, March, Apr, Mai, June
Jul, Aug,...
2012
Jane, Feb, Mar
Extra 1: it should highlight the selected entry {% if active... if the plugin is visible within the entry.
Extra 2: the count should be visible like "2013 (11)" or "Jan (1)"
checkout: https://dpaste.de/F5CT#L1
seems to happen on the news detail view when the current language is de
(in the url) and the news item is not translated to english.
File "/home/cyberlink-dev/app/local/lib/python2.7/site-packages/aldryn_news/models.py" in get_absolute_url
107. slug = get_slug_in_language(self, language)
language
is 'en'
.
I think it happens when a category is not translated into all languages.
During plugin edit phase, server return the 500 error, log:
response_add....... Latest News Entries
escapejs: value:5 class:<class 'aldryn_news.models.LatestNewsPlugin'>
[13/Jan/2015 21:50:30] "POST /en/admin/cms/page/edit-plugin/3/ HTTP/1.1" 500 260963
[13/Jan/2015 21:50:30] "GET /en/admin/cms/page/resolve/?model=cms.page&pk=1 HTTP/1.1" 200 4
Traceback:
Environment:
Request Method: POST
Request URL: http://localhost:8000/en/admin/cms/page/edit-plugin/11/
Django Version: 1.6.9
Python Version: 2.7.6
Installed Applications:
('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',
'sekizai',
'djangocms_style',
'djangocms_column',
'filer',
'easy_thumbnails',
'taggit',
'aldryn_news',
'hvad',
'django_select2',
'cmsplugin_filer_image',
'cmsplugin_filer_file',
'cmsplugin_filer_folder',
'cmsplugin_filer_link',
'cmsplugin_filer_teaser',
'cmsplugin_filer_utils',
'cmsplugin_filer_video',
'djangocms_flash',
'djangocms_googlemap',
'djangocms_inherit',
'south',
'reversion',
'ingenic_cms')
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')
Traceback:
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
112. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
99. response = view_func(request, *args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
52. response = view_func(request, *args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
198. return view(request, *args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/cms/admin/pageadmin.py" in edit_plugin
1491. return super(PageAdmin, self).edit_plugin(*args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/views/decorators/clickjacking.py" in wrapped_view
41. resp = view_func(*args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/cms/admin/placeholderadmin.py" in edit_plugin
392. response = plugin_admin.add_view(request)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
29. return bound_func(*args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
99. response = view_func(request, *args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
25. return func(self, *args2, **kwargs2)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/db/transaction.py" in inner
371. return func(*args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/contrib/admin/options.py" in add_view
1167. return self.response_add(request, new_object)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/cms/plugin_base.py" in response_add
238. return super(CMSPluginBase, self).response_add(request, obj, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/contrib/admin/options.py" in response_add
963. 'obj': escapejs(obj)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/functional.py" in wrapper
203. return func(*args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/html.py" in escapejs
61. return mark_safe(force_text(value).translate(_js_escapes))
Exception Type: TypeError at /en/admin/cms/page/edit-plugin/11/
Exception Value: expected a character buffer object
I have fixed this by remove the __unicode__
function in the LatestNewsPlugin class.
As per @patrys comment, we need to handle the case where the news is not translated in some language X and page the app is plugged to is not translated in language X as well.
In other words: reverse
fails.
I personally like the suggestion of throwing a more descriptive error here. Catching it and displaying home page would only hide the problem and whole thing will blow up in some other place pretty soon.
when viewing the archive, the following urls work:
/news/
/news/2013/
/news/2013/7/
but when i go to /news/2013/7/19/ the message "page not found" is displayed. This is probably due to the missing view redirect for this case.
Additionally within the template:
aldryn_news/news_list.html
we would also have to add the day to:
´´´
{% if month %}{{ archive_date|date:"M" }} {% endif %}{{ year }}
We have to find a solution how to create thumbnails for the entries without always having to overwrite the template:
{% thumbnail news_item.key_visual 200x100 crop %}
something like:
{% thumbnail news_item.key_visual news_item.thumbnail_small crop %}
or they should be context aware:
{% with 400 as width %}{ % news_item.key_visua %}...
I have installed with pip the plugin, and added it to settings.py, but when I run python manage.py migrate
, I get this error:
TypeError: Couldn't reconstruct m2m field tags on News: __init__() got an unexpected keyword argument 'serialize'
Does the plugin works with Django 1.7 and the new "Migration" system?
I have my virtualenv with Python 2.7 and:
Though the plugins are almost the same, the code differs. Pls align the basecode and include missing plugins and fix known issues etc.:
When editing a news entry, the following error occurs if a tag entry has missing translations:
DoesNotExist at /de/admin/aldryn_news/news/3/
TagTranslation matching query does not exist.
translateable categories
When a category is added, it will be displayed in the menu. But if the apphook is not added yet, this fails reversing the url. Since the menu is built on ALL views, the user is blocked.
-> don't try to add categories to the menu if the app/urls are not included
A plugin that renders the tags (tag name and url)
NoReverseMatch at /de/news/
'url' requires a non-empty first argument. The syntax changed in Django 1.5, see the docs.
within
<a href="{% url archive-year year=year.grouper %}">{{ year.grouper }}</a>
Cannot resolve keyword 'tagged_items' into field. Choices are: id, language_code, lead_in, master, slug, title..
Lists categories
django.db.models.options in get_field
FieldDoesNotExist: NewsTranslation has no field named 'publication_start'
when installing, I'll get the following issue:
aldryn_news.news: 'tagged_items' has an m2m relation with model <class 'taggit.models.TaggedItem'>, which has either not been installed or is abstract.
aldryn_news.news: 'tags' has an m2m relation with model <class 'taggit.models.Tag'>, which has either not been installed or is abstract.
aldryn_news.latestnewsplugin: 'tags' has an m2m relation with model <class 'taggit.models.Tag'>, which has either not been installed or is abstract.
Django crashes after upgrading hvad to 1.1
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.