Skip to content

Commit d1fabb2

Browse files
adiciona campos ao modelo de evento.
1 parent b2486bb commit d1fabb2

3 files changed

Lines changed: 91 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.11.8 on 2018-02-04 17:15
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations, models
6+
import markdownx.models
7+
8+
9+
class Migration(migrations.Migration):
10+
11+
dependencies = [
12+
('core', '0001_initial'),
13+
]
14+
15+
operations = [
16+
migrations.AddField(
17+
model_name='evento',
18+
name='data_fechamento_palestras',
19+
field=models.DateTimeField(blank=True, null=True),
20+
),
21+
migrations.AddField(
22+
model_name='evento',
23+
name='descrição',
24+
field=markdownx.models.MarkdownxField(default='teste'),
25+
preserve_default=False,
26+
),
27+
migrations.AddField(
28+
model_name='evento',
29+
name='meetup_link',
30+
field=models.URLField(blank=True, null=True),
31+
),
32+
migrations.AddField(
33+
model_name='evento',
34+
name='nome',
35+
field=models.CharField(default='PythOnRio', max_length=255),
36+
),
37+
migrations.AddField(
38+
model_name='evento',
39+
name='palestras_link',
40+
field=models.URLField(blank=True, null=True),
41+
),
42+
]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.11.8 on 2018-02-04 17:55
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations, models
6+
import markdownx.models
7+
8+
9+
class Migration(migrations.Migration):
10+
11+
dependencies = [
12+
('core', '0002_auto_20180204_1515'),
13+
]
14+
15+
operations = [
16+
migrations.AddField(
17+
model_name='evento',
18+
name='agenda',
19+
field=markdownx.models.MarkdownxField(default='Hora | Local | Atividade\n--- | --- | ---\n13:30|Recepção|Credenciamento\n13:55||Abertura\n14:00||\n14:50||\n15:40||\n16:00||\n16:30||\n17:00||\n17:50||Encerramento\n18:00|No bar mais próximo, vamos trocar ideias e beber um chopp.|Pós-evento'),
20+
),
21+
migrations.AddField(
22+
model_name='evento',
23+
name='endereço',
24+
field=models.CharField(default=' ', max_length=255),
25+
preserve_default=False,
26+
),
27+
]

core/models.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
from django.db import models
2+
from markdownx.models import MarkdownxField
3+
4+
5+
AGENDA_DEFAULT = '''Hora | Local | Atividade
6+
--- | --- | ---
7+
13:30|Recepção|Credenciamento
8+
13:55||Abertura
9+
14:00||
10+
14:50||
11+
15:40||
12+
16:00||
13+
16:30||
14+
17:00||
15+
17:50||Encerramento
16+
18:00|No bar mais próximo, vamos trocar ideias e beber um chopp.|Pós-evento'''
217

318

419
class Evento(models.Model):
20+
nome = models.CharField(max_length=255, default="PythOnRio")
21+
descrição = MarkdownxField()
22+
endereço = models.CharField(max_length=255)
23+
agenda = MarkdownxField(default=AGENDA_DEFAULT)
24+
meetup_link = models.URLField(null=True, blank=True)
25+
palestras_link = models.URLField(null=True, blank=True)
526
data = models.DateTimeField()
27+
data_fechamento_palestras = models.DateTimeField(null=True, blank=True)
628
local = models.CharField(max_length=255)
729
cidade = models.CharField(max_length=255, default="Rio de Janeiro")

0 commit comments

Comments
 (0)