model = OrganizationImage
+class OrganizationUserImageInline(TabularDynamicInlineAdmin):
+
+ model = OrganizationUserImage
+
+
class OrganizationBlockInline(StackedDynamicInlineAdmin):
model = OrganizationBlock
OrganizationLinkedBlockInlineAdmin
]
list_display = ['name', 'type', 'admin_thumb']
- list_filter = ['is_on_map',]
+ list_filter = ['is_on_map', 'type']
search_fields = ['name',]
first_fields = ['name',]
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.11 on 2017-03-13 13:25
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organization-network', '0090_auto_20170313_1224'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='organization',
+ name='role',
+ ),
+ migrations.AddField(
+ model_name='person',
+ name='role',
+ field=models.CharField(blank=True, max_length=256, null=True, verbose_name='role'),
+ ),
+ ]
(6, 6),
]
-ORGANIZATION_ROLE_CHOICES = [
- ('coordinator', _('coordinator')),
- ('producer', _('producer')),
-]
-
class Organization(Named, Address, URL, AdminThumbRelatedMixin, Orderable):
"""(Organization description)"""
bio = models.TextField(_('bio'), blank=True)
site = models.ForeignKey("sites.Site", blank=True, null=True, on_delete=models.SET_NULL)
admin_thumb_type = 'logo'
- role = models.CharField(_('role'), max_length=128, blank=True, null=True, choices=ORGANIZATION_ROLE_CHOICES)
class Meta:
verbose_name = _('organization')
self.lat = lat
self.lon = lon
- def save(self, **kwargs):
- self.clean()
- super(Organization, self).save()
-
class Team(Named, URL):
"""(Team description)"""
register_id = models.CharField(_('register ID'), blank=True, null=True, max_length=128)
birthday = models.DateField(_('birthday'), blank=True, null=True)
bio = RichTextField(_('biography'), blank=True)
+ role = models.CharField(_('role'), max_length=256, blank=True, null=True)
external_id = models.CharField(_('external ID'), blank=True, null=True, max_length=128)
class Meta:
fields = ('name', 'description')
+@register(OrganizationContact)
+class OrganizationContactTranslationOptions(TranslationOptions):
+
+ pass
+
+
@register(PersonListBlock)
class PersonListBlockTranslationOptions(TranslationOptions):
model = Project
-class ProjectICTDataInline(StackedDynamicInlineAdmin):
+class ProjectPublicDataInline(StackedDynamicInlineAdmin):
- model = ProjectICTData
+ model = ProjectPublicData
+
+
+class ProjectPrivateDataInline(StackedDynamicInlineAdmin):
+
+ model = ProjectPrivateData
class ProjectRelatedTitleAdmin(TranslationTabularInline):
ProjectContactInline,
ProjectUserImageInline,
ProjectImageInline,
- ProjectICTDataInline,
+ ProjectPublicDataInline,
+ ProjectPrivateDataInline,
ProjectWorkPackageInline,
ProjectPlaylistInline,
ProjectLinkInline,
class ProjectForm(ModelForm):
+ def __init__(self, *args, **kwargs):
+ super(ProjectForm, self).__init__(*args, **kwargs)
+ self.fields['title'].label = "Name"
+ self.fields['keywords'].help_text = "5 comma separated keywords"
+
class Meta:
model = Project
- fields = ('title', 'description', 'keywords', 'website')
+ fields = ('title', 'keywords', 'website')
+
-class ProjectICTDataInline(InlineFormSet):
+class ProjectPublicDataInline(InlineFormSet):
max_num = 1
- model = ProjectICTData
- prefix = 'ICT data'
+ model = ProjectPublicData
+ prefix = "Public data"
+ can_delete = False
+ fields = '__all__'
+
+
+class ProjectPrivateDataInline(InlineFormSet):
+
+ model = ProjectPrivateData
+ prefix = "Private data"
can_delete = False
fields = '__all__'
+
class ProjectUserImageInline(InlineFormSet):
- max_num = 4
+ extra = 3
model = ProjectUserImage
- prefix = 'Images'
+ prefix = 'Private images'
can_delete = False
fields = ['file', 'credits']
max_num = 1
model = ProjectContact
- prefix = 'Contact'
+ prefix = 'Private project contact'
can_delete = False
fields = ['first_name', 'last_name', 'address', 'email',
'telephone', 'address', 'postal_code', 'city', 'country']
-class ProducerForm(ModelForm):
+class OrganizationContactInline(InlineFormSet):
+
+ max_num = 1
+ model = OrganizationContact
+ prefix = 'Contact'
+ can_delete = False
+ fields = ['person_title', 'first_name', 'last_name', 'email', 'telephone', 'role']
+
+
+class OrganizationUserImageInline(InlineFormSet):
+
+ max_num = 4
+ model = OrganizationUserImage
+ prefix = 'Images'
+ can_delete = False
+ fields = ['file', 'credits']
+
+
+class OrganizationForm(ModelForm):
class Meta:
model = Organization
- fields = '__all__'
+ fields = ['name', 'description', 'url', 'address',
+ 'address', 'postal_code', 'city', 'country',]
class ProjectResidencyForm(ModelForm):
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.11 on 2017-03-14 08:37
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organization-projects', '0050_auto_20170313_1224'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='ProjectPrivateData',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('description', models.TextField(help_text='(500 - 1000 words)', verbose_name='project description')),
+ ('affiliation', models.CharField(max_length=512, verbose_name='affiliation')),
+ ('commitment_letter', models.FileField(help_text='Written on behalf of the whole project consortium, this letter will commit in implementing the collaboration of a residency application selected by the VERTIGO jury, on the conditions set by the project (in annex of letter: synthesis of all related information entered by project).', max_length=1024, upload_to='Documents/%Y/%m/%d/', verbose_name='letter of commitment by the project coordinator')),
+ ('persons', models.CharField(help_text='First name and last name of the persons from organization / project who will be part preliminary of the project team (separated by a comma)', max_length=512, verbose_name='persons')),
+ ],
+ options={
+ 'verbose_name': 'Project private data',
+ 'verbose_name_plural': 'Project private data',
+ },
+ ),
+ migrations.CreateModel(
+ name='ProjectPublicData',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('brief_description', models.CharField(help_text='Brief description of the challenges faced by the project to be used for wider communication strategy (e.g. Twitter) (110 characters max).', max_length=110, verbose_name='brief description')),
+ ('challenges_description', models.TextField(help_text='Full description of the challenges faced by the project (100-150 words).', verbose_name='full description')),
+ ('technology_description', models.TextField(help_text='Must include the elements to be made available to the artist with sufficient functional and implementation details for enabling him/her to elaborate his/her technical approach (100-200 words).', verbose_name='technology description')),
+ ('objectives_description', models.TextField(help_text='What the project is looking to gain from the collaboration and what kind of artist would be suitable (100 – 150 words).', verbose_name='objective description')),
+ ('resources_description', models.TextField(help_text='Resources available to the artist -- e.g. office facility, studio facility, technical equipment, internet connection, laboratory, and periods of availability for artistic production, staff possibly allocated to the project, available budget for travel, consumables and equipment, etc... (50 – 100 words).', verbose_name='resource description')),
+ ('period', models.CharField(help_text='Possible period of implementation (must be part of the project implementation workplan)', max_length=128, verbose_name='period of implementation')),
+ ('image', models.FileField(help_text='Representing the project', max_length=1024, upload_to='images', verbose_name='Image')),
+ ('image_credits', models.CharField(blank=True, max_length=256, null=True, verbose_name='Image credits')),
+ ],
+ options={
+ 'verbose_name': 'Project public data',
+ 'verbose_name_plural': 'Project public data',
+ },
+ ),
+ migrations.RemoveField(
+ model_name='projectictdata',
+ name='project',
+ ),
+ migrations.AlterField(
+ model_name='project',
+ name='type',
+ field=models.CharField(choices=[('internal', 'internal'), ('external', 'external')], max_length=128, verbose_name='type'),
+ ),
+ migrations.DeleteModel(
+ name='ProjectICTData',
+ ),
+ migrations.AddField(
+ model_name='projectpublicdata',
+ name='project',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='public_data', to='organization-projects.Project', verbose_name='project'),
+ ),
+ migrations.AddField(
+ model_name='projectprivatedata',
+ name='project',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='private_data', to='organization-projects.Project', verbose_name='project'),
+ ),
+ ]
PROJECT_TYPE_CHOICES = [
('internal', _('internal')),
('external', _('external')),
- ('ICT', _('ICT')),
]
REPOSITORY_ACCESS_CHOICES = [
return reverse("organization-project-blogpage-detail", kwargs={"slug": self.slug})
-class ProjectICTData(models.Model):
+class ProjectPublicData(models.Model):
- project = models.ForeignKey(Project, verbose_name=_('project'), related_name='ict_data', blank=True, null=True, on_delete=models.SET_NULL)
+ project = models.ForeignKey(Project, verbose_name=_('project'), related_name='public_data', blank=True, null=True, on_delete=models.SET_NULL)
+
+ brief_description = models.CharField(_('brief description'), max_length=110, help_text="Brief description of the challenges faced by the project to be used for wider communication strategy (e.g. Twitter) (110 characters max).")
+ challenges_description = models.TextField(_('full description'), help_text="Full description of the challenges faced by the project (100-150 words).")
+ technology_description = models.TextField(_('technology description'), help_text="Must include the elements to be made available to the artist with sufficient functional and implementation details for enabling him/her to elaborate his/her technical approach (100-200 words).")
+ objectives_description = models.TextField(_('objective description'), help_text="What the project is looking to gain from the collaboration and what kind of artist would be suitable (100 – 150 words).")
+ resources_description = models.TextField(_('resource description'), help_text="Resources available to the artist -- e.g. office facility, studio facility, technical equipment, internet connection, laboratory, and periods of availability for artistic production, staff possibly allocated to the project, available budget for travel, consumables and equipment, etc... (50 – 100 words).")
+ period = models.CharField(_('period of implementation'), max_length=128, help_text="Possible period of implementation (must be part of the project implementation workplan)")
+ image = models.FileField(_("Image"), max_length=1024, upload_to="images", help_text="Representing the project")
+ image_credits = models.CharField(_('Image credits'), max_length=256, blank=True, null=True)
+
+ class Meta:
+ verbose_name = 'Project public data'
+ verbose_name_plural = 'Project public data'
- # Public
- affiliation = models.CharField(_('affiliation'), max_length=512)
- short_description = models.CharField(_('short description'), max_length=110, help_text="Very short description of challenge / technology (110 characters max)")
- technology_description = models.TextField(_('technology description'), help_text="Description of the project technology to be made available to artists + challenges it produces (100-200 words) ")
- challenges_description = models.TextField(_('challenges description'), help_text="Description of the challenges faced by the ICT-Project (100-150 words).")
- objectives_description = models.TextField(_('objectives description'), help_text="What the project is looking to gain from the collaboration and what kind of artist would be suitable (100 – 150 words)")
- resources_description = models.TextField(_('resources description'), help_text="Resources available to the artist (50 – 100 words) -- e.g. office facility, studio facility, technical equipment, internet connection, laboratory, and periods of availability for artistic production, staff possibly allocated to the project, available budget for travel, consumables and equipments, etc.).")
- # Private
- letter = models.TextField(_('letter of commitment'))
+class ProjectPrivateData(models.Model):
+
+ project = models.ForeignKey(Project, verbose_name=_('project'), related_name='private_data', blank=True, null=True, on_delete=models.SET_NULL)
+
+ description = models.TextField(_('project description'), help_text="(500 - 1000 words)")
+ affiliation = models.CharField(_('affiliation'), max_length=512)
+ commitment_letter = models.FileField(_("letter of commitment by the project coordinator"), max_length=1024, upload_to="Documents/%Y/%m/%d/", help_text="Written on behalf of the whole project consortium, this letter will commit in implementing the collaboration of a residency application selected by the VERTIGO jury, on the conditions set by the project (in annex of letter: synthesis of all related information entered by project).")
+ persons = models.CharField(_('persons'), max_length=512, help_text="First name and last name of the persons from organization / project who will be part preliminary of the project team (separated by a comma)")
class Meta:
- verbose_name = 'Project ICT data'
- verbose_name_plural = 'Project ICT data'
+ verbose_name = 'Project private data'
+ verbose_name_plural = 'Project private data'
class ProjectContact(Person):
fields = ()
-@register(ProjectICTData)
-class ProjectICTDataTranslationOptions(TranslationOptions):
+@register(ProjectPublicData)
+class ProjectPublicDataTranslationOptions(TranslationOptions):
+
+ pass
+
+
+@register(ProjectPrivateData)
+class ProjectPrivateDataTranslationOptions(TranslationOptions):
pass
url("^calls/list/$", ProjectCallListView.as_view(), name='organization-call-list'),
url("^calls/(?P<slug>.*)/detail/$", ProjectCallDetailView.as_view(), name='organization-call-detail'),
- url("^calls/(?P<slug>.*)/projects/submission/$", ProjectICTCreateView.as_view(), name='organization-project-create'),
+ # url("^calls/(?P<slug>.*[^\/])/projects/submission/$", ProjectICTSubmissionView.as_view(), name='organization-project-submission'),
+ url("^calls/(?P<slug>.*)/detail/projects/submission/$", ProjectICTSubmissionView.as_view(), name='organization-project-submission'),
+ url("^calls/(?P<slug>.*)/detail/projects/create/$", ProjectICTCreateView.as_view(), name='organization-project-create'),
+ url("^calls/(?P<slug>.*)/detail/projects/validation/$", ProjectICTSubmissionView.as_view(), name='organization-project-validation'),
+
url("^calls/(?P<call_slug>.*)/projects/detail/(?P<slug>.*)/$", ProjectICTDetailView.as_view(), name='organization-project-detail'),
url("^calls/(?P<call_slug>.*)/projects/list/$", ProjectICTListView.as_view(), name='organization-project-list'),
- url("^calls/(?P<slug>.*)/producers/submission/$", ProducerCreateView.as_view(), name='organization-producer-create'),
- url("^calls/(?P<call_slug>.*)/producers/(?P<slug>.*)/detail/$", ProducerDetailView.as_view(), name='organization-producer-detail'),
- url("^calls/(?P<call_slug>.*)/producers/list/$", ProducerListView.as_view(), name='organization-producer-list'),
+ url("^producers/submission/$", ProducerCreateView.as_view(), name='organization-producer-create'),
+ url("^producers/(?P<slug>.*)/detail/$", ProducerDetailView.as_view(), name='organization-producer-detail'),
+ url("^producers/list/$", ProducerListView.as_view(), name='organization-producer-list'),
url("^calls/(?P<slug>.*)/residencies/submission/$", ProjectResidencyCreateView.as_view(), name='organization-residency-create'),
url("^calls/(?P<call_slug>.*)/residencies/(?P<slug>.*)/detail/$", ProjectResidencyDetailView.as_view(), name='organization-residency-detail'),
from mezzanine.conf import settings
from organization.projects.models import *
from organization.projects.forms import *
+from organization.network.forms import *
from organization.core.views import *
from organization.magazine.views import Article
from organization.pages.models import CustomPage
template_name='projects/project_ict_detail.html'
-class ProjectICTCreateView(CreateWithInlinesView):
+class ProjectCallMixin(object):
+
+ def get_context_data(self, **kwargs):
+ context = super(ProjectCallMixin, self).get_context_data(**kwargs)
+ self.call = ProjectCall.objects.get(slug=self.kwargs['slug'])
+ context['call'] = self.call
+ return context
+
+
+class ProjectICTSubmissionView(ProjectCallMixin, TemplateView):
+
+ model = Project
+ template_name='projects/project_ict_submission.html'
+
+
+
+class ProjectICTCreateView(ProjectCallMixin, CreateWithInlinesView):
model = Project
form_class = ProjectForm
template_name='projects/project_ict_create.html'
- inlines = [ProjectICTDataInline, ProjectUserImageInline, ProjectContactInline,]
+ inlines = [ProjectPublicDataInline, ProjectPrivateDataInline, ProjectUserImageInline, ProjectContactInline,]
+ topic = 'ICT'
+
+
+ def forms_valid(self, form, inlines):
+ self.object = form.save()
+ self.object.call = self.call
+ self.object.topic, c = ProjectTopic.objects.get_or_create(name='ICT')
+ self.object.save()
+ return super(ProjectICTCreateView, self).forms_valid(form, inlines)
+
+ def get_success_url(self):
+ return reverse_lazy('organization-project-validation', kwargs={'slug':self.call.slug})
+
+
+class ProjectICTValidationView(ProjectCallMixin, TemplateView):
+
+ model = Project
+ template_name='projects/project_ict_validation.html'
- def get_context_data(self, **kwargs):
- context = super(ProjectICTCreateView, self).get_context_data(**kwargs)
- context['call'] = get_object_or_404(ProjectCall, slug=self.kwargs['slug'])
- return context
class ProjectICTListView(ListView):
template_name='projects/project_producer_list.html'
def get_queryset(self):
- qs = Organization.objects.filter(role='producer')
+ type, c = OrganizationType.objects.get_or_create(name='Producer')
+ qs = Organization.objects.filter(type=type)
return qs
class ProducerCreateView(CreateWithInlinesView):
model = Organization
- form_class = ProducerForm
+ form_class = OrganizationForm
template_name='projects/project_producer_create.html'
- # inlines = [OrganizationICTDataInline, OrganizationUserImageInline, OrganizationContactInline,]
+ inlines = [OrganizationContactInline, OrganizationUserImageInline]
def forms_valid(self, form, inlines):
self.object = form.save()
- self.object.role = 'producer'
+ self.object.type, c = OrganizationType.objects.get_or_create(name='Producer')
self.object.save()
- return super(ProducerCreateView, self).form_valid(form)
+ return super(ProducerCreateView, self).forms_valid(form, inlines)
+
+ def get_success_url(self):
+ return reverse_lazy('organization-producer-detail', kwargs={'slug':self.slug})
class ProjectResidencyDetailView(SlugMixin, DetailView):
{% block page_title %}
{% editable object.title %}
- <h1 class="dotted">{% trans "Framework and submission process for hosting R&D Projects" %}</h1>
+ <h1 class="dotted">{% trans "Project submission form" %}</h1>
{% endeditable %}
+ <h3>All fields are required</h3>
{% endblock %}
{% block page_content %}
-
- <div class="row">
- {% if call.project_form_content %}
- {% editable call.project_form_content %}
- {{ call.project_form_content|richtext_filters|safe }}
- {% endeditable %}
- {% endif %}
- </div>
-
<div class="row">
- <h2 class="dotted">{% trans "Project submission form (all fields required)" %}</h2>
{% errors_for form %}
<form class="mezzanine-form form" method="post"{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
{% fields_for form %}
--- /dev/null
+{% extends "vertigo_starts_eu/pages/page.html" %}
+{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %}
+
+{% block meta_title %}{% endblock %}
+
+{% block meta_keywords %}{% endblock %}
+
+{% block body_class %}
+ pattern pattern-bg {{ department.pages.all.0.weaving_css_class }}
+{% endblock %}
+
+{% block breadcrumb_menu %}
+ {{ block.super }}
+ <li class="breadcrumb__item active">{{ object.title }}</li>
+{% endblock %}
+
+{% block page_tags %}
+{% endblock %}
+
+{% block page_title %}
+ {% editable object.title %}
+ <h1 class="dotted">{% trans "Framework and submission process for hosting R&D Projects" %}</h1>
+ {% endeditable %}
+{% endblock %}
+
+{% block page_content %}
+
+ <div class="row">
+ {% if call.project_form_content %}
+ {% editable call.project_form_content %}
+ {{ call.project_form_content|richtext_filters|safe }}
+ {% endeditable %}
+ {% endif %}
+ </div>
+
+ <div class="row">
+ <a class="button button--block" href="{% url 'organization-project-create' call.slug %}" class="sidebar__entry">{% trans "Access to submission form" %}</a>
+ </div>
+{% endblock %}
+
+{% block extra_js %}
+{{ block.super }}
+<script>
+$(function() {$('.mezzanine-form :input:visible:enabled:first').focus();});
+</script>
+{% endblock %}
--- /dev/null
+{% extends "vertigo_starts_eu/pages/page.html" %}
+{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %}
+
+{% block meta_title %}{% endblock %}
+
+{% block meta_keywords %}{% endblock %}
+
+{% block body_class %}
+ pattern pattern-bg {{ department.pages.all.0.weaving_css_class }}
+{% endblock %}
+
+{% block breadcrumb_menu %}
+ {{ block.super }}
+ <li class="breadcrumb__item active">{{ object.title }}</li>
+{% endblock %}
+
+{% block page_tags %}
+{% endblock %}
+
+{% block page_title %}
+ {% editable object.title %}
+ <h1 class="dotted">{% trans "Project submission validation" %}</h1>
+ {% endeditable %}
+ <h3>All fields are required</h3>
+{% endblock %}
+
+{% block page_content %}
+ <div class="row">
+ {% editable call.project_form_content %}
+ {{ call.project_validation_content|richtext_filters|safe }}
+ {% endeditable %}
+ </div>
+{% endblock %}
+
+{% block extra_js %}
+{{ block.super }}
+<script>
+$(function() {$('.mezzanine-form :input:visible:enabled:first').focus();});
+</script>
+{% endblock %}
{% block page_title %}
{% editable object.title %}
- <h1 class="dotted">{% trans "New producer form" %}</h1>
+ <h1 class="dotted">{% trans "Framework and submission process for producers" %}</h1>
{% endeditable %}
{% endblock %}
{% block page_content %}
<div class="row">
+ {% if call.project_form_content %}
+ {% editable call.project_form_content %}
+ {{ call.project_form_content|richtext_filters|safe }}
+ {% endeditable %}
+ {% endif %}
+ </div>
+
+ <div class="row">
+ <h2 class="dotted">{% trans "Producer submission form (all fields required)" %}</h2>
{% errors_for form %}
<form class="mezzanine-form form" method="post"{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
{% fields_for form %}
{% for formset in inlines %}
{{ formset.management_form }}
+ <hr>
+ <h2>{{ formset.prefix }}</h2>
{% for form in formset %}
{% fields_for form %}
{% endfor %}
APP=/srv/vertigo
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
-0 */6 * * * cri cd $APP; bin/push.sh >> var/log/cron/push.log
-*/10 * * * * cri cd $APP; bin/poll_twitter.sh >> var/log/cron/pull_twitter.log
+0 */3 * * * cri cd $APP; bin/push.sh >> var/log/cron/push.log
+*/10 * * * * cri cd $APP; bin/poll_twitter.sh >> var/log/cron/poll_twitter.log
#0,30 * * * * cri cd $APP; bin/upgrade.sh >> var/log/cron/upgrade.log