+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-06 16:03
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('custom', '0004_auto_20160705_1810'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='basicpage',
- name='sub_title',
- field=models.TextField(blank=True, max_length=1000, verbose_name='sub title'),
- ),
- migrations.AlterField(
- model_name='basicpage',
- name='sub_title_en',
- field=models.TextField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- migrations.AlterField(
- model_name='basicpage',
- name='sub_title_fr',
- field=models.TextField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-06 16:39
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('custom', '0005_auto_20160706_1803'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='basicpage',
- name='sub_title_en',
- ),
- migrations.RemoveField(
- model_name='basicpage',
- name='sub_title_fr',
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-06 16:41
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('custom', '0006_auto_20160706_1839'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='basicpage',
- name='sub_title_en',
- field=models.TextField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- migrations.AddField(
- model_name='basicpage',
- name='sub_title_fr',
- field=models.TextField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-07 08:47
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('custom', '0007_auto_20160706_1841'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='basicpage',
- name='sub_title',
- field=models.CharField(blank=True, max_length=1000, verbose_name='sub title'),
- ),
- migrations.AlterField(
- model_name='basicpage',
- name='sub_title_en',
- field=models.CharField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- migrations.AlterField(
- model_name='basicpage',
- name='sub_title_fr',
- field=models.CharField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- ]
+++ /dev/null
-from django.db import models
-from django.utils.translation import ugettext_lazy as _
-from django.core.urlresolvers import reverse, reverse_lazy
-from mezzanine.pages.models import Page, RichText
-from mezzanine.core.fields import RichTextField, OrderField, FileField
-from django.conf import settings
-
-
-ALIGNMENT_CHOICES = (('left', _('left')), ('right', _('right')))
-MEDIA_BASE_URL = getattr(settings, 'MEDIA_BASE_URL', 'http://medias.ircam.fr/embed/media/')
-
-# class SubTitle(models.Model):
-#
-# sub_title = models.TextField(_('sub title'), blank=True, max_length=1000)
-# class Meta:
-# abstract = True
-
-
-class BasicPage(Page, RichText):
-
- sub_title = models.CharField(_('sub title'), blank=True, max_length=1000)
- # description = models.TextField(_('description'), blank=True)
- photo = FileField(_('photo'), upload_to='images/photos', max_length=1024, blank=True, format="Image")
- photo_credits = models.CharField(_('photo credits'), max_length=255, blank=True, null=True)
- photo_alignment = models.CharField(_('photo alignment'), choices=ALIGNMENT_CHOICES, max_length=32, default="left", blank=True)
- photo_description = models.TextField(_('photo description'), blank=True)
- photo_featured = FileField(_('photo featured'), upload_to='images/photos', max_length=1024, blank=True, format="Image")
- photo_featured_credits = models.CharField(_('photo featured credits'), max_length=255, blank=True, null=True)
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-06 15:50
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('blog', '0003_auto_20151223_1313'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='Article',
- fields=[
- ('blogpost_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='blog.BlogPost')),
- ],
- options={
- 'abstract': False,
- },
- bases=('blog.blogpost',),
- ),
- migrations.CreateModel(
- name='Category',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'category',
- },
- ),
- migrations.CreateModel(
- name='Topic',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=512, verbose_name='name')),
- ('description', models.TextField(blank=True, verbose_name='description')),
- ],
- options={
- 'verbose_name': 'topic',
- },
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-06 16:07
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('magazine', '0001_initial'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='article',
- name='sub_title',
- field=models.TextField(blank=True, max_length=1000, verbose_name='sub title'),
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-06 16:10
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('magazine', '0002_article_sub_title'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='article',
- name='sub_title_en',
- field=models.TextField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- migrations.AddField(
- model_name='article',
- name='sub_title_fr',
- field=models.TextField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-06 16:20
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('magazine', '0003_auto_20160706_1810'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='article',
- options={'verbose_name': 'article'},
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-06 16:31
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('magazine', '0004_auto_20160706_1820'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='article',
- options={},
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-06 16:39
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('magazine', '0005_auto_20160706_1831'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='article',
- name='sub_title_en',
- ),
- migrations.RemoveField(
- model_name='article',
- name='sub_title_fr',
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-06 16:41
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('magazine', '0006_auto_20160706_1839'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='article',
- name='sub_title_en',
- field=models.TextField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- migrations.AddField(
- model_name='article',
- name='sub_title_fr',
- field=models.TextField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-06 16:52
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('magazine', '0007_auto_20160706_1841'),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name='article',
- options={'verbose_name': 'article'},
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-07 08:47
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('magazine', '0008_auto_20160706_1852'),
- ]
-
- operations = [
- migrations.AlterField(
- model_name='article',
- name='sub_title',
- field=models.CharField(blank=True, max_length=1000, verbose_name='sub title'),
- ),
- migrations.AlterField(
- model_name='article',
- name='sub_title_en',
- field=models.CharField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- migrations.AlterField(
- model_name='article',
- name='sub_title_fr',
- field=models.CharField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-07 09:24
-from __future__ import unicode_literals
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('magazine', '0009_auto_20160707_1047'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='article',
- name='sub_title_en',
- ),
- migrations.RemoveField(
- model_name='article',
- name='sub_title_fr',
- ),
- ]
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-07-07 09:25
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('magazine', '0010_auto_20160707_1115'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='article',
- name='sub_title_en',
- field=models.CharField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- migrations.AddField(
- model_name='article',
- name='sub_title_fr',
- field=models.CharField(blank=True, max_length=1000, null=True, verbose_name='sub title'),
- ),
- ]
+++ /dev/null
-from modeltranslation.translator import translator, register, TranslationOptions
-from mezzanine.pages.models import Page, RichText
-from modeltranslation.translator import TranslationOptions
-from mezzanine.core.translation import (TranslatedSlugged,
- TranslatedDisplayable,
- TranslatedRichText)
-from magazine.models import Article
-
-@register(Article)
-#class ArticleTranslationOptions(TranslatedDisplayable, TranslatedRichText):
-class ArticleTranslationOptions(TranslationOptions):
-
- fields = ('sub_title',)
from mezzanine.pages.models import Page
from mezzanine.pages.admin import PageAdmin
from mezzanine.pages.models import RichTextPage
-<<<<<<< HEAD:app/organization/core/admin.py
from organization.core.models import BasicPage
-=======
-from mezzanine.core.admin import DisplayableAdmin
-from custom.models import BasicPage
->>>>>>> article:app/custom/admin.py
# class SubTitleAdmin(DisplayableAdmin):
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.7 on 2016-07-07 10:01
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('blog', '0003_auto_20151223_1313'),
+ ('organization magazine', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Article',
+ fields=[
+ ('blogpost_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='blog.BlogPost')),
+ ('sub_title', models.CharField(blank=True, max_length=1000, verbose_name='sub title')),
+ ('sub_title_fr', models.CharField(blank=True, max_length=1000, null=True, verbose_name='sub title')),
+ ('sub_title_en', models.CharField(blank=True, max_length=1000, null=True, verbose_name='sub title')),
+ ],
+ options={
+ 'verbose_name': 'article',
+ },
+ bases=('blog.blogpost',),
+ ),
+ ]
from organization.core.models import Named
class Article(BlogPost):
-from organization.core.models import Named
sub_title = models.CharField(_('sub title'), blank=True, max_length=1000)
- class Meta:
+ class Meta:
verbose_name = _('article')
class Category(Named):
--- /dev/null
+from modeltranslation.translator import translator, register, TranslationOptions
+from mezzanine.pages.models import Page, RichText
+from modeltranslation.translator import TranslationOptions
+from mezzanine.core.translation import (TranslatedSlugged,
+ TranslatedDisplayable,
+ TranslatedRichText)
+from organization.magazine.models import Article
+
+@register(Article)
+#class ArticleTranslationOptions(TranslatedDisplayable, TranslatedRichText):
+class ArticleTranslationOptions(TranslationOptions):
+
+ fields = ('sub_title',)
from django.contrib import admin
from mezzanine.blog.admin import BlogPostAdmin
-from magazine.models import Article
+from organization.magazine.models import Article
#from custom.admin import SubTitleAdmin
from copy import deepcopy
"mezzanine.accounts",
# "mezzanine.mobile",
# "eve",
- "magazine",
'djangobower',
"meta",
"mezzanine_agenda",
+++ /dev/null
-from __future__ import unicode_literals
-
-import os
-import re
-import pwd
-import time
-import urllib
-import string
-import datetime
-import mimetypes
-
-from django.db import models
-from django.utils.translation import ugettext_lazy as _
-from django.core.urlresolvers import reverse, reverse_lazy
-from django.conf import settings
-from django.contrib.auth.models import User
-
-from mezzanine.core.models import RichText, Displayable, Slugged
-from mezzanine.core.fields import RichTextField, OrderField, FileField
-from mezzanine.utils.models import AdminThumbMixin, upload_to
-
-from django_countries.fields import CountryField
-
-from organization.media.models import Photos
-
-
-# Hack to have these strings translated
-mr = _('Mr')
-mrs = _('Ms')
-
-GENDER_CHOICES = [
- ('male', _('male')),
- ('female', _('female')),
-]
-
-TITLE_CHOICES = [
- ('Dr', _('Dr')),
- ('Prof', _('Prof')),
- ('Prof Dr', _('Prof Dr')),
-]
-
-ALIGNMENT_CHOICES = (('left', _('left')), ('right', _('right')))
-
-
-class Named(models.Model):
- """Named object with description"""
-
- name = models.CharField(_('name'), max_length=512)
- description = models.TextField(_('description'), blank=True)
-
- class Meta:
- abstract = True
-
- def __unicode__(self):
- return self.name
-
- @property
- def slug(self):
- return slugify(self.__unicode__())
-
-
-class AddressMixin(models.Model):
- """(Address description)"""
-
- address = models.TextField(_('description'), blank=True)
- postal_code = models.CharField(_('postal code'), max_length=16, blank=True)
- country = CountryField(_('country'))
-
- def __unicode__(self):
- return u"Address"
-
- class Meta:
- abstract = True
-
-
-class Organization(Named, AddressMixin):
- """(Organization description)"""
-
- type = models.ForeignKey('OrganizationType', verbose_name=_('organization type'), blank=True, null=True, on_delete=models.SET_NULL)
- url = models.URLField(_('URL'), max_length=512, blank=True)
-
- def __unicode__(self):
- return self.name
-
- class Meta:
- verbose_name = _('organization')
-
-
-class OrganizationType(Named):
- """(OrganizationType description)"""
-
- class Meta:
- verbose_name = _('organization type')
-
-
-class Department(Named):
- """(Department description)"""
-
- organization = models.ForeignKey('Organization', verbose_name=_('organization'))
- url = models.URLField(_('URL'), max_length=512, blank=True)
- weaving_class = models.CharField(_('weaving class'), max_length=64, blank=True)
-
- def __unicode__(self):
- return self.name
-
- class Meta:
- verbose_name = _('department')
-
-
-class Team(Named):
- """(Team description)"""
-
- department = models.ForeignKey('Department', verbose_name=_('department'), blank=True, null=True, on_delete=models.SET_NULL)
-
- def __unicode__(self):
- return u"Team"
-
-
-class Person(Displayable, RichText, AdminThumbMixin, Photos):
- """(Person description)"""
-
- user = models.ForeignKey(User, verbose_name=_('user'), blank=True, null=True, on_delete=models.SET_NULL)
- title = models.CharField(_('title'), max_length=16, choices=TITLE_CHOICES, blank=True)
- gender = models.CharField(_('gender'), max_length=16, choices=GENDER_CHOICES, blank=True)
- first_name = models.CharField(_('first name'), max_length=255, blank=True, null=True)
- last_name = models.CharField(_('last name'), max_length=255, blank=True, null=True)
- birthday = models.DateField(_('birthday'), blank=True)
- organization = models.ForeignKey('Organization', verbose_name=_('organization'), blank=True, null=True, on_delete=models.SET_NULL)
-
- def __unicode__(self):
- return ' '.join((self.user.first_name, self.user.last_name))
-
-
-class Nationality(models.Model):
- """(Nationality description)"""
-
- name = models.CharField(_('name'))
-
- def __unicode__(self):
- return self.name
-
-
-class Link(models.Model):
- """A person can have many links."""
-
- person = models.ForeignKey('Person', verbose_name=_('Person'))
- link_type = models.ForeignKey('LinkType', verbose_name=_('Link type'))
- url = models.URLField(verbose_name=_('URL'))
-
- def __str__(self):
- return self.url
-
-
-class LinkType(models.Model):
- """
- A link type could be ``Facebook`` or ``Twitter`` or ``Website``.
- This is masterdata that should be created by the admins when the site is
- deployed for the first time.
- :ordering: Enter numbers here if you want links to be displayed in a
- special order.
- """
-
- name = models.CharField(max_length=256, verbose_name=_('Name'))
- slug = models.SlugField(max_length=256, verbose_name=_('Slug'), help_text=_(
- 'Use this field to define a simple identifier that can be used'
- ' to style the different link types (i.e. assign social media'
- ' icons to them)'),
- blank=True,
- )
- ordering = models.PositiveIntegerField(verbose_name=_('Ordering'), null=True, blank=True)
-
- class Meta:
- ordering = ['ordering', ]
-
- def __str__(self):
- return self.name
-
-
-class Activity(models.Model):
- """(Activity description)"""
-
- person = models.ForeignKey('Person', verbose_name=_('person'))
- teams = models.ManyToManyField('Team', verbose_name=_('teams'))
- date_begin = models.DateField(_('begin date'), null=True, blank=True)
- date_end = models.DateField(_('end date'), null=True, blank=True)
- role = models.CharField(_('role'), blank=True, max_length=512)
- work = models.TextField(_('work'), blank=True)
-
- def __unicode__(self):
- return ' - '.join((self.person, self.role, self.date_begin, self.date_end))
-
-
-class Modelname(models.Model):
- """( description)"""
-
-
- def __unicode__(self):
- return u""