From d27027ad38f198c7b478e9f0fdd9e6c9b840ef22 Mon Sep 17 00:00:00 2001 From: totktospit Date: Sun, 26 Apr 2015 18:21:46 +0400 Subject: [PATCH 1/2] Update __init__.py Example of fork --- firstapp/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/firstapp/__init__.py b/firstapp/__init__.py index e69de29..47cadfd 100644 --- a/firstapp/__init__.py +++ b/firstapp/__init__.py @@ -0,0 +1 @@ +print "Dikiy, smotri kakoi fork ya zaebashil!" From 6d66ce426c8492fc52303572b7a8e3752012d3ec Mon Sep 17 00:00:00 2001 From: totktospit Date: Sun, 10 May 2015 19:44:03 +0400 Subject: [PATCH 2/2] Create models.py --- models.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 models.py diff --git a/models.py b/models.py new file mode 100644 index 0000000..ce2c962 --- /dev/null +++ b/models.py @@ -0,0 +1,25 @@ +from django.db import models +from django.contrib.auth.models import User + +# Create your models here. + +class Sport(models.Model): + name = models.CharField(max_length=255) + #users = models.ManyToManyField(PlayField) + + def __unicode__(self): + return self.name + + +class Event(models.Model): + name = models.CharField(max_length=255) + description = models.CharField(max_length=3000,null=True) + time = models.DateTimeField() + sport = models.ForeignKey(Sport) + user = models.ForeignKey(User, null=True) + + def __unicode__(self): + return self.name + +class Counter(models.Model): + number = models.IntegerField(default=0)