forked from django-cms/cmsplugin-filer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements attributes field (django-cms#241)
* Drop support for old Pythons, Djangos and CMSes * Delete South migrations * Update readme for new support matrix * Update setup.py for new support matrix * Drop test requirements for Django 1.7 and lower * Add test requirements for Django 1.9 * Update test matrix in tox and travis conf. * Fix flake issue in AUTHORS * Implemented attributes-field for File, Image and Link plugins For each plugin: * Added attributes-field and `attributes_str` method to models * Added migration * Added form for presenting fields nicely * Added fieldsets to plugins * Updated templates to support attributes * Updated translation strings * Address review comments * Removed explicit property
- Loading branch information
1 parent
c22ffa4
commit 206e76e
Showing
80 changed files
with
388 additions
and
7,883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
* Divio GmbH (divio.ch) | ||
* Stefan Foulis <stefan.foulis@gmail.com> | ||
* Yann Malet <yann.malet@gmail.com> | ||
* Yann Malet <yann.malet@gmail.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.0.1.dev1" | ||
__version__ = "1.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from __future__ import unicode_literals | ||
|
||
from django import forms | ||
|
||
from djangocms_attributes_field.widgets import AttributesWidget | ||
|
||
from .models import FilerFile | ||
|
||
|
||
class FilerFileForm(forms.ModelForm): | ||
|
||
class Meta: | ||
model = FilerFile | ||
exclude = [] | ||
|
||
def __init__(self, *args, **kwargs): | ||
super(FilerFileForm, self).__init__(*args, **kwargs) | ||
self.fields['link_attributes'].widget = AttributesWidget(val_attrs={'style': 'width: 500px!important'}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
cmsplugin_filer_file/migrations/0003_filerfile_link_attributes.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.6 on 2016-06-16 21:56 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
import djangocms_attributes_field.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('cmsplugin_filer_file', '0002_auto_20160112_1617'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='filerfile', | ||
name='link_attributes', | ||
field=djangocms_attributes_field.fields.AttributesField(default=dict, help_text='Optional. Adds HTML attributes to the rendered link.'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.