Compare commits
22 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
1e00fd21bf | 9 years ago |
|
|
14362ddf3c | 9 years ago |
|
|
701de1f5d0 | 9 years ago |
|
|
afefcfc5c0 | 9 years ago |
|
|
c0c6f39f19 | 9 years ago |
|
|
765721e2e0 | 9 years ago |
|
|
0b5d5a8f8c | 9 years ago |
|
|
3d58880607 | 9 years ago |
|
|
ca2db7b936 | 9 years ago |
|
|
b06fba71f4 | 9 years ago |
|
|
cf9b7b2ec2 | 9 years ago |
|
|
8a1cd0db26 | 9 years ago |
|
|
b75cd39163 | 9 years ago |
|
|
3d1845d236 | 9 years ago |
|
|
0b9a1c4755 | 9 years ago |
|
|
c8b8cf2bcd | 9 years ago |
|
|
af34f6f947 | 9 years ago |
|
|
b46a4194c7 | 9 years ago |
|
|
5330881dad | 9 years ago |
|
|
739dc139dc | 9 years ago |
|
|
486e62d43c | 9 years ago |
|
|
ccadd9886a | 9 years ago |
53 changed files with 880 additions and 485 deletions
@ -0,0 +1,37 @@ |
|||||||
|
# For more information about the properties used in |
||||||
|
# this file, please see the EditorConfig documentation: |
||||||
|
# http://editorconfig.org/ |
||||||
|
|
||||||
|
root = true |
||||||
|
|
||||||
|
[*] |
||||||
|
charset = utf-8 |
||||||
|
end_of_line = lf |
||||||
|
indent_size = 4 |
||||||
|
indent_style = space |
||||||
|
insert_final_newline = true |
||||||
|
trim_trailing_whitespace = true |
||||||
|
|
||||||
|
|
||||||
|
[{*.scss, *.css}] |
||||||
|
charset = utf-8 |
||||||
|
end_of_line = lf |
||||||
|
indent_size = 2 |
||||||
|
indent_style = space |
||||||
|
insert_final_newline = true |
||||||
|
trim_trailing_whitespace = true |
||||||
|
|
||||||
|
[*.md] |
||||||
|
trim_trailing_whitespace = false |
||||||
|
|
||||||
|
[*.html] |
||||||
|
indent_size = 2 |
||||||
|
indent_style = space |
||||||
|
insert_final_newline = true |
||||||
|
trim_trailing_whitespace = true |
||||||
|
|
||||||
|
[{.travis.yml, package.json}] |
||||||
|
# The indent size used in the `package.json` file cannot be changed |
||||||
|
# https://github.com/npm/npm/pull/3180#issuecomment-16336516 |
||||||
|
indent_size = 2 |
||||||
|
indent_style = space |
||||||
@ -1,6 +1,8 @@ |
|||||||
static/ |
|
||||||
*.pyc |
*.pyc |
||||||
frontend/static/ |
|
||||||
zsite/static/vendor/ |
zsite/static/vendor/ |
||||||
_env/ |
_env/ |
||||||
media/ |
media/ |
||||||
|
|
||||||
|
app/local.py |
||||||
|
/static/vendor/ |
||||||
|
/static/ |
||||||
|
|||||||
@ -0,0 +1,16 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
import sys |
||||||
|
|
||||||
|
from .settings import * |
||||||
|
|
||||||
|
try: |
||||||
|
from .local import * |
||||||
|
except ImportError: |
||||||
|
print("Can't find module settings.local! Make it from local.py.example") |
||||||
|
|
||||||
|
# if manage.py test was called, use test settings |
||||||
|
if 'test' in sys.argv or 'jenkins' in sys.argv: |
||||||
|
try: |
||||||
|
from .testing import * |
||||||
|
except ImportError: |
||||||
|
pass |
||||||
@ -0,0 +1,28 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
|
||||||
|
from .settings import INSTALLED_APPS |
||||||
|
|
||||||
|
# SECURITY WARNING: keep the secret key used in production secret! |
||||||
|
SECRET_KEY = '...' |
||||||
|
|
||||||
|
# SECURITY WARNING: don't run with debug turned on in production! |
||||||
|
DEBUG = True |
||||||
|
|
||||||
|
#INSTALLED_APPS += ('debug_toolbar', ) |
||||||
|
|
||||||
|
#MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware', ) + MIDDLEWARE_CLASSES |
||||||
|
|
||||||
|
|
||||||
|
DATABASES = { |
||||||
|
'default': { |
||||||
|
'ENGINE': 'django.db.backends.mysql', |
||||||
|
'NAME': u'...', |
||||||
|
'USER': u'...', |
||||||
|
'PASSWORD': u'...', |
||||||
|
'HOST': '', |
||||||
|
'PORT': '', |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
ALLOWED_HOSTS = ['127.0.0.1'] |
||||||
|
|
||||||
@ -0,0 +1,28 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
from __future__ import unicode_literals |
||||||
|
|
||||||
|
from django.db import models, migrations |
||||||
|
from django.conf import settings |
||||||
|
import aldryn_common.admin_fields.sortedm2m |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
('aldryn_people', '0004_auto_20150622_1606'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.AlterField( |
||||||
|
model_name='peopleplugin', |
||||||
|
name='people', |
||||||
|
field=aldryn_common.admin_fields.sortedm2m.SortedM2MModelField(help_text=None, to='aldryn_people.Person', blank=True), |
||||||
|
preserve_default=True, |
||||||
|
), |
||||||
|
migrations.AlterField( |
||||||
|
model_name='person', |
||||||
|
name='user', |
||||||
|
field=models.OneToOneField(null=True, blank=True, to=settings.AUTH_USER_MODEL), |
||||||
|
preserve_default=True, |
||||||
|
), |
||||||
|
] |
||||||
@ -1,125 +1,83 @@ |
|||||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||||
from south.utils import datetime_utils as datetime |
from __future__ import unicode_literals |
||||||
from south.db import db |
|
||||||
from south.v2 import SchemaMigration |
|
||||||
from django.db import models |
|
||||||
|
|
||||||
|
from django.db import models, migrations |
||||||
|
|
||||||
class Migration(SchemaMigration): |
|
||||||
|
|
||||||
def forwards(self, orm): |
class Migration(migrations.Migration): |
||||||
# Adding model 'SegmentLimitPluginModel' |
|
||||||
db.create_table(u'aldryn_segmentation_segmentlimitpluginmodel', ( |
|
||||||
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)), |
|
||||||
('label', self.gf('django.db.models.fields.CharField')(default=u'', max_length=128, blank=True)), |
|
||||||
('max_children', self.gf('django.db.models.fields.PositiveIntegerField')(default=1)), |
|
||||||
)) |
|
||||||
db.send_create_signal(u'aldryn_segmentation', ['SegmentLimitPluginModel']) |
|
||||||
|
|
||||||
# Adding model 'FallbackSegmentPluginModel' |
dependencies = [ |
||||||
db.create_table(u'aldryn_segmentation_fallbacksegmentpluginmodel', ( |
('cms', '0012_auto_20150607_2207'), |
||||||
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)), |
] |
||||||
('label', self.gf('django.db.models.fields.CharField')(default=u'', max_length=128, blank=True)), |
|
||||||
)) |
|
||||||
db.send_create_signal(u'aldryn_segmentation', ['FallbackSegmentPluginModel']) |
|
||||||
|
|
||||||
# Adding model 'SwitchSegmentPluginModel' |
operations = [ |
||||||
db.create_table(u'aldryn_segmentation_switchsegmentpluginmodel', ( |
migrations.CreateModel( |
||||||
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)), |
name='Segment', |
||||||
('label', self.gf('django.db.models.fields.CharField')(default=u'', max_length=128, blank=True)), |
fields=[ |
||||||
('on_off', self.gf('django.db.models.fields.BooleanField')(default=True)), |
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), |
||||||
)) |
], |
||||||
db.send_create_signal(u'aldryn_segmentation', ['SwitchSegmentPluginModel']) |
options={ |
||||||
|
'managed': False, |
||||||
# Adding model 'CookieSegmentPluginModel' |
|
||||||
db.create_table(u'aldryn_segmentation_cookiesegmentpluginmodel', ( |
|
||||||
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)), |
|
||||||
('label', self.gf('django.db.models.fields.CharField')(default=u'', max_length=128, blank=True)), |
|
||||||
('cookie_key', self.gf('django.db.models.fields.CharField')(default=u'', max_length=4096)), |
|
||||||
('cookie_value', self.gf('django.db.models.fields.CharField')(default=u'', max_length=4096)), |
|
||||||
)) |
|
||||||
db.send_create_signal(u'aldryn_segmentation', ['CookieSegmentPluginModel']) |
|
||||||
|
|
||||||
# Adding model 'AuthenticatedSegmentPluginModel' |
|
||||||
db.create_table(u'aldryn_segmentation_authenticatedsegmentpluginmodel', ( |
|
||||||
(u'cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)), |
|
||||||
('label', self.gf('django.db.models.fields.CharField')(default=u'', max_length=128, blank=True)), |
|
||||||
)) |
|
||||||
db.send_create_signal(u'aldryn_segmentation', ['AuthenticatedSegmentPluginModel']) |
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm): |
|
||||||
# Deleting model 'SegmentLimitPluginModel' |
|
||||||
db.delete_table(u'aldryn_segmentation_segmentlimitpluginmodel') |
|
||||||
|
|
||||||
# Deleting model 'FallbackSegmentPluginModel' |
|
||||||
db.delete_table(u'aldryn_segmentation_fallbacksegmentpluginmodel') |
|
||||||
|
|
||||||
# Deleting model 'SwitchSegmentPluginModel' |
|
||||||
db.delete_table(u'aldryn_segmentation_switchsegmentpluginmodel') |
|
||||||
|
|
||||||
# Deleting model 'CookieSegmentPluginModel' |
|
||||||
db.delete_table(u'aldryn_segmentation_cookiesegmentpluginmodel') |
|
||||||
|
|
||||||
# Deleting model 'AuthenticatedSegmentPluginModel' |
|
||||||
db.delete_table(u'aldryn_segmentation_authenticatedsegmentpluginmodel') |
|
||||||
|
|
||||||
|
|
||||||
models = { |
|
||||||
u'aldryn_segmentation.authenticatedsegmentpluginmodel': { |
|
||||||
'Meta': {'object_name': 'AuthenticatedSegmentPluginModel'}, |
|
||||||
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), |
|
||||||
'label': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '128', 'blank': 'True'}) |
|
||||||
}, |
|
||||||
u'aldryn_segmentation.cookiesegmentpluginmodel': { |
|
||||||
'Meta': {'object_name': 'CookieSegmentPluginModel'}, |
|
||||||
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), |
|
||||||
'cookie_key': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '4096'}), |
|
||||||
'cookie_value': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '4096'}), |
|
||||||
'label': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '128', 'blank': 'True'}) |
|
||||||
}, |
}, |
||||||
u'aldryn_segmentation.fallbacksegmentpluginmodel': { |
bases=(models.Model,), |
||||||
'Meta': {'object_name': 'FallbackSegmentPluginModel'}, |
), |
||||||
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), |
migrations.CreateModel( |
||||||
'label': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '128', 'blank': 'True'}) |
name='AuthenticatedSegmentPluginModel', |
||||||
|
fields=[ |
||||||
|
('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin')), |
||||||
|
('label', models.CharField(default='', max_length=128, verbose_name='label', blank=True)), |
||||||
|
], |
||||||
|
options={ |
||||||
|
'abstract': False, |
||||||
}, |
}, |
||||||
u'aldryn_segmentation.segment': { |
bases=('cms.cmsplugin',), |
||||||
'Meta': {'object_name': 'Segment', 'managed': 'False'}, |
), |
||||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) |
migrations.CreateModel( |
||||||
|
name='CookieSegmentPluginModel', |
||||||
|
fields=[ |
||||||
|
('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin')), |
||||||
|
('label', models.CharField(default='', max_length=128, verbose_name='label', blank=True)), |
||||||
|
('cookie_key', models.CharField(default='', help_text='Name of cookie to consider.', max_length=4096, verbose_name='name of cookie')), |
||||||
|
('cookie_value', models.CharField(default='', help_text='Value to consider.', max_length=4096, verbose_name='value to compare')), |
||||||
|
], |
||||||
|
options={ |
||||||
|
'abstract': False, |
||||||
}, |
}, |
||||||
u'aldryn_segmentation.segmentlimitpluginmodel': { |
bases=('cms.cmsplugin',), |
||||||
'Meta': {'object_name': 'SegmentLimitPluginModel', '_ormbases': ['cms.CMSPlugin']}, |
), |
||||||
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), |
migrations.CreateModel( |
||||||
'label': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '128', 'blank': 'True'}), |
name='FallbackSegmentPluginModel', |
||||||
'max_children': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}) |
fields=[ |
||||||
|
('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin')), |
||||||
|
('label', models.CharField(default='', max_length=128, verbose_name='label', blank=True)), |
||||||
|
], |
||||||
|
options={ |
||||||
|
'abstract': False, |
||||||
}, |
}, |
||||||
u'aldryn_segmentation.switchsegmentpluginmodel': { |
bases=('cms.cmsplugin',), |
||||||
'Meta': {'object_name': 'SwitchSegmentPluginModel'}, |
), |
||||||
u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), |
migrations.CreateModel( |
||||||
'label': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '128', 'blank': 'True'}), |
name='SegmentLimitPluginModel', |
||||||
'on_off': ('django.db.models.fields.BooleanField', [], {'default': 'True'}) |
fields=[ |
||||||
|
('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin')), |
||||||
|
('label', models.CharField(default='', help_text='Optionally set a label for this limit block.', max_length=128, verbose_name='label', blank=True)), |
||||||
|
('max_children', models.PositiveIntegerField(default=1, help_text='Display up to how many matching segments?', verbose_name='# of matches to display')), |
||||||
|
], |
||||||
|
options={ |
||||||
|
'abstract': False, |
||||||
}, |
}, |
||||||
'cms.cmsplugin': { |
bases=('cms.cmsplugin',), |
||||||
'Meta': {'object_name': 'CMSPlugin'}, |
), |
||||||
'changed_date': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), |
migrations.CreateModel( |
||||||
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
name='SwitchSegmentPluginModel', |
||||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
fields=[ |
||||||
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}), |
('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin')), |
||||||
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), |
('label', models.CharField(default='', max_length=128, verbose_name='label', blank=True)), |
||||||
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), |
('on_off', models.BooleanField(default=True, help_text='Uncheck to always hide child plugins.', verbose_name='Always on?')), |
||||||
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}), |
], |
||||||
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}), |
options={ |
||||||
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), |
'abstract': False, |
||||||
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), |
|
||||||
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), |
|
||||||
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) |
|
||||||
}, |
}, |
||||||
'cms.placeholder': { |
bases=('cms.cmsplugin',), |
||||||
'Meta': {'object_name': 'Placeholder'}, |
), |
||||||
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}), |
] |
||||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
||||||
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
complete_apps = ['aldryn_segmentation'] |
|
||||||
|
|||||||
@ -0,0 +1,20 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
from __future__ import unicode_literals |
||||||
|
|
||||||
|
from django.db import models, migrations |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
('blog', '0009_auto_20150726_2021'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.AlterField( |
||||||
|
model_name='post', |
||||||
|
name='author', |
||||||
|
field=models.ForeignKey(related_name='blog_post_author', verbose_name='Author', blank=True, to='aldryn_people.Person', null=True), |
||||||
|
preserve_default=True, |
||||||
|
), |
||||||
|
] |
||||||
@ -0,0 +1,20 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
from __future__ import unicode_literals |
||||||
|
|
||||||
|
from django.db import models, migrations |
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration): |
||||||
|
|
||||||
|
dependencies = [ |
||||||
|
('blog', '0010_auto_20170401_1032'), |
||||||
|
] |
||||||
|
|
||||||
|
operations = [ |
||||||
|
migrations.AlterField( |
||||||
|
model_name='post', |
||||||
|
name='sites', |
||||||
|
field=models.ManyToManyField(help_text='Select sites in which to show the post. If none is set it will be visible in all the configured sites.', to='sites.Site', verbose_name='Site(s)', blank=True), |
||||||
|
preserve_default=True, |
||||||
|
), |
||||||
|
] |
||||||
@ -1,71 +1,44 @@ |
|||||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||||
import datetime |
from __future__ import unicode_literals |
||||||
from south.db import db |
|
||||||
from south.v2 import SchemaMigration |
|
||||||
from django.db import models |
|
||||||
|
|
||||||
|
from django.db import models, migrations |
||||||
|
import tinymce.models |
||||||
|
|
||||||
class Migration(SchemaMigration): |
|
||||||
|
|
||||||
def forwards(self, orm): |
class Migration(migrations.Migration): |
||||||
# Adding model 'CMSTabsList' |
|
||||||
db.create_table('cmsplugin_cmstabslist', ( |
|
||||||
('cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)), |
|
||||||
)) |
|
||||||
db.send_create_signal('cmsplugin_tabs', ['CMSTabsList']) |
|
||||||
|
|
||||||
# Adding model 'SingleTab' |
dependencies = [ |
||||||
db.create_table('cmsplugin_tabs_singletab', ( |
('cms', '0003_auto_20140926_2347'), |
||||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), |
] |
||||||
('plugin', self.gf('django.db.models.fields.related.ForeignKey')(related_name='tabs', to=orm['cmsplugin_tabs.CMSTabsList'])), |
|
||||||
('title', self.gf('django.db.models.fields.CharField')(max_length=32)), |
|
||||||
('content', self.gf('django.db.models.fields.TextField')()), |
|
||||||
('order', self.gf('django.db.models.fields.PositiveIntegerField')(default=1, db_index=True)), |
|
||||||
)) |
|
||||||
db.send_create_signal('cmsplugin_tabs', ['SingleTab']) |
|
||||||
|
|
||||||
|
operations = [ |
||||||
def backwards(self, orm): |
migrations.CreateModel( |
||||||
# Deleting model 'CMSTabsList' |
name='CMSTabsList', |
||||||
db.delete_table('cmsplugin_cmstabslist') |
fields=[ |
||||||
|
('cmsplugin_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin')), |
||||||
# Deleting model 'SingleTab' |
('template', models.CharField(default=b'cmsplugin_tabs/tabs.html', max_length=255, verbose_name='Template', choices=[(b'cmsplugin_tabs/tabs.html', 'Tabs'), (b'cmsplugin_tabs/accordion.html', 'Accordion')])), |
||||||
db.delete_table('cmsplugin_tabs_singletab') |
], |
||||||
|
options={ |
||||||
|
'abstract': False, |
||||||
models = { |
|
||||||
'cms.cmsplugin': { |
|
||||||
'Meta': {'object_name': 'CMSPlugin'}, |
|
||||||
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
|
||||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
||||||
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}), |
|
||||||
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), |
|
||||||
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), |
|
||||||
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}), |
|
||||||
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}), |
|
||||||
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}), |
|
||||||
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}), |
|
||||||
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), |
|
||||||
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}) |
|
||||||
}, |
|
||||||
'cms.placeholder': { |
|
||||||
'Meta': {'object_name': 'Placeholder'}, |
|
||||||
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}), |
|
||||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
||||||
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) |
|
||||||
}, |
}, |
||||||
'cmsplugin_tabs.cmstabslist': { |
bases=('cms.cmsplugin',), |
||||||
'Meta': {'object_name': 'CMSTabsList', 'db_table': "'cmsplugin_cmstabslist'", '_ormbases': ['cms.CMSPlugin']}, |
), |
||||||
'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}) |
migrations.CreateModel( |
||||||
|
name='SingleTab', |
||||||
|
fields=[ |
||||||
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), |
||||||
|
('title', models.CharField(max_length=255, verbose_name='Title')), |
||||||
|
('content', tinymce.models.HTMLField(verbose_name='Content')), |
||||||
|
('slug', models.SlugField(default=b'', max_length=32, verbose_name='Slug', blank=True)), |
||||||
|
('order', models.PositiveIntegerField(default=1, verbose_name='Order', db_index=True)), |
||||||
|
('is_strong', models.BooleanField(default=False, help_text='When True then label of the tab will be bold', verbose_name='Strong')), |
||||||
|
('plugin', models.ForeignKey(related_name='tabs', to='cmsplugin_tabs.CMSTabsList')), |
||||||
|
], |
||||||
|
options={ |
||||||
|
'ordering': ['order'], |
||||||
|
'verbose_name': 'Tab', |
||||||
|
'verbose_name_plural': 'Tabs', |
||||||
}, |
}, |
||||||
'cmsplugin_tabs.singletab': { |
bases=(models.Model,), |
||||||
'Meta': {'ordering': "['order']", 'object_name': 'SingleTab'}, |
), |
||||||
'content': ('django.db.models.fields.TextField', [], {}), |
] |
||||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
||||||
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'}), |
|
||||||
'plugin': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tabs'", 'to': "orm['cmsplugin_tabs.CMSTabsList']"}), |
|
||||||
'title': ('django.db.models.fields.CharField', [], {'max_length': '32'}) |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
complete_apps = ['cmsplugin_tabs'] |
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@ |
|||||||
|
-r requirements/prod.txt |
||||||
@ -0,0 +1,3 @@ |
|||||||
|
-r common.txt |
||||||
|
django-debug-toolbar==1.4 |
||||||
|
deployer-0.3.10 |
||||||
@ -0,0 +1 @@ |
|||||||
|
-r common.txt |
||||||
File diff suppressed because one or more lines are too long
@ -1,20 +0,0 @@ |
|||||||
# -*- coding: utf-8 -*- |
|
||||||
from __future__ import unicode_literals |
|
||||||
|
|
||||||
from django.db import models, migrations |
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration): |
|
||||||
|
|
||||||
dependencies = [ |
|
||||||
('trademark', '0001_initial'), |
|
||||||
] |
|
||||||
|
|
||||||
operations = [ |
|
||||||
migrations.AddField( |
|
||||||
model_name='nice', |
|
||||||
name='glyph', |
|
||||||
field=models.CharField(default='', max_length=255), |
|
||||||
preserve_default=False, |
|
||||||
), |
|
||||||
] |
|
||||||
@ -0,0 +1,24 @@ |
|||||||
|
|
||||||
|
angular.module('zuykov') |
||||||
|
|
||||||
|
.controller('TrademarkSearchLandingCtrl', ['$scope', '$http', function ($scope, $http) { |
||||||
|
$scope.load = function () { |
||||||
|
$scope.trademarks = []; |
||||||
|
$scope.loading = true; |
||||||
|
$scope.loading_text = 'Загрузка'; |
||||||
|
$http.get('/ru/trademarks/online-search/random-trademarks/'). |
||||||
|
success(function(data, status, headers, config) { |
||||||
|
$scope.trademarks = data.items; |
||||||
|
|
||||||
|
$scope.loading = false; |
||||||
|
$scope.loading_text = 'Показать ещё'; |
||||||
|
}). |
||||||
|
error(function(data, status, headers, config) { |
||||||
|
$scope.loading = false; |
||||||
|
$scope.loading_text = 'Показать ещё'; |
||||||
|
}); |
||||||
|
}; |
||||||
|
|
||||||
|
$scope.load(); |
||||||
|
|
||||||
|
}]); |
||||||
@ -0,0 +1,32 @@ |
|||||||
|
.trademark-search-landing-examples { |
||||||
|
margin: 0 auto; |
||||||
|
width: 75%; |
||||||
|
|
||||||
|
.trademark-search-landing-examples-loading { |
||||||
|
width: 100%; |
||||||
|
text-align: center; |
||||||
|
} |
||||||
|
.trademark-search-landing-examples-item { |
||||||
|
text-align: center; |
||||||
|
width: 45%; |
||||||
|
margin-top: 15px; |
||||||
|
} |
||||||
|
|
||||||
|
i { |
||||||
|
margin-right: 5px; |
||||||
|
} |
||||||
|
.glyphicon-refresh-animate { |
||||||
|
-animation: spin 1s infinite linear; |
||||||
|
-webkit-animation: spin2 1s infinite linear; |
||||||
|
} |
||||||
|
|
||||||
|
@-webkit-keyframes spin2 { |
||||||
|
from { -webkit-transform: rotate(0deg);} |
||||||
|
to { -webkit-transform: rotate(360deg);} |
||||||
|
} |
||||||
|
|
||||||
|
@keyframes spin { |
||||||
|
from { transform: scale(1) rotate(0deg);} |
||||||
|
to { transform: scale(1) rotate(360deg);} |
||||||
|
} |
||||||
|
} |
||||||
@ -1,3 +1,4 @@ |
|||||||
|
@import 'landing.less'; |
||||||
@import 'result.less'; |
@import 'result.less'; |
||||||
@import 'detail.less'; |
@import 'detail.less'; |
||||||
@import 'loading.less'; |
@import 'loading.less'; |
||||||
|
|||||||
@ -1,11 +1,42 @@ |
|||||||
{% extends "trademark/base.html" %} |
{% extends "trademark/base.html" %} |
||||||
|
{% load i18n menu_tags cms_tags %} |
||||||
|
|
||||||
{% block trademark_content %} |
{% block trademark_content %} |
||||||
<h1>Онлайн-поиск товарных знаков <small>по базе свидетельств Роспатента</small> |
<h1>Онлайн-поиск товарных знаков <small>по базе свидетельств Роспатента</small> |
||||||
</h1> |
</h1> |
||||||
|
<ol class="list-unstyled list-inline breadcrumb" vocab="http://schema.org/" typeof="BreadcrumbList"> |
||||||
|
<li property="itemListElement" typeof="ListItem"> |
||||||
|
<a href="{% page_url "main" %}" property="item" typeof="WebPage"><span property="name">Главная страница</span></a> |
||||||
|
<meta property="position" content="1"> |
||||||
|
</li> |
||||||
|
<li property="itemListElement" typeof="ListItem"> |
||||||
|
<a href="{% page_url "trademarks" %}" property="item" typeof="WebPage"><span property="name">Товарные знаки</span></a> |
||||||
|
<meta property="position" content="2"> |
||||||
|
</li> |
||||||
|
<li property="itemListElement" typeof="ListItem"> |
||||||
|
<span property="name">Онлайн поиск товарных знаков</span> |
||||||
|
<meta property="position" content="3"> |
||||||
|
</li> |
||||||
|
</ol> |
||||||
|
|
||||||
|
<div class="row"> |
||||||
|
<div class="col-xs-12 col-sm-7"> |
||||||
{% include 'trademark/form.html' %} |
{% include 'trademark/form.html' %} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
{% verbatim %} |
||||||
|
<div ng-controller="TrademarkSearchLandingCtrl" ng-show="trademarks"> |
||||||
<h3>Для вдохновения</h3> |
<h3>Для вдохновения</h3> |
||||||
<p>Исключительные права на эти товарные знаки не продлили, поэтому их <a href="http://zuykov.com/ru/trademarks/registraciya-tovarnogo-znaka/">регистрация</a> возможна после проведения <a href="http://zuykov.com/ru/trademarks/poisk-tovarnogo-znaka/">полного поиска</a>.</p> |
<p>Исключительные права на эти товарные знаки не продлили, поэтому их <a href="http://zuykov.com/ru/trademarks/registraciya-tovarnogo-znaka/">регистрация</a> возможна после проведения <a href="http://zuykov.com/ru/trademarks/poisk-tovarnogo-znaka/">полного поиска</a>.</p> |
||||||
|
|
||||||
|
<ul class='list-inline trademark-search-landing-examples'> |
||||||
|
<li class="trademark-search-landing-examples-loading"> |
||||||
|
<button class="btn btn-primary" ng-click='load()'><i class="fa fa-refresh" area-hidden="true" ng-class="{ 'glyphicon-refresh-animate': loading }"></i><span>{{loading_text}}</span></button> |
||||||
|
</li> |
||||||
|
<li class="trademark-search-landing-examples-item" ng-repeat="trademark in trademarks"><h3><i class="fa {{ trademark.glyph }}" aria-hidden="true"></i></h3><span class="text-nowrap">{{trademark.product}} </span>«<a class="text-nowrap" href="/ru/trademarks/online-search/trademark/{{trademark.trademark}}/">{{trademark.name}}</a>»</li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
{% endverbatim %} |
||||||
|
|
||||||
{% endblock %} |
{% endblock %} |
||||||
@ -1,10 +1,12 @@ |
|||||||
<li class='trademark-search-result-contains load-more-result trademark-search-result {% for class in tm.nices.all %}c{{ class.nice_id }} {% endfor %} {% if tm.status == "Expired" %}trademark-search-result-expired{% endif %}'> |
<li class='trademark-search-result-contains load-more-result trademark-search-result {% for class in tm.nices.all %}c{{ class.nice_id }} {% endfor %} {% if tm.status == "Expired" %}trademark-search-result-expired{% endif %}'> |
||||||
<a href='/ru/trademarks/online-search/trademark/{{ tm.id }}/'> |
<a href='/ru/trademarks/online-search/trademark/{{ tm.id }}/'> |
||||||
<div class='trademark-search-result-image' style="background-image: url({{ tm.image_url }});"> |
|
||||||
{% if not tm.image_url %} |
{% if not tm.image_url %} |
||||||
<h4>{{ tm.title|title }}</h4> |
<span class="trademark-search-result-title">{{ tm.title|title }}</span> |
||||||
{% endif %} |
{% else %} |
||||||
|
<div class='trademark-search-result-image' style="background-image: url({{ tm.image_url }});"> |
||||||
</div> |
</div> |
||||||
|
{% endif %} |
||||||
|
|
||||||
<p>{{ tm.title|title }}</p> |
<p>{{ tm.title|title }}</p> |
||||||
</a> |
</a> |
||||||
</li> |
</li> |
||||||
@ -0,0 +1,12 @@ |
|||||||
|
from django import template |
||||||
|
register = template.Library() |
||||||
|
|
||||||
|
@register.assignment_tag |
||||||
|
def query(qs, **kwargs): |
||||||
|
""" template tag which allows queryset filtering. Usage: |
||||||
|
{% query books author=author as mybooks %} |
||||||
|
{% for book in mybooks %} |
||||||
|
... |
||||||
|
{% endfor %} |
||||||
|
""" |
||||||
|
return qs.filter(**kwargs) |
||||||
Loading…
Reference in new issue