Initial commit
This commit is contained in:
commit
904cf04b4f
19 files changed
+444
No files matched your search
Whitespace-only changes.
@@ -0,0 +1,4 @@
|
||||
from django.contrib import admin
|
||||
import models
|
||||
|
||||
admin.site.register(models.Answer)
|
||||
@@ -0,0 +1,14 @@
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
# Create your models here.
|
||||
class Answer(models.Model):
|
||||
user = models.ForeignKey(User)
|
||||
question = models.CharField(max_length=128)
|
||||
string = models.TextField()
|
||||
|
||||
class Meta:
|
||||
unique_together = ('user', 'question')
|
||||
|
||||
def __str__(self):
|
||||
return self.question + ": " + self.string
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
Reference in new issue
Block a user