V
V
Vitaly2015-07-05 01:13:33
Django
Vitaly, 2015-07-05 01:13:33

How to properly install news extension in djangocms?

Hello, I want to install the news extension for djangocms, I did everything according to the documentation aldryn-newsblog.readthedocs.org/en/latest/how_to/i...
But I can't get rid of the warning

(env)[email protected] ~/pro/tutorial-project $ python manage.py migrate
/home/vitali/pro/env/local/lib/python2.7/site-packages/parler/forms.py:163: RemovedInDjango18Warning: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated - form PersonForm needs updating
  return super(TranslatableModelFormMetaclass, mcs).__new__(mcs, name, bases, attrs)

Operations to perform:
  Synchronize unmigrated apps: sortedm2m, aldryn_boilerplates, aldryn_apphooks_config, parler, djangocms_admin_style, sitemaps, sekizai, treebeard
  Apply all migrations: djangocms_inherit, aldryn_people, aldryn_newsblog, easy_thumbnails, djangocms_flash, djangocms_file, sites, menus, contenttypes, djangocms_googlemap, filer, sessions, reversion, djangocms_column, auth, djangocms_picture, djangocms_style, aldryn_categories, admin, djangocms_link, djangocms_video, taggit, djangocms_teaser, cms, djangocms_text_ckeditor
Synchronizing apps without migrations:
  Creating tables...
  Installing custom SQL...
  Installing indexes...
Running migrations:
  No migrations to apply.
(env)[email protected] ~/pro/tutorial-project $

It is at the very beginning. It explicitly responds to
INSTALLED_APPS = (
...
'cms',
...
'aldryn_people',
...
)
How can I fix this?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman Kitaev, 2015-07-05
@deliro

In the parlel module, in the forms.py file, on line 163 of the code, there is a certain form TranslatableModelFormMetaclass, which is inherited from ModelForm. Moreover, do not specify either fields or exclude - deprecated, which means that one of these fields must be specified (but this does not mean that everything is bad - in fact, this module will simply stop working in the next version of djanga).
If this module is not yours and you are not going to update djanga - kill it.
If this module is not yours and you are going to update djanga - try updating the module. If there are no updates, fork it on github (if the license allows, we are not some kind of barbarians) and redo it.
If the module is yours, add this line (exclude = [], for starters) and the warning will disappear.

R
Rikcon, 2015-07-05
@Rikcon

says that
ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated - form PersonForm needs updating
The model without the fiels or execute attribute is deprecated, you need to add the field attribute to the ModelForm (I suspect with fields) or exclude.
I am not familiar with Django at all, but the logic suggests that if you add an empty excluded attribute, then it will work.
I can be wrong of course.

A
Alexey Ovdienko, 2015-07-05
@doubledare

You need to migrate the models. As I understand it, when a new module is added, then the database structures need to be updated in order for everything to work. Migrations do it

S
sim3x, 2015-07-06
@sim3x

https://github.com/aldryn/aldryn-newsblog
https://requires.io/github/aldryn/aldryn-newsblog/...
1.6 <= Django < 1.8
or downgrade django to 1.7.* or download a patch
or find another plugin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question