Giter VIP home page Giter VIP logo

cmsplugin-newsplus's Introduction

cmsplugin-newsplus

Build Status

Coverage Status

This plugin provides a simple news feature for django-cms 2.4 and newer.

It is based off of a fork of cmsplugin-news located here: https://bitbucket.org/zerok/cmsplugin-news

The goal of newsplus is to provide the simplicity of cmsplugin-news while adding some additional functionality, such as images.

Requires

  • django-cms >= 3.3
  • django >= 1.8
  • djangocms-text-ckeditor >= 2.0

Setup

  • Install django-cms (if you haven't done so already)

  • Run pip install cmsplugin-newsplus or download this package and python setup.py install

  • Add 'cmsplugin_newsplus' to INSTALLED_APPS

  • Add to your project's urls.py: url(r'^news/', include('cmsplugin_newsplus.urls')),

  • If you're using South run python manage.py migrate, Otherwise run python manage.py syncdb within your project directory.

Contributing

See the Contributing Guidelines.

History

1.1.0 (December 7, 2017):

* Add url namespaces for Django >1.8.  Much thanks to jrutila (https://github.com/jrutila) for this contribution!

1.0.1 (December 7, 2017):

* Fix travis-testing makefile target.
* Limit Django support to <2.0.

0.1.10:

* Adding Django 1.8 support by specifying fields in NewsForm.

0.1.9:

* Removing broken migration introduced in v0.1.8 and replacing it with a working one.

0.1.8:

* Adding missing Django 1.7 migration. This version should not be used because the migration added in this version was broken. The default publication date was datetime.now() which was being evaluated each time makemigrations would be called.

0.1.7:

* Removing parsing of requirements from requirements/common.txt from setup.py

0.1.6:

* Update migrations to Django 1.7

0.1.5:

* Added missing urls.py step to Setup section of the README.

0.1.2:

* Fixed compatibility with pip <= 1.1

0.1.1:

* Compatility fixes for Django 1.6
* Cleaned up repo.
* Added Travis integration.

0.1.0:

* Initial commit.

cmsplugin-newsplus's People

Contributors

cworth-gh avatar djkiourtsis avatar electroniceagle avatar ericamador avatar jrutila avatar mandan avatar mohl avatar rixmit avatar shaunbrady avatar vstoykov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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

cmsplugin-newsplus's Issues

first news after migration dicarded silently

After installing the plugin (including migrations) and then adding a first news item (via admin interface) results in the form being accepted but no news items appear on the list.
Second time around everything works.
Tested on both local development server and staging serwer, same issue.

"django.db.utils.OperationalError: no such table: django_site" when performing migrate on empty database

I got the following error when performing ./manage.py migrate on an empty database: django.db.utils.OperationalError: no such table: django_site

When I remove 'cmsplugin_newsplus' from INSTALLED_APPS the migrate goes fine. If I add 'cmsplugin_newsplus' later and then migrate it also goes fine.

Even more, emptying the urls list in the cms_app.py also helps, so it seems something goes wrong there.

I'm using python3.4 and Django CMS 3.0.12

Any ideas how to fix this?

Thanks ahead.

request to add a template tag

I would be nice to have a template tag to include a configurable number of last news items on a page.
Apart from the excellent admin integration, it is hard for a newcomer like me to comprehend how exactly to integrate the app into the project.

I can see the options in the advanced settings section of a page, but setting the news app sort of hijacks the page template and renders it with a completely bare template.

I need a method for including the news in my own template.

setup.py fails on pip <= 1.1

Package fails to install on early versions of pip. Looks like this package had same issue and a viable alternative in setup.py

vinta/haul#12
vinta/haul@e93f910

  Cloning https://github.com/nimbis/cmsplugin-newsplus.git to /tmp/pip-Sexz_l-build
  Running setup.py egg_info for package from git+https://github.com/nimbis/cmsplugin-newsplus.git
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/tmp/pip-Sexz_l-build/setup.py", line 28, in <module>
        install_requires=[str(x).split(' ')[0] for x in reqs],
      File "/home/deploy/site-nimbisservices/venv/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1240, in parse_requirements
        skip_regex = options.skip_requirements_regex
    AttributeError: 'NoneType' object has no attribute 'skip_requirements_regex'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

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

  File "/tmp/pip-Sexz_l-build/setup.py", line 28, in <module>

    install_requires=[str(x).split(' ')[0] for x in reqs],

  File "/home/deploy/site-nimbisservices/venv/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1240, in parse_requirements

    skip_regex = options.skip_requirements_regex

AttributeError: 'NoneType' object has no attribute 'skip_requirements_regex'

NoReverseMatch

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/ru/admin/r/50/1/

Django Version: 1.6.5
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',
'south',
'sekizai',
'djangocms_style',
'djangocms_column',
'djangocms_file',
'djangocms_flash',
'djangocms_googlemap',
'djangocms_inherit',
'djangocms_link',
'djangocms_picture',
'djangocms_teaser',
'djangocms_video',
'reversion',
'web',
'aldryn_blog',
'aldryn_common',
'django_select2',
'djangocms_text_ckeditor',
'easy_thumbnails',
'filer',
'taggit',
'cmsplugin_newsplus')
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/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                 response = wrapped_callback(request, _callback_args, *_callback_kwargs)
    
    File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/contrib/admin/sites.py" in wrapper
  2.             return self.admin_view(view, cacheable)(_args, *_kwargs)
    
    File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  3.                 response = view_func(request, _args, *_kwargs)
    
    File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  4.     response = view_func(request, _args, *_kwargs)
    
    File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  5.         return view(request, _args, *_kwargs)
    
    File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/contrib/contenttypes/views.py" in shortcut
  6. absurl = get_absolute_url()
    
    File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/utils/functional.py" in _curried
  7.     return _curried_func(_(args + moreargs), *_dict(kwargs, **morekwargs))
    
    File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/db/models/base.py" in get_absolute_url
  8. return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.model_name), func)(self, _args, *_kwargs)
    
    File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/cmsplugin_newsplus/models.py" in get_absolute_url
  9.                            'slug': self.slug})
    
    File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/core/urlresolvers.py" in reverse
  10. return iri_to_uri(resolver._reverse_with_prefix(view, prefix, _args, *_kwargs))
    
    File "/home/viator/coding/PreppyLLC/env/lib/python2.7/site-packages/django/core/urlresolvers.py" in _reverse_with_prefix
  11.                          (lookup_view_s, args, kwargs, len(patterns), patterns))
    

Exception Type: NoReverseMatch at /ru/admin/r/50/1/
Exception Value: Reverse for 'news_detail' with arguments '()' and keyword arguments '{'year': '2014', 'slug': u'news', 'day': '03', 'month': '07'}' not found. 0 pattern(s) tried: []

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.