Skip to content
Snippets Groups Projects
Commit e24b92d4 authored by Maxime's avatar Maxime
Browse files

add default image to poll

parent acf511e7
No related branches found
No related tags found
1 merge request!12Default img
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-08-14 09:59
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('djangoldp_polls', '0002_poll_circle'),
]
operations = [
migrations.AlterField(
model_name='poll',
name='circle',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polls', to='djangoldp_circle.Circle'),
),
migrations.AlterField(
model_name='poll',
name='debate',
field=models.ManyToManyField(blank=True, related_name='polls', to='djangoldp_conversation.Conversation'),
),
migrations.AlterField(
model_name='poll',
name='tags',
field=models.ManyToManyField(blank=True, related_name='polls', to='djangoldp_polls.Tag'),
),
migrations.AlterField(
model_name='vote',
name='user',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='votes', to=settings.AUTH_USER_MODEL),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-08-18 10:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('djangoldp_polls', '0003_auto_20200814_0959'),
]
operations = [
migrations.AlterField(
model_name='poll',
name='image',
field=models.URLField(default='./img/default-poll.png', verbose_name="Illustration de l'évènement"),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-08-18 10:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('djangoldp_polls', '0004_auto_20200818_1014'),
]
operations = [
migrations.AlterField(
model_name='poll',
name='image',
field=models.URLField(default='/media/default-image.png', verbose_name="Illustration de l'évènement"),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-08-18 10:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('djangoldp_polls', '0005_auto_20200818_1024'),
]
operations = [
migrations.AlterField(
model_name='poll',
name='image',
field=models.URLField(default='./media/default-image.png', verbose_name="Illustration de l'évènement"),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-08-18 10:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('djangoldp_polls', '0006_auto_20200818_1024'),
]
operations = [
migrations.AlterField(
model_name='poll',
name='image',
field=models.URLField(default='/media/default-image.png', verbose_name="Illustration de l'évènement"),
),
]
......@@ -43,10 +43,10 @@ class Poll (Model):
created_at = models.DateTimeField(auto_now_add=True)
author = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='createdVotes', null=True,blank=True)
title = models.CharField(max_length=250,verbose_name="Title")
image = models.URLField(blank=True, null=True, verbose_name="Illustration de l'évènement")
image = models.URLField(verbose_name="Illustration",default=settings.BASE_URL +"/media/default-image.png")
hostingOrganisation = models.CharField(max_length=250,verbose_name="Name of the hosting organisation")
startDate = models.DateField(verbose_name="Date de début", blank=True, null=True )
endDate = models.DateField(verbose_name="Date de fin" )
startDate = models.DateField(verbose_name="Start date", blank=True, null=True )
endDate = models.DateField(verbose_name="End data" )
shortDescription = models.CharField(max_length=250,verbose_name="Short description")
longDescription = models.TextField(verbose_name="Long description")
tags = models.ManyToManyField(Tag, related_name='polls', blank=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment