-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit from Aldryn Blueprints
- Loading branch information
0 parents
commit f71aeae
Showing
32 changed files
with
2,192 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
lib | ||
lib64 | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
nosetests.xml | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
# Complexity | ||
output/*.html | ||
output/*/index.html | ||
|
||
# Sphinx | ||
docs/build | ||
|
||
*.lokalize | ||
lokalize* | ||
|
||
.idea | ||
docs | ||
*.sass-cache | ||
*~ | ||
|
||
*.sqlite | ||
*.sh | ||
|
||
node_modules |
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,12 @@ | ||
{ | ||
"preset": "crockford", | ||
|
||
"maximumLineLength": { | ||
"value": 120, | ||
"allowRegex": true, | ||
"allowUrlComments": true | ||
}, | ||
"disallowQuotedKeysInObjects": null, | ||
"requireMultipleVarDecl": null, | ||
"disallowDanglingUnderscores": null | ||
} |
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 @@ | ||
{ | ||
"browser": true, | ||
"esnext": true, | ||
"expr": true, | ||
"bitwise": true, | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"indent": 4, | ||
"jquery": true, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"node": true, | ||
"nonbsp": true, | ||
"quotmark": "single", | ||
"strict": true, | ||
"unused": true, | ||
"trailing": true | ||
} |
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,24 @@ | ||
Copyright (c) 2017, Divio AG | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name of Divio AG nor the | ||
names of its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL DIVIO AG BE LIABLE FOR ANY | ||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,4 @@ | ||
include LICENSE.txt | ||
include README.rst | ||
recursive-include djangocms_modules/templates * | ||
recursive-exclude * *.py[co] .sass-cache |
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,11 @@ | ||
================== | ||
django CMS Modules | ||
================== | ||
|
||
|
||
Installation | ||
============ | ||
|
||
* run ``pip install djangocms-modules`` | ||
* add ``'djangocms_modules'`` to your INSTALLED_APPS | ||
* migrate your project: ``python manage.py migrate`` |
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,2 @@ | ||
# -*- coding: utf-8 -*- | ||
__version__ = '0.0.1' |
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,28 @@ | ||
# -*- coding: utf-8 -*- | ||
from adminsortable2.admin import SortableAdminMixin | ||
from django.contrib import admin | ||
from parler.admin import TranslatableAdmin | ||
|
||
from .models import Category, BlueprintPluginModel | ||
|
||
|
||
class BlueprintAdminClass(SortableAdminMixin, TranslatableAdmin): | ||
list_filter = ('category',) | ||
|
||
|
||
class CategoryAdminClass(SortableAdminMixin, TranslatableAdmin): | ||
"""Any admin options you need go here""" | ||
enable_sorting = True | ||
|
||
@property | ||
def media(self): | ||
from parler.admin import _fakeRequest, _language_prepopulated_media, _language_media | ||
has_prepopulated = len(self.get_prepopulated_fields(_fakeRequest)) | ||
sortable = super(CategoryAdminClass, self).media | ||
if has_prepopulated: | ||
return sortable + _language_prepopulated_media | ||
else: #NOQA | ||
return sortable + _language_media | ||
|
||
admin.site.register(Category, CategoryAdminClass) | ||
admin.site.register(BlueprintPluginModel, BlueprintAdminClass) |
Oops, something went wrong.