diff --git a/DEPLOY.rst b/DEPLOY.rst index ab5e06e9..f0a0a695 100644 --- a/DEPLOY.rst +++ b/DEPLOY.rst @@ -41,7 +41,7 @@ configure the values for the ssh host, user, port and target directory. Run: $ python manage.py makemigratoins - $ python manage.py syncdb + $ python manage.py migrate 7. Setup a circus configuration. diff --git a/digitalglarus/admin.py b/digitalglarus/admin.py index a44a4f56..62a2dc89 100644 --- a/digitalglarus/admin.py +++ b/digitalglarus/admin.py @@ -1,4 +1,12 @@ from django.contrib import admin -from .models import Message +from .models import Message, Supporter, DGGallery, DGPicture +class DGPictureInline(admin.StackedInline): + model = DGPicture + +class DGGalleryAdmin(admin.ModelAdmin): + inlines = [DGPictureInline] + +admin.site.register(DGGallery, DGGalleryAdmin) admin.site.register(Message) +admin.site.register(Supporter) diff --git a/digitalglarus/cms_plugins.py b/digitalglarus/cms_plugins.py new file mode 100644 index 00000000..703176a2 --- /dev/null +++ b/digitalglarus/cms_plugins.py @@ -0,0 +1,33 @@ +from cms.plugin_base import CMSPluginBase +from cms.plugin_pool import plugin_pool +from .models import DGGalleryPlugin, DGSupportersPlugin, Supporter +from django.utils.translation import ugettext as _ + +class CMSGalleryPlugin(CMSPluginBase): + model = DGGalleryPlugin + name = _("Digital Glarus Gallery") + render_template = "digitalglarus/gallery.html" + + def render(self, context, instance, placeholder): + context.update({ + 'gallery':instance.dgGallery, + 'object':instance, + 'placeholder':placeholder + }) + return context + +class CMSSupportersPlugin(CMSPluginBase): + name = _("Digital Glarus Supporters") + model = DGSupportersPlugin + render_template = "digitalglarus/supporters_plugin.html" + + def render(self, context, instance, placeholder): + context.update({ + 'supporters': Supporter.objects.all().order_by('name'), + 'object': instance, + 'placeholder':placeholder + }) + return context + +plugin_pool.register_plugin(CMSGalleryPlugin) +plugin_pool.register_plugin(CMSSupportersPlugin) diff --git a/digitalglarus/migrations/0004_supporter.py b/digitalglarus/migrations/0004_supporter.py new file mode 100644 index 00000000..606ad3c6 --- /dev/null +++ b/digitalglarus/migrations/0004_supporter.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('digitalglarus', '0003_merge'), + ] + + operations = [ + migrations.CreateModel( + name='Supporter', + fields=[ + ('id', models.AutoField(serialize=False, auto_created=True, verbose_name='ID', primary_key=True)), + ('name', models.CharField(max_length=200)), + ('description', models.CharField(max_length=500)), + ], + options={ + }, + bases=(models.Model,), + ), + ] diff --git a/digitalglarus/migrations/0005_auto_20160208_0218.py b/digitalglarus/migrations/0005_auto_20160208_0218.py new file mode 100644 index 00000000..0f2e4beb --- /dev/null +++ b/digitalglarus/migrations/0005_auto_20160208_0218.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('digitalglarus', '0004_supporter'), + ] + + operations = [ + migrations.AlterField( + model_name='supporter', + name='description', + field=models.TextField(), + preserve_default=True, + ), + ] diff --git a/digitalglarus/migrations/0006_dggallery_dggalleryplugin_dgpicture.py b/digitalglarus/migrations/0006_dggallery_dggalleryplugin_dgpicture.py new file mode 100644 index 00000000..525bb85e --- /dev/null +++ b/digitalglarus/migrations/0006_dggallery_dggalleryplugin_dgpicture.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import filer.fields.image + + +class Migration(migrations.Migration): + + dependencies = [ + ('cms', '0012_auto_20150607_2207'), + ('digitalglarus', '0005_auto_20160208_0218'), + ] + + operations = [ + migrations.CreateModel( + name='DGGallery', + fields=[ + ('id', models.AutoField(auto_created=True, verbose_name='ID', serialize=False, primary_key=True)), + ('name', models.CharField(max_length=30)), + ('parent', models.ForeignKey(blank=True, to='digitalglarus.DGGallery', null=True)), + ], + options={ + 'verbose_name_plural': 'dgGallery', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='DGGalleryPlugin', + fields=[ + ('cmsplugin_ptr', models.OneToOneField(primary_key=True, to='cms.CMSPlugin', auto_created=True, parent_link=True, serialize=False)), + ('dgGallery', models.ForeignKey(to='digitalglarus.DGGallery')), + ], + options={ + 'abstract': False, + }, + bases=('cms.cmsplugin',), + ), + migrations.CreateModel( + name='DGPicture', + fields=[ + ('id', models.AutoField(auto_created=True, verbose_name='ID', serialize=False, primary_key=True)), + ('description', models.CharField(max_length=60)), + ('gallery', models.ForeignKey(to='digitalglarus.DGGallery')), + ('image', filer.fields.image.FilerImageField(related_name='dg_gallery', to='filer.Image')), + ], + options={ + }, + bases=(models.Model,), + ), + ] diff --git a/digitalglarus/migrations/0007_auto_20160208_1031.py b/digitalglarus/migrations/0007_auto_20160208_1031.py new file mode 100644 index 00000000..47e0d1e7 --- /dev/null +++ b/digitalglarus/migrations/0007_auto_20160208_1031.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('digitalglarus', '0006_dggallery_dggalleryplugin_dgpicture'), + ] + + operations = [ + migrations.AlterField( + model_name='supporter', + name='description', + field=models.TextField(blank=True, null=True), + preserve_default=True, + ), + ] diff --git a/digitalglarus/migrations/0008_dgsupportersplugin.py b/digitalglarus/migrations/0008_dgsupportersplugin.py new file mode 100644 index 00000000..c7855bca --- /dev/null +++ b/digitalglarus/migrations/0008_dgsupportersplugin.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('cms', '0012_auto_20150607_2207'), + ('digitalglarus', '0007_auto_20160208_1031'), + ] + + operations = [ + migrations.CreateModel( + name='DGSupportersPlugin', + fields=[ + ('cmsplugin_ptr', models.OneToOneField(primary_key=True, auto_created=True, parent_link=True, to='cms.CMSPlugin', serialize=False)), + ('dgSupporters', models.ManyToManyField(to='digitalglarus.Supporter')), + ], + options={ + 'abstract': False, + }, + bases=('cms.cmsplugin',), + ), + ] diff --git a/digitalglarus/migrations/0009_remove_dgsupportersplugin_dgsupporters.py b/digitalglarus/migrations/0009_remove_dgsupportersplugin_dgsupporters.py new file mode 100644 index 00000000..39ee3969 --- /dev/null +++ b/digitalglarus/migrations/0009_remove_dgsupportersplugin_dgsupporters.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('digitalglarus', '0008_dgsupportersplugin'), + ] + + operations = [ + migrations.RemoveField( + model_name='dgsupportersplugin', + name='dgSupporters', + ), + ] diff --git a/digitalglarus/migrations/0010_auto_20160229_2106.py b/digitalglarus/migrations/0010_auto_20160229_2106.py new file mode 100644 index 00000000..251af2cb --- /dev/null +++ b/digitalglarus/migrations/0010_auto_20160229_2106.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('digitalglarus', '0009_remove_dgsupportersplugin_dgsupporters'), + ] + + operations = [ + migrations.AlterField( + model_name='message', + name='email', + field=models.EmailField(max_length=254), + ), + ] diff --git a/digitalglarus/models.py b/digitalglarus/models.py index a7535966..0f6742c3 100644 --- a/digitalglarus/models.py +++ b/digitalglarus/models.py @@ -1,6 +1,7 @@ from django.db import models +from cms.models import CMSPlugin +from filer.fields.image import FilerImageField -# Create your models here. class Message(models.Model): name = models.CharField(max_length=200) @@ -12,3 +13,42 @@ class Message(models.Model): def __str__(self): return "%s - %s - %s" % (self.name, self.email, self.received_date) + + +class Supporter(models.Model): + name = models.CharField(max_length=200) + description = models.TextField(null=True, blank=True) + + def __str__(self): + return "%s" % (self.name) + + def get_absolute_url(self): + return reverse('dgSupporters_view', args=[self.pk]) + + +class DGGallery(models.Model): + parent = models.ForeignKey('self', blank=True, null=True) + name = models.CharField(max_length=30) + + def __str__(self): + return "%s" % (self.name) + + def get_absolute_url(self): + return reverse('dgGallery_view', args=[self.pk]) + + class Meta: + verbose_name_plural = 'dgGallery' + +class DGPicture(models.Model): + gallery = models.ForeignKey(DGGallery) + image = FilerImageField(related_name='dg_gallery') + description = models.CharField(max_length=60) + + def __str__(self): + return "%s" % (self.image.name) + +class DGGalleryPlugin(CMSPlugin): + dgGallery = models.ForeignKey(DGGallery) + +class DGSupportersPlugin(CMSPlugin): + pass diff --git a/digitalglarus/templates/digitalglarus/base.html b/digitalglarus/templates/digitalglarus/base.html index d1a9e4de..61344ffe 100644 --- a/digitalglarus/templates/digitalglarus/base.html +++ b/digitalglarus/templates/digitalglarus/base.html @@ -1,4 +1,4 @@ -{% load menu_tags staticfiles cms_tags %} +{% load staticfiles cms_tags menu_tags sekizai_tags menu_tags %} @@ -26,6 +26,9 @@ + {% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %} + {% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %} + +
{{supporter.description}}
+Copyright © ungleich GmbH 2015. All Rights Reserved
+Copyright © ungleich GmbH {% now "Y" %}. All Rights Reserved
diff --git a/pg_upgrade_internal.log b/pg_upgrade_internal.log new file mode 100644 index 00000000..4a3d55a7 --- /dev/null +++ b/pg_upgrade_internal.log @@ -0,0 +1,42 @@ + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:55:31 2016 +----------------------------------------------------------------- + +You must identify the directory where the old cluster binaries reside. +Please use the -b command-line option or the PGBINOLD environment variable. + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:09 2016 +----------------------------------------------------------------- + +You must identify the directory where the old cluster binaries reside. +Please use the -b command-line option or the PGBINOLD environment variable. + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:22 2016 +----------------------------------------------------------------- + +You must identify the directory where the old cluster binaries reside. +Please use the -b command-line option or the PGBINOLD environment variable. + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:25 2016 +----------------------------------------------------------------- + +You must identify the directory where the old cluster binaries reside. +Please use the -b command-line option or the PGBINOLD environment variable. + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:32 2016 +----------------------------------------------------------------- + +You must identify the directory where the old cluster binaries reside. +Please use the -b command-line option or the PGBINOLD environment variable. + +----------------------------------------------------------------- + pg_upgrade run on Tue Mar 1 20:46:31 2016 +----------------------------------------------------------------- + +You must identify the directory where the old cluster binaries reside. +Please use the -b command-line option or the PGBINOLD environment variable. diff --git a/pg_upgrade_server.log b/pg_upgrade_server.log new file mode 100644 index 00000000..b3ecffad --- /dev/null +++ b/pg_upgrade_server.log @@ -0,0 +1,30 @@ + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:55:31 2016 +----------------------------------------------------------------- + + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:09 2016 +----------------------------------------------------------------- + + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:22 2016 +----------------------------------------------------------------- + + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:25 2016 +----------------------------------------------------------------- + + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:32 2016 +----------------------------------------------------------------- + + +----------------------------------------------------------------- + pg_upgrade run on Tue Mar 1 20:46:31 2016 +----------------------------------------------------------------- + diff --git a/pg_upgrade_utility.log b/pg_upgrade_utility.log new file mode 100644 index 00000000..b3ecffad --- /dev/null +++ b/pg_upgrade_utility.log @@ -0,0 +1,30 @@ + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:55:31 2016 +----------------------------------------------------------------- + + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:09 2016 +----------------------------------------------------------------- + + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:22 2016 +----------------------------------------------------------------- + + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:25 2016 +----------------------------------------------------------------- + + +----------------------------------------------------------------- + pg_upgrade run on Mon Feb 29 11:56:32 2016 +----------------------------------------------------------------- + + +----------------------------------------------------------------- + pg_upgrade run on Tue Mar 1 20:46:31 2016 +----------------------------------------------------------------- + diff --git a/requirements.txt b/requirements.txt index cdd1ee7f..c779cefb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,61 +1,104 @@ -# lib -psycopg2>=2.6 -Pillow>=2 -html5lib==0.999 -six==1.3.0 #compat -python-memcached - -# django -django==1.7.10 - -#django-assets -django-bootstrap3 -lesscpy -django_compressor - -# django apps -django-treebeard==3.0 -django-sekizai==0.7 -django-classy-tags==0.5 -django-filer==0.9.9 -django-reversion - -# django-cms -django-cms - -# django-cms-plugins -djangocms-admin-style==0.2.5 -djangocms-text-ckeditor>=2.4 -django-select2>=4.3.1 -djangocms-blog>=0.4.0 - -djangocms-flash -djangocms-googlemap -djangocms-inherit -djangocms-teaser - -djangocms-link -djangocms-snippet -djangocms-style -djangocms-column -djangocms-grid -djangocms-oembed -djangocms-table - -cmsplugin-filer==0.10.1 - -# production -# circus-web -# chaussette -# meinheld - -# python3 support -gevent>=1.1a2 - -# djangocms-page-meta -djangocms-page-meta -# memcache -pylibmc - -# .env -django-dotenv +aldryn-blog==0.4.6 +aldryn-boilerplates==0.7 +aldryn-common==0.1.3 +aldryn-search==0.2.7 +anyjson==0.3.3 +chaussette==1.3.0 +cmsplugin-filer==1.0.1 +cssselect==0.9.1 +Django==1.8.9 +django-admin-enhancer==1.0.0 +django-appconf==1.0.1 +django-appdata==0.1.4 +django-bootstrap3==7.0.0 +django-classy-tags==0.7.1 +django-cms==3.2.1 +django-compressor==1.5 +django-countries==3.3 +django-debug-toolbar==1.3.2 +django-dotenv==1.3.0 +django-extensions==1.5.5 +django-filer==1.1.1 +django-filter==0.10.0 +django-formtools==1.0 +django-fsm==2.2.1 +django-fsm-admin==1.2.1 +django-guardian==1.2.0 +django-haystack==2.3.1 +django-hvad==1.2.1 +-e git+git@github.com:agiliq/merchant.git@2584954a1371ee6c7d11be2d75a94402e7c641d8#egg=django_merchant +django-meta==0.3.1 +django-meta-mixin==0.1.1 +django-model-utils==2.2 +django-money==0.7.0 +django-mptt==0.8.2 +django-parler==1.6.1 +django-polymorphic==0.8.1 +django-reversion==1.10.1 +django-sekizai==0.9.0 +Django-Select2==5.8.1 +django-sortedm2m==0.10.0 +django-spurl==0.6 +django-standard-form==1.1.1 +django-taggit==0.18.0 +django-taggit-autosuggest==0.2.8 +django-taggit-templatetags==0.2.5 +django-templatetag-sugar==1.0 +django-treebeard==4.0 +djangocms-admin-style==1.1.0 +djangocms-blog==0.5.0 +djangocms-column==1.5 +djangocms-flash==0.2.0 +djangocms-googlemap==0.3 +djangocms-grid==1.2 +djangocms-inherit==0.1 +djangocms-link==1.6.2 +djangocms-oembed==0.5 +djangocms-page-meta==0.5.5 +djangocms-snippet==1.5 +djangocms-style==1.5 +djangocms-table==1.2 +djangocms-teaser==0.1 +djangocms-text-ckeditor==2.6.0 +djangorestframework==3.1.3 +easy-thumbnails==2.3 +factory-boy==2.5.2 +gevent==1.1b5 +gnureadline==6.3.3 +greenlet==0.4.9 +html5lib==0.9999999 +iowait==0.2 +ipdb==0.8.1 +ipython==3.2.0 +lesscpy==0.10.2 +lxml==3.4.4 +Mako==1.0.2 +Markdown==2.6.2 +MarkupSafe==0.23 +meinheld==0.5.8 +micawber==0.3.3 +mock==1.3.0 +pbr==1.8.1 +Pillow==3.1.1 +ply==3.6 +psutil==3.2.1 +psycopg2==2.6.1 +py-moneyed==0.5.0 +pylibmc==1.5.0 +pyquery==1.2.9 +python-memcached==1.57 +pytz==2015.6 +pyzmq==14.7.0 +requests==2.7.0 +simplejson==3.8.0 +six==1.10.0 +South==1.0.2 +sqlparse==0.1.15 +stripe==1.22.3 +tomako==0.1.0 +TornadIO2==0.0.3 +tornado==4.2.1 +Unidecode==0.4.19 +URLObject==2.4.0 +wheel==0.29.0 +YURL==0.13 diff --git a/templates/cms/__init__.py b/templates/__init__.py similarity index 100% rename from templates/cms/__init__.py rename to templates/__init__.py diff --git a/templates/cms/digitalglarus/__init__.py b/templates/digitalglarus/__init__.py similarity index 100% rename from templates/cms/digitalglarus/__init__.py rename to templates/digitalglarus/__init__.py diff --git a/templates/cms/digitalglarus/about.html b/templates/digitalglarus/about.html similarity index 97% rename from templates/cms/digitalglarus/about.html rename to templates/digitalglarus/about.html index 6c12cbcb..8a0da727 100755 --- a/templates/cms/digitalglarus/about.html +++ b/templates/digitalglarus/about.html @@ -1,4 +1,4 @@ -{% extends "cms/digitalglarus/base.html" %} +{% extends "digitalglarus/base.html" %} {% load staticfiles cms_tags %} {% block title %}About{% endblock %} diff --git a/templates/cms/digitalglarus/base.html b/templates/digitalglarus/base.html similarity index 100% rename from templates/cms/digitalglarus/base.html rename to templates/digitalglarus/base.html diff --git a/templates/cms/digitalglarus/contact.html b/templates/digitalglarus/contact.html similarity index 97% rename from templates/cms/digitalglarus/contact.html rename to templates/digitalglarus/contact.html index 3b5f5734..01a57109 100755 --- a/templates/cms/digitalglarus/contact.html +++ b/templates/digitalglarus/contact.html @@ -1,4 +1,4 @@ -{% extends "cms/digitalglarus/base.html" %} +{% extends "digitalglarus/base.html" %} {% load cms_tags %} {% block title %}Contact{% endblock %} diff --git a/templates/cms/digitalglarus/detail.html b/templates/digitalglarus/detail.html similarity index 100% rename from templates/cms/digitalglarus/detail.html rename to templates/digitalglarus/detail.html diff --git a/templates/cms/digitalglarus/index.html b/templates/digitalglarus/index.html similarity index 68% rename from templates/cms/digitalglarus/index.html rename to templates/digitalglarus/index.html index 6c5fb507..06460eef 100644 --- a/templates/cms/digitalglarus/index.html +++ b/templates/digitalglarus/index.html @@ -5,28 +5,7 @@