Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit b1f76a19e4e8bb3ab11c1a0f9652554c0949ae4b @fivethreeo committed Sep 13, 2011
@@ -0,0 +1,3 @@
+recursive-include cmsplugin_filer_gallery/templates *
+recursive-include cmsplugin_filer_gallery/locale *
+recursive-include cmsplugin_filer_gallery/static *
@@ -0,0 +1,3 @@
+Docs can be found at http://cmsplugin-filer-gallery.readthedocs.org/
+
+Translation project at transifex: http://www.transifex.net/projects/p/cmsplugin-filer-gallery/
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+VERSION = (1, 0, 0, 'alpha', 0)
+
+def get_version():
+ version = '%s.%s' % (VERSION[0], VERSION[1])
+ if VERSION[2]:
+ version = '%s.%s' % (version, VERSION[2])
+ if VERSION[3:] == ('alpha', 0):
+ version = '%s pre-alpha' % version
+ else:
+ if VERSION[3] != 'final':
+ version = '%s %s %s' % (version, VERSION[3], VERSION[4])
+ return version
@@ -0,0 +1,20 @@
+from django.utils.translation import ugettext_lazy as _
+from cms.plugin_pool import plugin_pool
+from cms.plugin_base import CMSPluginBase
+from cmsplugin_filer_gallery.models import FilerGallery
+
+class FilerGalleryPlugin(CMSPluginBase):
+ model = FilerGallery
+ name = _("Filer Gallery")
+ render_template = "cmsplugin_filer_gallery/gallery.html"
+ text_enabled = False
+ raw_id_fields = ('gallery',)
+ admin_preview = False
+
+ def render(self, context, instance, placeholder):
+ context.update({
+ 'instance': instance
+ })
+ return context
+
+plugin_pool.register_plugin(FilerGalleryPlugin)
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+from django.utils.translation import ugettext_lazy as _
+from django.db import models
+from cms.models import CMSPlugin, Page
+
+class FilerGallery(CMSPlugin):
+ )
+ gallery = models.ForeignKey('filer_gallery.Gallery')
+
+ class Meta:
+ verbose_name = _("django filer gallery")
+ verbose_name_plural = _("django filer galleries")
@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-
@@ -0,0 +1,67 @@
+# -*- coding: utf-8 -*-
+import sys
+import django
+
+INSTALLED_APPS=[
+ 'cmsplugin_filer_gallery.test.testapp',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.admin',
+ 'django.contrib.sites',
+ 'cmsplugin_filer_gallery'
+]
+
+MIDDLEWARE_CLASSES = [
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.middleware.doc.XViewMiddleware',
+ 'django.contrib.csrf.middleware.CsrfViewMiddleware'
+]
+
+TEMPLATE_CONTEXT_PROCESSORS = [
+ "django.core.context_processors.auth",
+ "django.core.context_processors.i18n",
+ "django.core.context_processors.debug",
+ "django.core.context_processors.request",
+ "django.core.context_processors.media"
+]
+
+if django.VERSION[1] < 3: # pragma: no cover
+ MIDDLEWARE_CLASSES.insert(6, 'cbv.middleware.DeferredRenderingMiddleware')
+ INSTALLED_APPS.append('staticfiles')
+ INSTALLED_APPS.append('cbv')
+ TEMPLATE_CONTEXT_PROCESSORS.append('staticfiles.context_processors.static')
+else:
+ INSTALLED_APPS.append('django.contrib.staticfiles')
+ TEMPLATE_CONTEXT_PROCESSORS.append('django.core.context_processors.static')
+
+def run_tests():
+
+ from django.conf import settings
+
+ settings.configure(
+ INSTALLED_APPS = INSTALLED_APPS,
+ MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES,
+ TEMPLATE_CONTEXT_PROCESSORS = TEMPLATE_CONTEXT_PROCESSORS,
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': 'cmsplugin_filer_gallery_tests.db',
+ }
+ },
+ ROOT_URLCONF='cmsplugin_filer_gallery.test.testapp.urls',
+ LANGUAGES=(('en', 'English'),('de','German'),('nb','Norwegian'),('nn','Norwegian Nynorsk')),
+ STATIC_URL='/some/url/',
+ TEST_RUNNER = 'xmlrunner.extra.djangotestrunner.XMLTestRunner',
+ TEST_OUTPUT_VERBOSE = True
+ )
+
+ from django.test.utils import get_runner
+
+ failures = get_runner(settings)().run_tests(['cmsplugin_filer_gallery'])
+ sys.exit(failures)
+
+if __name__ == '__main__':
+ run_tests()
@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-
@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+from django.conf.urls.defaults import *
+from django.contrib import admin
+
+admin.autodiscover()
+
+urlpatterns = patterns('',
+ (r'^admin/', include(admin.site.urls)),
+ (r'^jsi18n/(?P<packages>\S+?)/$', 'django.views.i18n.javascript_catalog'),
+)
@@ -0,0 +1,11 @@
+[run]
+branch = True
+source =
+ cmsplugin_filer_gallery
+omit =
+ cmsplugin_filer_gallery/migrations/*
+ cmsplugin_filer_gallery/tests/*
+ cmsplugin_filer_gallery/test/*
+ cmsplugin_filer_gallery/test/testapp/*
+[report]
+precision = 2
@@ -0,0 +1,88 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf build/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
+ @echo
+ @echo "Build finished. The HTML pages are in build/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) build/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in build/dirhtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in build/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in build/qthelp, like this:"
+ @echo "# qcollectiongenerator build/qthelp/FeinCMS.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile build/qthelp/FeinCMS.qhc"
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in build/latex."
+ @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+ "run these through (pdf)latex."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
+ @echo
+ @echo "The overview file is in build/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in build/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) build/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in build/doctest/output.txt."
Oops, something went wrong.

0 comments on commit b1f76a1

Please sign in to comment.