Skip to content
Snippets Groups Projects
Commit 2cefc477 authored by Chif Gergo's avatar Chif Gergo
Browse files

Kisebb hibajavitasok

parent 0ac06961
No related branches found
No related tags found
No related merge requests found
from django.db import models from django.db import models
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.utils import timezone
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
import datetime import datetime
...@@ -23,5 +22,5 @@ class Profile(models.Model): ...@@ -23,5 +22,5 @@ class Profile(models.Model):
return self.user.username return self.user.username
def clean(self): def clean(self):
if self.join_date > datetime.date.today() or self.join_date < datetime.date(2015, 1,1): if self.join_date > datetime.date.today() or self.join_date < datetime.date(2015, 1, 1):
raise ValidationError('Invalid date') raise ValidationError('Invalid date')
...@@ -2,7 +2,6 @@ from django.db import models ...@@ -2,7 +2,6 @@ from django.db import models
from account.models import Profile from account.models import Profile
from django.utils import timezone from django.utils import timezone
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
# Create your models here.
class KszkEvent(models.Model): class KszkEvent(models.Model):
......
from django.test import TestCase
# Create your tests here.
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