-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correção do erro de mesclagem em views.py
- Loading branch information
Showing
8 changed files
with
134 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
from django import forms | ||
from .models import Event | ||
from .models import Event, Comment | ||
|
||
class EventForm(forms.ModelForm): | ||
"""Formulário utilizado para a inserção de novos eventos.""" | ||
class Meta: | ||
model = Event | ||
fields = ['date', 'event', 'priority'] | ||
fields = ['date', 'event', 'priority',] | ||
|
||
class CommentForm(forms.ModelForm): | ||
"""Formulário usado para a inserção de comentários em um evento.""" | ||
class Meta: | ||
model = Comment | ||
fields = ['text', 'author', 'email', 'event'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 2.0.4 on 2018-05-06 16:37 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('events', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Comment', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('author', models.CharField(max_length=80)), | ||
('email', models.EmailField(max_length=254)), | ||
('text', models.CharField(max_length=160)), | ||
('commented', models.DateTimeField(default=django.utils.timezone.now)), | ||
('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comment_event', to='events.Event')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Django==2.0.4 | ||
pkg-resources==0.0.0 | ||
libgravatar==0.2.3 | ||
pytz==2018.4 |